OpenNebula Import VM as sparse


Identify the VM disks

name = "pladm"
vif = [ 'bridge=vbr61,mac=zzz' ]
disk = [ 


Shut down the vm

xl shutdown pladm


Mount /var/lib/one to /mnt/one


and use the uploads directory to supply the vm image:

xyz:/xen/configs# for vbd in /dev/vgxen_raid10/pladm_* ; do
   dd if=$vbd bs=1024k | 
   cp --sparse=always /proc/self/fd/0 /mnt/one/upload/$( basename $vbd) 


Including cp with --sparse=always enforces sparsifying the image, which works better than dd conv=sparse. Apparently :-)


The following blog entry is where I learned about using cp as sparsifier:

  • No labels