From 2bbed6c09a9696d38082ccadc2adb97ff20d8ac0 Mon Sep 17 00:00:00 2001 From: Derumier Alexandre Date: Mon, 10 Oct 2011 16:46:58 +0200 Subject: [PATCH] add a hook to call vm_devicedel with disk is removed from configuration Signed-off-by: Derumier Alexandre --- PVE/API2/Qemu.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index b8bd5dac..46bbf52a 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -460,6 +460,7 @@ __PACKAGE__->register_method({ } next if !defined($conf->{$opt}); if (PVE::QemuServer::valid_drivename($opt)) { + PVE::QemuServer::vm_devicedel($vmid,$opt); my $drive = PVE::QemuServer::parse_drive($opt, $conf->{$opt}); if (PVE::QemuServer::drive_is_cdrom($drive)) { $cdchange->{$opt} = undef;