Closed
Description
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:
% limactl disk create one --size 1G
INFO[0000] Creating qcow2 disk "one" with size 1GiB
% limactl disk list
NAME SIZE DIR IN-USE-BY
one 1GiB /Users/me/.lima/_disks/one
lima.yml for withone
images:
- location: 'https://cloud.debian.org/images/cloud/bookworm/20231013-1532/debian-12-genericcloud-amd64-20231013-1532.qcow2'
arch: 'x86_64'
digest: 'sha512:b2ddc01e8d13dabbcfde6661541aae92219be2d442653950f0e44613ddebaeb80dc7a83e0202c5509c5e72f4bd1f4edee4c83f35191f2562b3f31e20e9e87ec2'
- location: 'https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-genericcloud-amd64.qcow2'
arch: 'x86_64'
vmType: 'vz'
mountType: 'virtiofs'
additionalDisks:
- name: 'one'
format: false
% limact start withone
INFO[0000] Using the existing instance "withone"
INFO[0002] [hostagent] hostagent socket created at /Users/me/.lima/withone/ha.sock
INFO[0002] [hostagent] Starting VZ (hint: to watch the boot progress, see "/Users/me/.lima/withone/serial*.log")
INFO[0002] [hostagent] new connection from to
INFO[0002] [hostagent] Mounting disk "one" on "/mnt/lima-one"
INFO[0002] [hostagent] Converting "/Users/me/.lima/_disks/one/datadisk" (qcow2) to a raw disk "/Users/me/.lima/_disks/one/datadisk"
INFO[0002] [hostagent] 1.00 GiB / 1.00 GiB (100.00%) ? p/s
INFO[0003] SSH Local Port: 52309
INFO[0003] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0003] [hostagent] [VZ] - vm state change: running
INFO[0013] [hostagent] Waiting for the essential requirement 1 of 3: "ssh"
INFO[0013] [hostagent] The essential requirement 1 of 3 is satisfied
INFO[0013] [hostagent] Waiting for the essential requirement 2 of 3: "user session is ready for ssh"
<snip>
Now the disk is 0 bytes
% limactl disk list
NAME SIZE DIR IN-USE-BY
one 0B /Users/me/.lima/_disks/one withone
% limactl shell withone lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
vda 254:0 0 100G 0 disk
├─vda1 254:1 0 99.9G 0 part /
├─vda14 254:14 0 3M 0 part
└─vda15 254:15 0 124M 0 part /boot/efi
vdb 254:16 0 0B 0 disk
vdc 254:32 0 278M 1 disk /mnt/lima-cidata
Creating the disk with --format raw
leads to a usable 1GB device being presented to the VM.
% limactl --version
limactl version 0.18.0
% sw_vers
ProductName: macOS
ProductVersion: 14.0
BuildVersion: 23A344