[pve-devel] [PATCH 2/2] dynamic rate limit change on network update
Alexandre DERUMIER
aderumier at odiso.com
Mon Mar 4 17:43:34 CET 2013
I'll send a new patch version, I forgot to check if the vm is running.
----- Mail original -----
De: "Alexandre DERUMIER" <aderumier at odiso.com>
À: "Dietmar Maurer" <dietmar at proxmox.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Lundi 4 Mars 2013 16:52:22
Objet: Re: [pve-devel] [PATCH 2/2] dynamic rate limit change on network update
I don't have remove the unplug code yet.
(I'll work on dynamic vlan change first)
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre Derumier" <aderumier at odiso.com>, pve-devel at pve.proxmox.com
Envoyé: Lundi 4 Mars 2013 16:34:16
Objet: RE: [pve-devel] [PATCH 2/2] dynamic rate limit change on network update
>
> @@ -750,10 +751,19 @@ my $vmconfig_update_net = sub {
> my ($rpcenv, $authuser, $conf, $storecfg, $vmid, $opt, $value) = @_;
>
> if ($conf->{$opt}) {
> + my $oldnet = PVE::QemuServer::parse_net($conf->{$opt});
> + my $newnet = PVE::QemuServer::parse_net($value);
> +
> + if(($newnet->{rate} && $newnet->{rate} ne $oldnet->{rate}) || ($oldnet-
> >{rate} && !$newnet->{rate})){
> + if($opt =~ m/net(\d+)/){
> + my $iface = "tap".$vmid."i".$1;
> + PVE::Network::tap_rate_limit($iface, $newnet->{rate});
> + }
> + }
> +
> #if online update, then unplug first
> die "error hot-unplug $opt for update" if
> !PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
We unplug after setting the rate?
_______________________________________________
pve-devel mailing list
pve-devel at pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list