[SOLVED] 'qemu convert' Reports No Space Left on Device

LBX_Blackjack

Member
Jul 24, 2020
35
1
8
31
I'm trying to import a .vmdk as per the official instructions, but it keeps failing, reporting that there is no space left. This is very much not true, as there are terabytes of space in the volume group, and the .vmdk is less than 130 gigabytes.
The .vmdk is on an HDD connected via USB and mounted as /mnt/usb. The command being used is
Bash:
qemu-img convert -f vmdk /mnt/usb/old-pc/old-pc.vmdk -O qcow2 /mnt/VM_Storage/vm-100-disk-1.qcow2

At first, I was getting an error after a while stating "failed to write at byte x", but now it says
Bash:
qemu-img: /mnt/VM_Storage/vm-100-disk-1.qcow2: error while converting qcow2: Could not write qcow2 header: No space left on device

The target storage is an LVM called VMStorage_1 and is mounted as /mnt/VMStorage. All disk images for the VMs on this node reside here. I'll be the first to admit LVM is still very new to me, but as far as I can tell the volume is making use of all available space and should not be complaining. Any help towards a solution would be much appreciated, as I need to get this critical system virtualized as soon as possible.

Here is some LVM info:

Bash:
# pvs
  PV         VG          Fmt  Attr PSize    PFree
  /dev/sda3  pve         lvm2 a--  <558.38g 15.99g
  /dev/sdb   VMStorage_1 lvm2 a--    <2.73t  2.24t

Bash:
# lvs
  LV            VG          Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vm-104-disk-0 VMStorage_1 -wi-ao----   64.00g
  vm-105-disk-0 VMStorage_1 -wi-ao----   32.00g
  vm-115-disk-0 VMStorage_1 -wi-ao----   32.00g
  vm-118-disk-0 VMStorage_1 -wi-ao----   64.00g
  vm-119-disk-0 VMStorage_1 -wi-ao----   64.00g
  vm-122-disk-0 VMStorage_1 -wi-ao----   32.00g
  vm-134-disk-0 VMStorage_1 -wi-ao----   64.00g
  vm-144-disk-0 VMStorage_1 -wi-ao----   80.00g
  vm-162-disk-0 VMStorage_1 -wi-ao----   32.00g
  vm-165-disk-0 VMStorage_1 -wi-ao----   32.00g
  data          pve         twi-a-tz-- <429.61g             0.00   0.40
  root          pve         -wi-ao----   96.00g
  swap          pve         -wi-ao----    8.00g

Bash:
# vgs
  VG          #PV #LV #SN Attr   VSize    VFree
  VMStorage_1   1  10   0 wz--n-   <2.73t  2.24t
  pve           1   3   0 wz--n- <558.38g 15.99g
 
The target storage is an LVM called VMStorage_1 and is mounted as /mnt/VMStorage.

How did you do that? Can you please post your storage configuration?
Code:
cat /etc/pve/storage.cfg

It might be easier to use qm importdisk as in the guide you mentioned. There you can directly specify the LVM storage as in the storage.cfg. If you specify .qcow2 as target format in importdisk as you did in the qemu-img command then it will be ignored because .qcow2 on LVM is not supported in Proxmox VE.
 
How did you do that? Can you please post your storage configuration?
Code:
cat /etc/pve/storage.cfg

It might be easier to use qm importdisk as in the guide you mentioned. There you can directly specify the LVM storage as in the storage.cfg. If you specify .qcow2 as target format in importdisk as you did in the qemu-img command then it will be ignored because .qcow2 on LVM is not supported in Proxmox VE.

Fantastic! Thank you! I'll give that a shot an report back. I looked at the link you provided but I don't see where it says qcow2 isn't supported on LVM. I'm guessing it doesn't explicitly say that, but can be inferred by what is said?
 
How did you do that? Can you please post your storage configuration?
Code:
cat /etc/pve/storage.cfg

It might be easier to use qm importdisk as in the guide you mentioned. There you can directly specify the LVM storage as in the storage.cfg. If you specify .qcow2 as target format in importdisk as you did in the qemu-img command then it will be ignored because .qcow2 on LVM is not supported in Proxmox VE.

Update: I tried to use qm importdisk but it says that the target storage contains illegal characters. The documentation for qm doesn't seem to specify what characters are unacceptable. The target storage is /mnt/VM_Storage
 
I looked at the link you provided but I don't see where it says qcow2 isn't supported on LVM. I'm guessing it doesn't explicitly say that, but can be inferred by what is said?
Yes. The image formats column in the table contains only raw for backend LVM but it contains raw, qcow2, vmdk, subvol for Directory storages, for example :)

The documentation for qm doesn't seem to specify what characters are unacceptable. The target storage is /mnt/VM_Storage
The target storage should be the name that you see in the first column of
Code:
pvesm status
and in most places in the GUI. So not a path with /.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!