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.
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).
Yes, we apply things immediately at runtime.
You can see an example of it in What's new in LXD 5.0 LTS? - YouTube
I must have misunderstood something
mcon@ikea:~$ lxc config device add WinX eth0 none
Error: Failed to add device "eth0": Device cannot be added when instance is running
My (tentative) win10 VM has a very simple configuration:
mcon@ikea:~$ lxc config show WinX
with a completely standard
mcon@ikea:~$ lxc profile show default
description: Default LXD profile
What am I missing?