[pve-devel] [PATCH 6/6] add a hook to call vm_devicedel with disk is removed from configuration

Derumier Alexandre aderumier at odiso.com
Mon Oct 10 16:46:58 CEST 2011


Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
 PVE/API2/Qemu.pm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index eba65b5..818962f 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;
-- 
1.7.2.5




More information about the pve-devel mailing list