`import-from` directive ignores `format=qcow2` and creates `raw` image

May 22, 2020
17
2
23
54
I am using `import-from` when create a VM or changing the assigned disk, and the imported disk images are always `raw`, wasting lots of space for templates.

Using `qm set <vmid> --scsi0 "<storage>,import-from=<image>,format=qcow2"` creates a `raw` image, and ignores the `qcow2` format request.

Strangely, when I tried `qm disk import <vmid> <source> <storage> --format=qcow2` it also created a `raw` image, so I do not know if the issue is my storage config or the `import-from` directive.

For automation and scripting it is much easier to use the `import-from` directive as I do not need to keep track of the disk names and numbers that are dynamically generated by `qm disk import`.

Storage is on ZFS, so per docs qcow2 should be supported?

How can I get `import-from` to honor the `format` flag?

Update:
I experimented with the GUI and found that QCOW2 is only and option for directory storage, ZFS is always raw.
I then tested the `import-from` directive and the format option was also honored as long as I used directory storage, not ZFS.
Consider this resolved.
 
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!