5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-25 06:03:52 +03:00

nic hot-unplug: delete netdev after device removal

Currently we delete netdev before acpi hot-unplug.

if guest don't support hotplug, this break network.

We need to remove netdev after the device had be correctly unplug.(we check that device has been correctly removed)
So, If guest don't support hotplug, It's simply thrown a unplug error message without breaking the network

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2013-03-06 15:48:59 +01:00 committed by Dietmar Maurer
parent de8f60b252
commit 750886f87a

View File

@ -2620,9 +2620,9 @@ sub vm_deviceunplug {
}
if ($deviceid =~ m/^(net)(\d+)$/) {
return undef if !qemu_netdevdel($vmid, $deviceid);
qemu_devicedel($vmid, $deviceid);
return undef if !qemu_devicedelverify($vmid, $deviceid);
return undef if !qemu_netdevdel($vmid, $deviceid);
}
return 1;