Closed candlerb closed 4 months ago
Detection isn't really an option as we may need to read a significant amount of data to determine that and it would quite significantly increase the complexity of what's supposed to be a very small tool that can be built and distributed statically.
But we can certainly make the prompt clearer about image files.
Detection isn't really an option as we may need to read a significant amount of data to determine that
Not very much I think. magic.mgc is able to detect it:
$ file /home/nsrc/nsrc-vm/output/nsrc-nmm.qcow2
/home/nsrc/nsrc-vm/output/nsrc-nmm.qcow2: QEMU QCOW2 Image (v3), 53687091200 bytes
$
Or:
$ qemu-img info /home/nsrc/nsrc-vm/output/nsrc-nmm.qcow2
image: /home/nsrc/nsrc-vm/output/nsrc-nmm.qcow2
file format: qcow2
virtual size: 50 GiB (53687091200 bytes)
disk size: 2.08 GiB
cluster_size: 65536
Format specific information:
compat: 1.1
compression type: zlib
lazy refcounts: false
refcount bits: 16
corrupt: false
extended l2: false
$
Required information
Issue description
When you pass a qcow2 image to
bin.linux.incus-migrate.x86_64
, AFAICT it treats it as a raw image. At least, the symptom is that the image is quietly accepted and migration appears to be successful, but it won't boot.Steps to reproduce
Now migrate:
Now attempt to boot:
Check config:
Then I repeated the process, but converting to a raw image first:
Observation
At minimum, incus-migrate could provide a warning message saying that any image provided must be raw.
Ideally it should detect these other image formats, and either offer to convert them to raw, or reject.
Information to attach
dmesg
)incus info NAME --show-log
)incus config show NAME --expanded
)incus monitor --pretty
while reproducing the issue)