diff --git a/extensions/Servers/Proxmox/Livewire/Storage.php b/extensions/Servers/Proxmox/Livewire/Storage.php index ec018b2a1..255c62769 100644 --- a/extensions/Servers/Proxmox/Livewire/Storage.php +++ b/extensions/Servers/Proxmox/Livewire/Storage.php @@ -782,14 +782,21 @@ class Storage extends Component $unusedIndex++; } - // Move the disk to an unused slot instead of deleting it - // This preserves the volume data + // First, assign the volume to an unused slot to preserve it $proxmox->request( '/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/config', 'put', [ 'unused' . $unusedIndex => $drive['volume'], - 'delete' => $driveKey, + ] + ); + + // Then remove the drive configuration (the volume is already safe in unused) + $proxmox->request( + '/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/config', + 'put', + [ + $driveKey => 'none', ] );