[SOLVED] Limit network speed

itvietnam

Renowned Member
Aug 11, 2015
132
4
83
Hi,

Is there anyway to limit network speed to 12MB/s for 1000+ VM via command?

I tried:

Code:
 qm set 341 --net0 rate=12

But it returns error:

Code:
400 Parameter verification failed.
net0: invalid format - format error
net0.model: property is missing and it is not optional

qm set <vmid> [OPTIONS]
 
Hi,

no you have to write a script what do this job.
And the set command need the hole network string.

use
Code:
qm config <VMID>
to get the config.


than take the netX line
Code:
net0: virtio=46:83:4B:6B:15:8B,bridge=vmbr0
and add the rate at the end of the line
Code:
qm set <VMID> -net0 virtio=46:83:4B:6B:15:8B,bridge=vmbr0,rate=12
 
Thanks, i tried and it works.

Code:
root@hv109:~# qm set 292 -net0 virtio=3A:8F:9B:FC:37:DE,bridge=vmbr0,tag=575,rate=12
update VM 292: -net0 virtio=3A:8F:9B:FC:37:DE,bridge=vmbr0,tag=575,rate=12
root@hv109:~#

I will code it myself.
 
Can you apply this to LXC also?

Edit: I confirm, it does work. =)
 
Last edited: