From 9f8c4eef04cd0a226ee1d6ceccd190f46341af0e Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Fri, 5 Dec 2025 04:46:55 -0500 Subject: [PATCH] feat: update drive reattachment logic to first set the disk on the new bus before clearing the unused slot --- extensions/Servers/Proxmox/Livewire/Storage.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/extensions/Servers/Proxmox/Livewire/Storage.php b/extensions/Servers/Proxmox/Livewire/Storage.php index 255c62769..69d1ea34b 100644 --- a/extensions/Servers/Proxmox/Livewire/Storage.php +++ b/extensions/Servers/Proxmox/Livewire/Storage.php @@ -1023,13 +1023,21 @@ class Storage extends Component $diskConfig = implode(',', $configParts); - // Set the disk on the new bus and delete the unused reference + // First, set the disk on the new bus $proxmox->request( '/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/config', 'put', [ $targetKey => $diskConfig, - 'delete' => $this->reattachingDriveKey, + ] + ); + + // Then clear the unused slot (set to empty/none to remove the reference without deleting volume) + $proxmox->request( + '/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/config', + 'put', + [ + $this->reattachingDriveKey => '', ] );