Today we had a network maintenance and I needed to change the VLAN ID of a network (the network was split in two parts and we were the unlucky ones who need to change it ;-)).
I thought that I’ll just need to change de network VLAN ID, shut-down the VMs, update their configuration and start the VMs.
This was working fine for the contextualisation parameters of the network, the network, netmask and gateway was updated correctly for the VMs.
Unfortunately, I did not manage to update the VLAN ID, even by setting the
ETH0_VLAN_ID, either through Sunstone on CLI with
I don’t know if this is true for 5.2 so I did not open a ticket directly but should I?
This is really old thread, but I hit same problem and didn’t find any working solution. At same time, this post is high enough in search that there might be others with same issue.
From what I found out (I might be wrong):
updateconf (or in sunstone) you can update only context info
- context info is probably used only during new deploy (just guessing)
- if you need to change also actual NIC settings (IMHO always, not sure why there is no easy way), you can use
onedb change-body or
If you have only couple VMs, you can do this by hand, with something like:
onedb change-body vm --id XXX "/VM/TEMPLATE/NIC[NIC_ID="0"]/VLAN_ID" 1234
As I had more VMs and my source of truth was current live setup, I ended up writing python script which takes info from
ovs-vsctl about vlan tags on ports and update both context and NIC part for all NICs on all VMs.