>>Note: you always use the value from [PENDING] inside pve-bridge if ($conf->{pending}->{$netid}){ $conf = $conf->{pending}; }
So, yes, I always use the pending conf if it's exist, in case we want to hotplug it. But, on vm start, I think the pending conf is already removed right ? ----- Mail original ----- De: "Dietmar Maurer" <diet...@proxmox.com> À: "Dietmar Maurer" <diet...@proxmox.com>, "Alexandre DERUMIER" <aderum...@odiso.com> Cc: pve-devel@pve.proxmox.com Envoyé: Lundi 17 Novembre 2014 17:08:47 Objet: RE: [pve-devel] [PATCH 2/6] vmconfig_hotplug_pending : add update_net > > >>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); > > } > > } > > What is someone wants: > > hotplug: 0 > > Then you want to keep changes in [PENDING], without applying them. Note: you always use the value from [PENDING] inside pve-bridge _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel