You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to copy a VM with an attached custom volume between two LXD.
I stopped the VM and copied successfully the custom volume. When I copied the machine, I had an "unsupported" error and the process stopped. However on the other host the virtual machine volume was created but not the instance. The virtual machine volume cannot be deleted via CLI.
This happened both on LXD 6.3 latest/edge and on LXD 5.21.3 LTS 5.21/stable
On one LXD 6.3
root@lxd-6:~# lxc launch ubuntu:24.04 v2-test-metadata --vm
Launching v2-test-metadata
root@lxd-6:~# lxc storage volume create default v2-test-metadata-custom-volume
Storage volume v2-test-metadata-custom-volume created
root@lxd-6:~# lxc storage volume attach default v2-test-metadata-custom-volume v2-test-metadata /files
root@lxd-6:~# lxc storage volume copy default/v2-test-metadata-custom-volume lxd-6-copy:default/v2-test-metadata-custom-volume
Storage volume copied successfully!
root@lxd-6:~# lxc stop v2-test-metadata
root@lxd-6:~# lxc copy v2-test-metadata lxd-6-copy:v2-test-metadata
Error: Failed migration on source: Error from migration control target: Failed to prepare device "v2-test-metadata-custom-volume" for migration: Not supported
On the other LXD 6.3
root@lxd-6-copy:~# lxc storage volume list default
+-----------------+--------------------------------+-------------+--------------+---------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+-----------------+--------------------------------+-------------+--------------+---------+
| custom | v1-test-metadata-custom-volume | | filesystem | 0 |
+-----------------+--------------------------------+-------------+--------------+---------+
| virtual-machine | v2-test-metadata | | block | 1 |
+-----------------+--------------------------------+-------------+--------------+---------+
root@lxd-6-copy:~# lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+
Same on LXD 5.21.3 LTS
root@lxd-5:~# lxc launch ubuntu:24.04 v3-test-metadata --vm
Launching v2-test-metadata
root@lxd-5:~# lxc storage volume create default v3-test-metadata-custom-volume
Storage volume v2-test-metadata-custom-volume created
root@lxd-5:~# lxc storage volume attach default v3-test-metadata-custom-volume v3-test-metadata /files
root@lxd-5:~# lxc storage volume copy default/v3-test-metadata-custom-volume lxd-5-copy:default/v3-test-metadata-custom-volume
Storage volume copied successfully!
root@lxd-5:~# lxc copy v3-test-metadata lxd-5-copy:v3-test-metadata
Error: Failed migration on source: Error from migration control target: Failed to prepare device "v3-test-metadata-custom-volume" for migration: Not supported
root@lxd-5-copy:~# lxc list
+------+-------+------+------+------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+-------+------+------+------+-----------+
root@lxd-5-copy:~# lxc storage volume list default
+-----------------+--------------------------------+-------------+--------------+---------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+-----------------+--------------------------------+-------------+--------------+---------+
| custom | v3-test-metadata-custom-volume | | filesystem | 0 |
+-----------------+--------------------------------+-------------+--------------+---------+
| virtual-machine | v3-test-metadata | | block | 1 |
+-----------------+--------------------------------+-------------+--------------+---------+
Steps to reproduce
Configure two LXD and the trust between them
Create a VM
Create a custom volume
Attach the custom volume
Stop the VM
Copy the custom volume
Copy the VM and get the "Unsupported error"
Check that on the other LXD the virtual machine root volume has been created but the VM doesn't appear in the list amd cannot be deleted
@mseralessandri please can you try to detaching the volume before copying the instance over.
I confirm that detaching the volume from the vm before the copy, copying the volume, copying the vm and attaching the copied volume to the copied vm work for both lxd 6.3 and lxd 5.21.3
I had a discussion with @roosterfish, the command could allow the user to choose what to do, either a copy of both the root and custom volumes or only of the root volume. The command options could be consistent with the ones of the multivolume snapshots and restore@hamistao is working on.
Please confirm
Distribution
Ubuntu
Distribution version
Ubuntu 24.04.2 LTS
Output of "snap list --all lxd core20 core22 core24 snapd"
Output of "lxc info" or system info if it fails
Issue description
I wanted to copy a VM with an attached custom volume between two LXD.
I stopped the VM and copied successfully the custom volume. When I copied the machine, I had an "unsupported" error and the process stopped. However on the other host the virtual machine volume was created but not the instance. The virtual machine volume cannot be deleted via CLI.
This happened both on
LXD 6.3 latest/edge
and onLXD 5.21.3 LTS 5.21/stable
On one LXD 6.3
On the other LXD 6.3
Same on LXD 5.21.3 LTS
Steps to reproduce
root lxd 5 lxc config.txt
root lxd 6 lxc config.txt
Information to attach
dmesg
)lxc info NAME --show-log
)lxc config show NAME --expanded
)/var/log/lxd/lxd.log
or/var/snap/lxd/common/lxd/logs/lxd.log
)--debug
--debug
(or uselxc monitor
while reproducing the issue)The text was updated successfully, but these errors were encountered: