Launching vm "requires an agent:config disk"

Dear colleagues,

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 message refers to instructions that have been added to a recent release of Incus.

  1. Here are the News of this discussion forum, along with the release announcements.
  2. The issue that you are facing, is discussed in the release 0.5.1.
1 Like

Type: disk - Incus documentation has the section on the VM agent disk

1 Like

Thank you both so much @simos and @stgraber!

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.

1 Like

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

  1. likely do not have enabled services like SSH to give access.
  2. 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,

  1. (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.
  2. use a cloud-init enabled image (like centos/9-Stream/cloud) in order to setup a default account and enable access through SSH. (example)
  3. use distrobuilder that builds container and VM images to produce custom images with some way to get access to the VM.
1 Like

Hi @simos,

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 have tested same cloud-init config , and it work (add user/pass) on container (not vm)

Thanks.

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.

I can access your blog website now.

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.

I have tested on Linux Containers - Incus - Try it online with the same config / image (images:almalinux/9/cloud --vm), it work

Any idea why it not working on my local incus?
Thanks.

(my host: is debian/amd64 sid and incus version is : 6.0.0-1, installed by apt install incus)

I just tried same cloud-init config with LXD, and it works as expected.
image

Is it possible incus’s bug?

Solved: after add this it working with incur now, thanks