Unable to launch VM via Incus

I created an Image via Distrobuilder based on template Ubuntu.yaml provided by the repo

sudo distrobuilder build-lxd --vm --type=unified ubuntu.yaml

I import generated image into incus and launch it:

sudo incus image import ubuntu-disco-x86_64.tar.xz --alias u1
sudo incus  launch u0 x1

I try to access the VM but no luck:

sudo incus exec x1 bash


Error: VM agent isn't currently running

VM info:

Name: x1
Type: virtual-machine
Architecture: x86_64
PID: 178099
Created: 2023/11/25 17:55 UTC
Last Used: 2023/11/25 17:55 UTC

  Processes: -1
  Network usage:
      Type: broadcast
      State: UP
      Host interface: tap4d68006f
      MAC address: 00:16:3e:6e:6a:0b
      MTU: 1500
      Bytes received: 5.82kB
      Bytes sent: 5.56kB
      Packets received: 32
      Packets sent: 29
      IP addresses:
        inet6: fd42:143f:a9:dd98:216:3eff:fe6e:6a0b/64 (global)
        inet6: fe80::216:3eff:fe6e:6a0b/64 (link)

Incus: 0.2
Distrobuilder: 3.0

Update: I tried to import the image into LXD and same happened

What’s possible issue and how to debug it?

Did you use incus console --type=vga to see what’s the VM doing?

It’s on a remote server connected via ssh, unable to get the VGA console

If you can add the server as an incus remote on your local system, then incus console --type=vga will work.

Though in this case, the text console may already show you what’s wrong, so you can try to incus restart -f NAME --console

1 Like

Will try.
additionally, is there a plan to move Distrobuilder away from Snap?

I have build-lxd within the command instead of build-incus, after using the incus version the problem got solved:

sudo distrobuilder build-incus --vm --type=unified ubuntu.yaml