Create VM
First we need to create a new VM.
For Installation Media choose “No Media” and also there is no need to add a disk.
We just need a basic empty VM.
Upload Image File
Next you need to upload the image. There are multiple ways to do that.
Either use SCP
scp <image>.qcow2 root@<your-proxmox>:/root/
or upload it via the Webinterface.
Import the Image into the VM
Next we need to import the Image into the VM. That way it will be displayed as an unused disk.
Connect to your Proxmox Server via ssh or open the webconsole.
qm importdisk <vm-id> <your-image>.qcow2 <storage-pool>
vm-id
. This is the id of the empty VM that should use the image.storage-pool
: This is the local storage where proxmox should save the disk. The default would belocal-lvm
.
The Output should look like this
root@optiplex5070:~# qm importdisk 1141 haos_ova-12.4.qcow2 local-lvm
importing disk 'haos_ova-12.4.qcow2' to VM 1141 ...
transferred 0.0 B of 32.0 GiB (0.00%)
transferred 347.3 MiB of 32.0 GiB (1.06%)
transferred 714.3 MiB of 32.0 GiB (2.18%)
transferred 1.1 GiB of 32.0 GiB (3.38%)
transferred 1.5 GiB of 32.0 GiB (4.58%)
transferred 1.8 GiB of 32.0 GiB (5.78%)
...
transferred 30.9 GiB of 32.0 GiB (96.69%)
transferred 31.3 GiB of 32.0 GiB (97.86%)
transferred 31.7 GiB of 32.0 GiB (99.03%)
transferred 32.0 GiB of 32.0 GiB (100.00%)
transferred 32.0 GiB of 32.0 GiB (100.00%)
Successfully imported disk as 'unused0:local-lvm:vm-1141-disk-0'
Connect the Image
If you now navigate to the Hardware
-Tab of you VM, you should see an Unused Disk 0
.
Edit it, and confirm with the Add
-Button.
Now your disk is connected to the VM.
Change Boot Order
One last thing is to change the boot order. Since we had no disk, when the VM was created, the disk is the last option in the boot order and the VM will probably be stuck in PXE-Boot forever.
To fix this go to the Options
-Tab of your VM and edit Boot Order
.
Check the box Enabled
for the Disk and drag it to the top.
Start the VM
The last step is to start the VM and it should boot into your disk-image.
Troubleshooting
If your vm is stuck at Booting from Hard Drive
, try changing the BIOS from SeaBios
to OVMF
. If your Image is built for UEFI it will not boot on BIOS.