Cloud and Self-Hosting

Proxmox Import QCOW2: A Step-by-Step Guide

Import a qcow2 into Proxmox VE: qm disk import or import-from on the CLI, or the GUI import storage in PVE 9. Attach, set boot order and fix common errors.

By Amjid Ali · · Updated · 7 min read

In this article
  1. Quick answer (CLI, any Proxmox version)
  2. Which method should you use?
  3. Step 1: get the qcow2 onto the Proxmox host
  4. Step 2: create an empty VM
  5. Step 3a: import with qm disk import
  6. Step 3b: import and attach in one command (import-from)
  7. Step 3c: import from the web interface (Proxmox VE 9)
  8. Step 4: first boot and tidy up
  9. Troubleshooting
  10. Other formats
  11. Proxmox course on Udemy

Prefer to watch? This video walks through it step by step. Prefer to read? The full guide is below.

To import a qcow2 into Proxmox VE, copy the file to the host, create an empty VM, and run qm disk import <vmid> <file.qcow2> <storage>. The image is converted onto your storage and shows up as Unused Disk 0, which you attach as scsi0 and set as the boot disk. On Proxmox VE 9 you can also do it in the web interface: upload the qcow2 to a storage with the Import content type and select it when you add a hard disk.

I use this all the time in my homelab for cloud images (Ubuntu, Debian, Rocky), appliances that ship as qcow2, and VMs moved from plain KVM or GNS3. Here is every method, with the commands I actually run and the errors you are likely to meet.

Quick answer (CLI, any Proxmox version)

# 1. Create an empty VM (no disk) with VirtIO SCSI
qm create 105 --name myvm --memory 4096 --cores 2 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-single --ostype l26

# 2. Import the qcow2 and attach it as scsi0 in one step
qm set 105 --scsi0 local-lvm:0,import-from=/root/myvm.qcow2

# 3. Boot from it and start
qm set 105 --boot order=scsi0
qm start 105

Change 105, local-lvm and the path to suit. The rest of this guide explains each part and the GUI way.

Which method should you use?

Method Proxmox version Best for
qm set ... import-from= 7.2 and newer One command: import and attach together
qm disk import (qm importdisk) All Adding a disk to an existing VM
GUI import from an Import storage 9.0 and newer No shell access, or occasional imports
OVA/OVF import wizard 8.3 and newer Appliances that come as .ova or .ovf, see importing OVA to Proxmox

Step 1: get the qcow2 onto the Proxmox host

From Linux or macOS:

scp myvm.qcow2 root@192.168.1.10:/root/

On Windows use WinSCP or scp in PowerShell. For a cloud image, download it straight onto the host:

cd /root
wget https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

Ubuntu's .img cloud images are qcow2 inside. Check any image before you import it:

cd /root
qemu-img info myvm.qcow2
image: myvm.qcow2
file format: qcow2
virtual size: 20 GiB (21474836480 bytes)
disk size: 3.1 GiB

Note the virtual size: the target storage needs that much free space (thin storage only uses what is written, but plan for the full size).

Step 2: create an empty VM

In the GUI: Create VM, give it an ID and name, choose Do not use any media on the OS tab, and on the Disks tab delete the default disk (bin icon). Set CPU, memory and network as needed. Or on the CLI:

qm create 105 --name myvm --memory 4096 --cores 2 \
  --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-single --ostype l26

Match the firmware to the image. Most Linux cloud images boot with both, but if the qcow2 came from a UEFI VM, add --bios ovmf --efidisk0 local-lvm:1,efitype=4m and use a q35 machine type.

Step 3a: import with qm disk import

qm disk import 105 /root/myvm.qcow2 local-lvm
importing disk '/root/myvm.qcow2' to VM 105 ...
...
transferred 20.0 GiB of 20.0 GiB (100.00%)
Successfully imported disk as 'unused0:local-lvm:vm-105-disk-0'

qm importdisk 105 /root/myvm.qcow2 local-lvm does exactly the same; it is the older name, kept as an alias.

Now attach the unused disk and make it the boot disk:

qm set 105 --scsi0 local-lvm:vm-105-disk-0
qm set 105 --boot order=scsi0

Or in the GUI: VM, Hardware, double-click Unused Disk 0, choose bus SCSI, click Add; then Options > Boot Order, tick the new disk and drag it to the top.

Since Proxmox VE 8.3 you can attach during the import with --target-disk:

qm disk import 105 /root/myvm.qcow2 local-lvm --target-disk scsi0

Keeping the qcow2 format

--format only matters on file-based storage (directory, NFS, CIFS):

qm disk import 105 /root/myvm.qcow2 local --format qcow2

On LVM-thin (local-lvm), ZFS and Ceph RBD the disk is always stored as raw, so --format qcow2 there has no effect. Many older guides, including the first version of this one, used -format qcow2 with local-lvm; it does no harm but does not keep qcow2 either.

Step 3b: import and attach in one command (import-from)

The admin guide's preferred way is the import-from option, which creates, imports and attaches in one go:

qm set 105 --scsi0 local-lvm:0,import-from=/root/myvm.qcow2
qm set 105 --boot order=scsi0

local-lvm:0 means "a new volume on local-lvm, size taken from the source". You can add disk options in the same string, for example local-lvm:0,import-from=/root/myvm.qcow2,discard=on,ssd=1.

This is how I build cloud-init templates:

qm create 9000 --name ubuntu-2404-tpl --memory 2048 --net0 virtio,bridge=vmbr0 --scsihw virtio-scsi-pci
qm set 9000 --scsi0 local-lvm:0,import-from=/root/noble-server-cloudimg-amd64.img
qm set 9000 --ide2 local-lvm:cloudinit --boot order=scsi0 --serial0 socket --vga serial0
qm template 9000

Step 3c: import from the web interface (Proxmox VE 9)

Proxmox added this in two steps: 8.4 allowed uploading disk images to a storage with the Import content type, and 9.0 added importing those images into a VM from the GUI (the hardware view, the Create VM wizard and the storage content view).

  1. Enable Import on a storage. Datacenter, Storage, select local (or another directory/NFS storage), Edit, and add Import to Content. Newer installers enable it on local already.
  2. Upload the qcow2. Select the storage in the tree, open the Import tab and click Upload (or Download from URL). Files land in the storage's import/ folder, for local that is /var/lib/vz/import/, so you can also scp them there directly.
  3. Import into a VM. When you add a hard disk (VM, Hardware > Add > Hard Disk) or create the disk in the Create VM wizard, choose to import from an image and pick the qcow2 from the import storage. Pick the target storage and bus (SCSI) and add it.
  4. Set the boot order under Options and start the VM.

On the CLI the uploaded file has a volume ID like local:import/myvm.qcow2, so this also works:

qm set 105 --scsi0 local-lvm:0,import-from=local:import/myvm.qcow2

On Proxmox VE 8.3 and older there is no GUI import for plain disk images. Use Step 3a or 3b. The old trick of "upload it as an ISO and attach it" does not work, because ISO storage only accepts .iso and .img files and attaches them as CD-ROMs.

Step 4: first boot and tidy up

qm start 105
qm terminal 105   # for images with a serial console; or use the noVNC console

Once it boots:

  • Resize if needed: qm disk resize 105 scsi0 +20G, then grow the partition inside the guest.
  • Install the guest agent inside the VM (apt install qemu-guest-agent) and enable it with qm set 105 --agent enabled=1.
  • Fix the network: the NIC is new to the guest, so the interface name may change (for example eth0 to ens18). Update netplan or /etc/network/interfaces inside the VM.
  • Delete the source file when you are happy: rm /root/myvm.qcow2.

Troubleshooting

storage 'local' does not support content type 'images' (or similar). The target storage is not set up for VM disks. Pick a storage with Disk image content (local-lvm on a default install) or add Disk image to the storage's content list.

The source file is "not found" or the volume ID "cannot be parsed". The path is wrong. Give the full absolute path, for example /root/myvm.qcow2, not just the file name, unless you are in that folder.

VM shows "No bootable device" or drops into the UEFI shell. The disk is not in the boot order, or the firmware is wrong. Set Options > Boot Order. If the image was built for UEFI, switch BIOS to OVMF and add an EFI disk; if it was built for BIOS, use SeaBIOS. With OVMF, the admin guide warns that the default LSI controller is not bootable; use VirtIO SCSI.

Windows blue screen INACCESSIBLE_BOOT_DEVICE. Windows has no VirtIO storage driver yet. Attach the disk as SATA, boot, install the VirtIO drivers, then switch to SCSI.

Not enough space on the target. The import needs the full virtual size of the image (from qemu-img info), not the smaller file size. Free space or choose another storage.

Import is very slow. Conversion runs at disk speed. Copy the file to fast local storage first rather than importing over a slow network share.

Other formats

The same commands work for any format qemu-img reads, including .vmdk (VMware, VirtualBox), .vhdx/.vhd (Hyper-V) and .raw. For whole VMware appliances use the OVA wizard instead, covered in how to import OVA to Proxmox. If you are moving from VMware for good, my VMware alternatives comparison explains why Proxmox is where I ended up, and the Proxmox additional storage guide helps if you need more space for imported disks.

Proxmox course on Udemy

If you want to learn Proxmox from installation to clustering, join my Proxmox VE complete training course on Udemy.

proxmox ve guide

Frequently asked questions

How do I import a qcow2 file into Proxmox?+

Copy the .qcow2 file to the Proxmox host, create an empty VM, then run qm disk import <vmid> <file.qcow2> <storage>. The disk appears as Unused Disk 0; attach it as scsi0 and set it as the boot device. In one step you can use qm set <vmid> --scsi0 <storage>:0,import-from=/path/file.qcow2.

Can I import a qcow2 from the Proxmox web interface?+

Yes, from Proxmox VE 9.0. Enable the Import content type on a file-based storage such as local, upload the qcow2 to its Import tab (upload of disk images there arrived in 8.4), then pick it as the source when you add a hard disk or create a VM. On 8.3 and older you need the command line.

What is the difference between qm importdisk and qm disk import?+

None in practice. qm disk import is the current command name and qm importdisk is kept as an alias, so old guides still work. Both convert the image with qemu-img and add it to the VM as an unused disk.

Does Proxmox keep the disk in qcow2 format after import?+

Only on file-based storage such as local (directory), NFS or CIFS, where you can choose --format qcow2. On LVM-thin, ZFS and Ceph RBD the image is always converted to raw, because those storages hold block devices, not files.

Why does my imported qcow2 VM not boot?+

Usually the disk is still unused or not in the boot order, or the firmware does not match. Attach the disk, set boot order to it under Options, and match BIOS: use SeaBIOS for images built for legacy boot and OVMF (UEFI) with an EFI disk for UEFI images. Windows images may also need SATA instead of VirtIO until the VirtIO drivers are installed.

Sources

  1. qm(1) manual, Proxmox Server Solutions
  2. Proxmox VE Administration Guide, importing virtual machines, Proxmox Server Solutions
  3. Proxmox VE Roadmap (8.4 and 9.0 release notes), Proxmox Server Solutions

Related videos

Video library
  • Cloud and Self-Hosting

    How to Import OVA (VMware) to Proxmox Easily Without Command Line | Simple Step-by-Step Guide

    · 4:48 · 22.7K views

    Read the guide Watch on YouTube
  • Cloud and Self-Hosting

    Proxmox: How to Import an OVA File (2024 Update)

    · 13:09 · 26.9K views

    Watch on YouTube
  • Cloud and Self-Hosting

    Proxmox Import OVA // Create VM using OVF and VMDK

    · 8:01 · 47.9K views

    Read the guide Watch on YouTube