-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vz A lima _disk converted from qcow2 > raw on startup truncates to 0 bytes and can't be used in the vm. #1964
Comments
I think the issue is that the disk is being converted in-place. In my experience this doesn't work; the destination must be a new file, and you can delete the source and rename the converted copy back to the original filename after a successful copy. So yes, this means you need enough free space to temporarily store a second copy of the volume. |
It is supposed to use a temporary file (internally), but I can confirm that I also got a zero-byte file when calling the ConvertToRaw function
So must be a silent error somewhere inside |
It never worked for me. See also |
Oh, the imgutils version does NOT support it... But the nativeimgutil was supposed to do it, at least from my reading of the code. The qemu version just says the image is "locked" (by itself, I suppose) |
Ah, you are right; it should have done the right thing already. I was just going by the log message, which listed identical source and destination. So not sure why this failed then. |
I am not 100% sure it is related to this issue, but it seems related. I just had an issue with the new colima version that changed from raw format to qcow2, where the instance could not be created, after some furhter tests the same image failed to create/start the instance with the qcow2 file, but manually converting it first to raw file (using qemu-img), it works fine. See: abiosoft/colima#930 however, it is possible that issue only occurs on intel macs but not on M1/M2/M3 based macs. |
Btw. from my checks with colima 0.6.7 I did some checks on the file on the disk and it seems that the temporary filename is not changed after the disk is converted. maybe that is the issue? and the file itself seems to be in a locked state as reading it fails as well. |
what is the state regarding this issue? does anyone know if OS or latest lima update might have fixed this? don't have time currently to test this. |
Test
Outputs 0 bytes
Clean
|
Seems fixed in #2255 |
Description
A lima disk created as the default qcow2 format, and added to a vz debian 12 vm, gets truncated to 0 bytes on
limactl start vm
and the device is not usable.Here are the steps:
lima.yml for
withone
Now the disk is 0 bytes
Creating the disk with
--format raw
leads to a usable 1GB device being presented to the VM.The text was updated successfully, but these errors were encountered: