Technical

Proxmox add USB stick image as ISO: import a ready-made .img with qm importdisk

Proxmox add USB stick image as ISO: import a ready-made .img with qm importdisk

Proxmox add USB stick image as ISO? You can’t just upload a .img and boot it like an ISO. But you don’t need to convert it either. Upload the raw image to your storage, then use qm importdisk to attach it to a VM as a disk. That’s the whole trick.

Internal view of a hard disk drive revealing its disk platter and read/write head for data storage.

Why ISO conversion is a waste of time

Ready-made USB images are usually raw disk dumps, not ISO files. Converting a raw image to ISO with something like genisoimage almost never works because the image already contains a partition table and bootloader. The VM won’t boot from it as a CD-ROM. You need to treat it as a hard disk, not an optical disc.

Upload the image to Proxmox storage

First, get the .img (or .img.gz) file onto your Proxmox host. You can use the web UI: select your storage, go to ISO Images or Disk Images and click Upload. But for large files, SCP is faster:

scp your-image.img root@pve:/var/lib/vz/template/iso/

If it’s gzipped, decompress it first:

gunzip your-image.img.gz

Proxmox doesn’t care about the extension, but keeping it as .img makes it clear it’s a raw disk.

An open vintage Seagate ST-412 hard drive showcasing its internal components.

Import the image as a VM disk

Create a VM with no disks (or just note the VM ID). Then run:

qm importdisk 100 /var/lib/vz/template/iso/your-image.img local-lvm

Replace 100 with your VM ID and local-lvm with your storage name. This converts the raw image into a disk image in the VM’s storage and attaches it as an unused disk.

Now go to the VM’s Hardware tab, find the unused disk, and add it. Set the bus type to SATA or VirtIO, depending on what the image expects. Most ready-made images assume SATA or IDE, so if it doesn’t boot with VirtIO, switch to SATA.

Boot and fix what breaks

Set the boot order to the new disk and start the VM. If you get a kernel panic or missing root device, the image probably expects a specific disk controller. Change the bus type and try again. Also check if the image uses BIOS or UEFI — many ARM images need UEFI, so set the BIOS accordingly.

If the image was meant for a USB stick, it might have a serial console enabled. Use qm terminal 100 to see output if the VNC console is blank.

My take

This is way less painful than trying to convert to ISO. The qm importdisk command is there for exactly this. The only gotcha is the disk bus type — most guides skip that and then you’re stuck at a black screen. If you’ve dealt with unsupported image types before, you know the drill. If not, check this post on fixing unsupported image types — same kind of issue.

Leave a comment

Comments are reviewed before they appear. Your email is never published.