api changes mac address unessescarily

pixel

Renowned Member
Aug 6, 2014
138
3
83
changing the bridge of an interface, or even setting the interface with an equal setting, seems to create a new one. it changes the mac address unless you explicitly set that to be the same.

Code:
root@proxmox1:~# pvesh get /nodes/proxmox1/qemu/100/config | grep net2
   "net2" : "virtio=56:45:C2:A4:18:46,bridge=vmbr1",
root@proxmox1:~# pvesh create /nodes/proxmox1/qemu/100/config -net2 virtio,bridge=vmbr2
update VM 100: -net2 virtio,bridge=vmbr2
root@proxmox1:~# pvesh get /nodes/proxmox1/qemu/100/config | grep net2
   "net2" : "virtio=42:3F:C1:18:4D:B3,bridge=vmbr2",

heres an example of the same setting, in this case, the bridge is lost too.

Code:
root@proxmox1:~# pvesh get /nodes/proxmox1/qemu/100/config | grep net2
   "net2" : "virtio=42:3F:C1:18:4D:B3,bridge=vmbr2",
root@proxmox1:~# pvesh create /nodes/proxmox1/qemu/100/config -net2 virtio
update VM 100: -net2 virtio
root@proxmox1:~# pvesh get /nodes/proxmox1/qemu/100/config | grep net2
   "net2" : "virtio=32:DD:5A:8A:B3:C6",

I wanted to be lazy. to take a config file with all the machine defs, and simply apply relevant settings to make sure they're the same.