Hello all, thank you for everything you do!
I’m at the beginning of my lxc/lxd journey and I have hit a snag fairly early on.
When I try to create a vm with lxc launch ... --vm
specifying any image, I am receiving an error that I am unable to find in either the forum or elsewhere.
The error below is reached with any image, and only with the --vm
flag:
λ ~/ lxc launch -s zpool1 ubuntu:22.04 vm1 --vm
Creating vm1
Error: Failed instance creation: Failed creating instance from image: Failed to run: /usr/bin/sgdisk --move-second-header /dev/zvol/zpool1/images/439c6c7c17f94708f4ad0c47a8aec3f51c2085154159e9cbdeec0477e321517b.block: exit status 2 (Problem opening `��X for reading! Error is 2.
The specified file does not exist!)
λ ~/
λ ~/ lxc launch -s zpool1 images:archlinux/current/cloud vm1 --vm
Creating vm1
Error: Failed instance creation: Failed creating instance from image: Failed to run: /usr/bin/sgdisk --move-second-header /dev/zvol/zpool1/images/704e52924d82ffc940b7e567ec587ce3e6f682344b974aa5144bd75453d25cea.block: exit status 2 (Problem opening ��V for reading! Error is 2.
The specified file does not exist!)
λ ~/
λ ~/ lxc init -s zpool1 images:archlinux/current/cloud vm1 --vm
Creating vm1
Error: Failed instance creation: Failed creating instance from image: Failed to run: /usr/bin/sgdisk --move-second-header /dev/zvol/zpool1/images/704e52924d82ffc940b7e567ec587ce3e6f682344b974aa5144bd75453d25cea.block: exit status 2 (Problem opening ̔�U for reading! Error is 2.
The specified file does not exist!)
λ ~/
When I look in /dev/
Neither that file, nor that location exist.
Here are some of the details about my system:
OS: Arch Linux
Kernel: x86_64 Linux 6.0.7-arch1-1
CPU: AMD Ryzen Threadripper 3970X 32-Core @ 64x 3.7GHz
GPU: NVIDIA GeForce GTX 1060 6GB, NVIDIA GeForce GTX 1060 6GB
RAM: 11712MiB / 128659MiB
λ ~/ uname -a
Linux DS1 6.0.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 03 Nov 2022 18:01:58 +0000 x86_64 GNU/Linux
λ ~/
LXC/LXD versions:
λ ~/ lxc --version
5.7
λ ~/ lxd --version
5.7
λ ~/
Cached images:
λ ~/ lxc image ls
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
| ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCHITECTURE | TYPE | SIZE | UPLOAD DATE |
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
| | 3ec01db0d412 | no | Alpine 3.16 amd64 (20221112_13:00) | x86_64 | VIRTUAL-MACHINE | 123.04MB | Nov 13, 2022 at 8:40am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
| | 43a077c5261b | no | Archlinux current amd64 (20221112_04:42) | x86_64 | CONTAINER | 196.72MB | Nov 12, 2022 at 8:33pm (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
| | 439c6c7c17f9 | no | ubuntu 22.04 LTS amd64 (release) (20221101.1) | x86_64 | VIRTUAL-MACHINE | 605.25MB | Nov 14, 2022 at 2:03am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
| | 704e52924d82 | no | Archlinux current amd64 (20221113_04:18) | x86_64 | VIRTUAL-MACHINE | 546.10MB | Nov 13, 2022 at 11:04am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
| | e5c3e251eae0 | no | Archlinux current amd64 (20221113_04:18) | x86_64 | CONTAINER | 196.69MB | Nov 13, 2022 at 8:14am (UTC) |
+-------+--------------+--------+-----------------------------------------------+--------------+-----------------+----------+-------------------------------+
λ ~/
Local storage
λ ~/ lxc storage ls
+------------+--------+--------------------------------------+-------------+---------+-------------+
| NAME | DRIVER | SOURCE | DESCRIPTION | USED BY | STATE |
+------------+--------+--------------------------------------+-------------+---------+-------------+
| lxdpool | btrfs | f06e5984-bd9a-432f-9661-8b58256929f3 | | 5 | CREATED |
+------------+--------+--------------------------------------+-------------+---------+-------------+
| onexternal | btrfs | 75d66804-3000-42c1-870a-a1c80d4dad47 | | 1 | UNAVAILABLE |
+------------+--------+--------------------------------------+-------------+---------+-------------+
| zpool1 | zfs | zpool1 | | 0 | CREATED |
+------------+--------+--------------------------------------+-------------+---------+-------------+
λ ~/
λ ~/ lxc storage volume list lxdpool
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
| container | con1 | | filesystem | 1 |
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
| container | con2 | | filesystem | 1 |
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
| custom | backups | | filesystem | 1 |
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
| custom | images | | filesystem | 1 |
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
| image | e5c3e251eae02856cd8663d2d28e1df5e16e1ecf26d9d5e018b3b67bc4f9f3a9 | | filesystem | 1 |
+-----------+------------------------------------------------------------------+-------------+--------------+---------+
λ ~/ lxc storage volume list zpool1
+------+------+-------------+--------------+---------+
| TYPE | NAME | DESCRIPTION | CONTENT-TYPE | USED BY |
+------+------+-------------+--------------+---------+
λ ~/
Info about zpool1
λ ~/ lxc storage show zpool1
config:
source: zpool1
volatile.initial_source: /dev/sda2
zfs.pool_name: zpool1
description: ""
name: zpool1
driver: zfs
used_by: []
status: Created
locations:
- none
λ ~/
λ ~/ zfs list -t all
NAME USED AVAIL REFER MOUNTPOINT
zpool1 1020K 48.0G 24K legacy
zpool1/buckets 24K 48.0G 24K legacy
zpool1/containers 24K 48.0G 24K legacy
zpool1/custom 24K 48.0G 24K legacy
zpool1/deleted 144K 48.0G 24K legacy
zpool1/deleted/buckets 24K 48.0G 24K legacy
zpool1/deleted/containers 24K 48.0G 24K legacy
zpool1/deleted/custom 24K 48.0G 24K legacy
zpool1/deleted/images 24K 48.0G 24K legacy
zpool1/deleted/virtual-machines 24K 48.0G 24K legacy
zpool1/images 24K 48.0G 24K legacy
zpool1/virtual-machines 24K 48.0G 24K legacy
λ ~/
Info about both the images and the storage volumes
λ ~/ lxd sql global "SELECT * FROM images;"
+----+------------------------------------------------------------------+-----------------------------------------------+----------------+--------+--------------+----------------------+----------------------+--------------------------------+--------+--------------------------------+-------------+------------+------+
| id | fingerprint | filename | size | public | architecture | creation_date | expiry_date | upload_date | cached | last_use_date | auto_update | project_id | type |
+----+------------------------------------------------------------------+-----------------------------------------------+----------------+--------+--------------+----------------------+----------------------+--------------------------------+--------+--------------------------------+-------------+------------+------+
| 1 | 43a077c5261b9084aea6ef23e16366adb00376e669cb83e3dcdb78d4e53aed09 | lxd.tar.xz | 2.06275676e+08 | 0 | 2 | 2022-11-12T00:00:00Z | 1970-01-01T00:00:00Z | 2022-11-12T20:33:23.14027915Z | 1 | 2022-11-12T20:33:23.163458522Z | 1 | 1 | 0 |
| 2 | e5c3e251eae02856cd8663d2d28e1df5e16e1ecf26d9d5e018b3b67bc4f9f3a9 | lxd.tar.xz | 2.06242908e+08 | 0 | 2 | 2022-11-13T00:00:00Z | 1970-01-01T00:00:00Z | 2022-11-13T08:14:28.265363965Z | 1 | 2022-11-13T11:02:59.925100762Z | 1 | 1 | 0 |
| 4 | 3ec01db0d412d0a59ef1866d36980e26563c82be92a147d85396f933258b3474 | lxd.tar.xz | 1.29020712e+08 | 0 | 2 | 2022-11-12T00:00:00Z | 1970-01-01T00:00:00Z | 2022-11-13T08:40:22.061550937Z | 1 | 2022-11-13T08:40:22.083687875Z | 1 | 1 | 1 |
| 6 | 704e52924d82ffc940b7e567ec587ce3e6f682344b974aa5144bd75453d25cea | lxd.tar.xz | 5.72622428e+08 | 0 | 2 | 2022-11-13T00:00:00Z | 1970-01-01T00:00:00Z | 2022-11-13T11:04:25.503558748Z | 1 | 2022-11-14T02:52:45.42383576Z | 1 | 1 | 1 |
| 7 | 439c6c7c17f94708f4ad0c47a8aec3f51c2085154159e9cbdeec0477e321517b | ubuntu-22.04-server-cloudimg-amd64-lxd.tar.xz | 6.34651036e+08 | 0 | 2 | 2022-11-01T00:00:00Z | 2027-04-21T00:00:00Z | 2022-11-14T02:03:59.117243796Z | 1 | 2022-11-14T02:03:59.134305108Z | 1 | 1 | 1 |
+----+------------------------------------------------------------------+-----------------------------------------------+----------------+--------+--------------+----------------------+----------------------+--------------------------------+--------+--------------------------------+-------------+------------+------+
λ ~/
λ ~/ lxd sql global "SELECT * FROM storage_volumes;"
+----+------------------------------------------------------------------+-----------------+---------+------+-------------+------------+--------------+
| id | name | storage_pool_id | node_id | type | description | project_id | content_type |
+----+------------------------------------------------------------------+-----------------+---------+------+-------------+------------+--------------+
| 2 | backups | 5 | 1 | 2 | | 1 | 0 |
| 3 | images | 5 | 1 | 2 | | 1 | 0 |
| 4 | con1 | 5 | 1 | 0 | | 1 | 0 |
| 5 | e5c3e251eae02856cd8663d2d28e1df5e16e1ecf26d9d5e018b3b67bc4f9f3a9 | 5 | 1 | 1 | | 1 | 0 |
| 11 | con2 | 5 | 1 | 0 | | 1 | 0 |
+----+------------------------------------------------------------------+-----------------+---------+------+-------------+------------+--------------+
λ ~/
Local running containers
λ ~/ lxc ls
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| con1 | RUNNING | 10.190.19.88 (eth0) | fd42:f150:a392:2dc8:216:3eff:feb3:a10b (eth0) | CONTAINER | 0 |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
| con2 | RUNNING | 10.190.19.45 (eth0) | fd42:f150:a392:2dc8:216:3eff:fef6:cdf4 (eth0) | CONTAINER | 0 |
+------+---------+---------------------+-----------------------------------------------+-----------+-----------+
λ ~/
Profiles
λ ~/ lxc profile ls
+---------+---------------------+---------+
| NAME | DESCRIPTION | USED BY |
+---------+---------------------+---------+
| default | Default LXD profile | 2 |
+---------+---------------------+---------+
λ ~/
Any and all help or guidance will be appreciated!
Thank you ahead of time for anyone taking the time to read this.
-Mr. E