How do I disable preallocation for cloning?

troutpocket

New Member
Jan 5, 2022
1
0
1
50
I have a fairly large VM I use as a template (500GB and 1TB volumes). It is stored on a NFS attached node. In an attempt to clone it I got the following error:

create full clone of drive sata1 (HDD:101/vm-101-disk-1.qcow2)
Formatting '/mnt/pve/HDD/images/203/vm-203-disk-0.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=1099511627776 lazy_refcounts=off refcount_bits=16
TASK ERROR: clone failed: unable to create image: 'storage-HDD'-locked command timed out - aborting

I found in another thread that suggests turning off preallocation for the clone process. I installed the testing packages mentioned in the thread by adding the "testing" repository to apt (libpve-storage-perl-7.0-15).

How do I turn preallocation off to (hopefully) successfully clone this VM?
 
How do I turn preallocation off to (hopefully) successfully clone this VM?
You can either run pvesm set <storage> --preallocation off or set it from the "advanced" options of the edit storage window.
 
Sorry not to take over a thread, but if we disable preallocation after the fact the NFS storage has been built and currently in use? Will that effect current VM's in away? Could this be disastrous? What is preallocation for?
preallocation occur only at disk/vm creation. So I'll not change current vms.
preallocaiton reserve space on disk, and for some storage or disk format like qcow2, it can improve performance on first block write because metadatas are already pre-allocated.
 

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!