Can't start VM on 4.4

So this is embarrassing, this was exactly what was happening. I forgot one of the test nodes runs on KVM itself so I guess KVM in KVM does not work. Sorry for wasting your time on this one!

Haha, good when it all makes sense :wink:

I’ll add an idea card on our backlog to record whether a host is VM-capable or not so we can avoid scheduling VMs on non-VM hosts.

Hi folks,

I have just hit a similar problem as the one described here, but the underlying error is a ‘permission denied’ when qemu tries to write to ‘/var/snap/lxd/common/lxd/logs/maas/qemu.conf’. Full error here[1].

An interesting fact is that I was able to run the very same steps in a virtual machine, now I’m doing on a baremetal. dmesg doesn’t bring anything related to this occurrence.

Any ideas?

Erlon


[1] LXD VMs error · GitHub

ps. Adding 'o+w ’ permissions obviously did not work.

Name: maas
Status: STOPPED
Type: virtual-machine
Architecture: x86_64
Created: 2022/03/09 20:26 UTC

Log:

qemu-system-x86_64:/var/snap/lxd/common/lxd/logs/maas/qemu.conf:310: The device is not writable: Permission denied

root@buneary:/home/ubuntu# ls -la /var/snap/lxd/common/lxd/logs/maas/qemu.conf
-rw-r---w- 1 root root 5533 Mar  9 20:34 /var/snap/lxd/common/lxd/logs/maas/qemu.conf

Can you show the content of /var/snap/lxd/common/lxd/logs/maas/qemu.conf as well as output of lxc config show --expanded maas and dmesg?

Here:
lxc config show --expanded maas
dmesg
/var/snap/lxd/common/lxd/logs/maas/qemu.conf

There’s something in my config that is causing that issue. I was able to boot a VM using the default profile.

Error points towards this device:

  data:
    source: /dev/loop3
    type: disk

The error suggests that /dev/loop3 isn’t writable and therefore not suitable to be passed as a read-write disk to a VM.

Hey Stefan,

Thanks for the prompt answer! I figure out my mistake now. I added /dev/loop3, but didn’t bind it to a file. I was doing it in the previous deployment. But I’m curious now on how did you get to that conclusion from that error? They don’t seem to be related at all.

Erlon

qemu-system-x86_64:/var/snap/lxd/common/lxd/logs/maas/qemu.conf:310: The device is not writable: Permission denied

I then looked at line 310 in qemu.conf which refers to [device "dev-lxd_data"], I then looked at your instance config for a device called data and saw it was a loop device.

Hmm, seems a bit obscure to co-relate, but I’m glad that it worked out. Thanks a lot.