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.