Launching a VM on my incus 0.6 host on Ubuntu 22.04 with zfs requires an extra configuration step apparently that I haven’t heard of yet:
$ incus launch images:centos/7 centos-7 --vm
Launching centos-7
Error: Failed instance creation: This virtual machine image requires an agent:config disk be added
What is an “agent:config disk” and how would I set it up? The documentation seems to not mention this part, or I must have not been able to make the right connection. I’m just thinking that this must be an host-wide setting instead of an instance setting because the latter would come with the vm image I believe?
The short version of this issue: certain guest operating systems don’t provide a way for incus to communicate with them. These guests need a kind of “fake CD-ROM” drive for incus to put files on as a way for the guest to receive data from the host.
All I needed to do before my CentOS 7 vm could start was the following:
incus config device add centos-7 agent disk source=agent:config
So the source for the disk in this case is not a directory but a reserved name that provides the feature described above.
When you launch an image in a virtual machine with Incus, the virtual machine boots up and acts like yet another standalone server. By default, those images
likely do not have enabled services like SSH to give access.
normally do not have a default user account therefore you cannot SSH to them.
There are a few ways to get access to those newly-launched virtual machines,
(preferred) have a special extra service automatically installed and configured in such a virtual machine. This is what Incus does automatically with most images, though it requires special treatment for some images.
use a cloud-init enabled image (like centos/9-Stream/cloud) in order to setup a default account and enable access through SSH. (example)
use distrobuilder that builds container and VM images to produce custom images with some way to get access to the VM.
I follow above instruction to add agent:config.
But the cloud-init setup seems to still not working, and I see those error message in the vm , when I use “incus console $vm_name”
I had put allow and deny for a list of IP address in a specific server block and then this somewhat affected all server blocks. nginx is full of surprises.
BTW, any idea why the cloud-init config not working with vm type “–vm”?
(reference to above screen, the vm seems to can’t mount the agent cd drive, how to let it mount?)
Thank you.