Comment 1 for bug 1975736

Revision history for this message
Ioanna Alifieraki (joalif) wrote (last edit ):

Some initial analysis I've done.

The error "Error: Migration is disabled when VirtFS export path '/var/lib/lxd/devices/f-vm/config.mount' is mounted in the guest using mount_tag 'config'" comes from qemu.
IIUC qemu returns this error because 9p driver is in use
(see https://gitlab.com/qemu-project/qemu/-/commit/e9a0152ba182c5ce9929ee60f83a37b61a1d5195 ).

In lxd logs I can see :
"WARNING[2022-05-25T17:14:46Z] Unable to use virtio-fs for config drive, using 9p as a fallback err="Stateful migration unsupported" instance=f-vm instanceType=virtual-machine project=default".

This warning comes from [1] because DiskVMVirtiofsdStart returns error [2].
IIUC DiskVMVirtiofsdStart returns error because stateful.migration is set to true and according to [3],
"To allow for this, the VM must have migration.stateful set to true and size.state set on its root disk device to allow
for additional space to store the runtime state. In this mode, PCI passthrough will be disabled as will be virtiofs."
However, when falling back to 9p also does not support stateful migration.

[1] https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/driver_qemu.go#L1198
[2] https://github.com/lxc/lxd/blob/837d8228b45010bcbeecf581720e2ce7f17f04dc/lxd/device/device_utils_disk.go#L447
[3] https://discuss.linuxcontainers.org/t/lxd-4-12-has-been-released/10424#stateful-stop-and-stateful-snapshots-for-virtual-machines-4