Hi, I have imported legacy OS (Ubuntu 10.04) Qcow2 image into LXD 6.3 and I am having trouble to boot the image. The import was done by the command:
lxd-migrate --name <vm name> --type vm --source vm-<id>-disk-1.qcow2 --non-interactive --conversion=format --config security.csm=true --config security.secureboot=false
The imported instance won’t find the disk. I can see default image in storage list:
lxc storage volume list default
+-----------------+------+-------------+--------------+---------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+-----------------+------+-------------+--------------+---------+
| virtual-machine | <vm name> | | block | 1 |
+-----------------+------+-------------+--------------+---------+
lxc storage list
+---------+--------+--------------------------------------------+-------------+---------+---------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
+---------+--------+--------------------------------------------+-------------+---------+---------+
| default | zfs | /var/snap/lxd/common/lxd/disks/default.img | | 2 | CREATED |
+---------+--------+--------------------------------------------+-------------+---------+---------+
But when I tried to attach the disk to the instance, I got error:
lxc config device add <vm name> block-volume disk pool=default source=<vm name>
or
lxc storage volume attach default <vm name = volume> <vm name = instance>
Error: Failed add validation for device "<vm-name>": Failed loading "custom/<vm-name>" from project "default": Storage volume not found
What I am doing wrong?
The VM config:
lxc config show <vm-name>
architecture: x86_64
config:
security.csm: "true"
security.secureboot: "false"
volatile.cloud-init.instance-id: 5e2ebeb0-57f9-4985-9d1d-1227d5deed48
volatile.eth0.hwaddr: 00:16:3e:90:0c:fa
volatile.last_state.power: STOPPED
volatile.last_state.ready: "false"
volatile.uuid: 52de7861-777c-476d-be05-aaa968ea6b24
volatile.uuid.generation: 52de7861-777c-476d-be05-aaa968ea6b24
volatile.vsock_id: "488877321"
devices: {}
ephemeral: false
profiles:
- default
stateful: false
description: ""