Is it possible to (virtually) disconnect/reconnect “network cable” (bridged network) to a running container?
On the same line: is it possible to dynamically add/change “cd-rom images” to running VMs?
I know how to do that on a stopped container, but that is not what I need.
Adding/removing disk to VMs is supported in 5.0 so you can use lxc config device add to add/remove disk devices (which also apply to cdrom).
For bouncing the network, if the network was configured through a profile, you can temporarily mask it and add it back with:
lxc config device add NAME eth0 none
lxc config device remove NAME eth0
If the instance has its own network device in local config, then you’d need to remove the device and add it back, which means recording all its properties so you can add it back correctly.
Thanks Stéphane!
Do I read you correctly if I say adding/removing disk/device/whatever to a running container/vm will be honored immediately without restart?
I did not understand it that way (my bad, of course).