[pve-devel] [PATCH 2/7] vmconfig_hotplug_pending : add update_net
Alexandre DERUMIER
aderumier at odiso.com
Wed Nov 19 11:54:20 CET 2014
>>what if firewall flag changed?
It's managed later with bridge && vlan
if(&$safe_string_ne($oldnet->{bridge}, $newnet->{bridge}) ||
&$safe_num_ne($oldnet->{tag}, $newnet->{tag}) ||
&$safe_num_ne($oldnet->{firewall}, $newnet->{firewall})){
PVE::Network::tap_unplug($iface);
PVE::Network::tap_plug($iface, $newnet->{bridge}, $newnet->{tag}, $newnet->{firewall});
}
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com
Envoyé: Mercredi 19 Novembre 2014 10:31:09
Objet: RE: [pve-devel] [PATCH 2/7] vmconfig_hotplug_pending : add update_net
> +sub vmconfig_update_net {
> + my ($storecfg, $conf, $vmid, $opt) = @_;
> +
> + if ($conf->{$opt}) {
> + my $running = PVE::QemuServer::check_running($vmid);
> +
> + my $oldnet = PVE::QemuServer::parse_net($conf->{$opt});
> + my $newnet =
> + PVE::QemuServer::parse_net($conf->{pending}->{$opt});
> +
> + if(&$safe_string_ne($oldnet->{model}, $newnet->{model}) ||
> + &$safe_string_ne($oldnet->{macaddr}, $newnet->{macaddr}) ||
> + &$safe_num_ne($oldnet->{queues}, $newnet->{queues})){
> + #for non online change, we try to hot-unplug
what if firewall flag changed?
More information about the pve-devel
mailing list