[pve-devel] [PATCH 2/6] vmconfig_hotplug_pending : add update_net
Alexandre DERUMIER
aderumier at odiso.com
Mon Nov 17 17:02:01 CET 2014
>>THis looks also problematic. What if someone sets hotplug=0? This also use wrong values
>>if the VM is migrated?
I manage this inside deviceplug|unplug.
(I remove the pending device at the end)
sub vm_deviceplug {
....
return 1 if !$conf->{hotplug};
...
#delete pending device after hotplug
if($conf->{pending}->{$deviceid}){
$conf->{$deviceid} = $optvalue;
delete $conf->{pending}->{$deviceid};
PVE::QemuServer::update_config_nolock($vmid, $conf, 1);
}
}
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com
Envoyé: Lundi 17 Novembre 2014 16:57:57
Objet: RE: [pve-devel] [PATCH 2/6] vmconfig_hotplug_pending : add update_net
> diff --git a/pve-bridge b/pve-bridge
> index d6c5eb8..caee33b 100755
> --- a/pve-bridge
> +++ b/pve-bridge
> @@ -20,6 +20,10 @@ my $migratedfrom = $ENV{PVE_MIGRATED_FROM};
>
> my $conf = PVE::QemuServer::load_config($vmid, $migratedfrom);
>
> +if ($conf->{pending}->{$netid}){
> + $conf = $conf->{pending};
> +}
> +
> die "unable to get network config '$netid'\n"
> if !$conf->{$netid};
>
THis looks also problematic. What if someone sets hotplug=0? This also use wrong values
if the VM is migrated?
More information about the pve-devel
mailing list