Create a vm from qcow2

bdbionic

New Member
Nov 8, 2023
4
0
1
I have tried searching on YouTube, forums, and Google, but I couldn't find a clear solution for my issue. I have a kvm.tgz file that I extracted, resulting in two qcow2 files named disk1.qcow2 and disk2.qcow2 in my Proxmox root directory. My goal is to create a VM and attach these hard disks, but I couldn't find any straightforward options to do so.

I'm currently using Proxmox version 8.0.3 with a 3-node cluster and Ceph storage. In the "Add Hard Disk" section, I see options for "Ceph-Pool" and local HDD with the format set to RAW. Unfortunately, I can't change the format, and I haven't found an option to attach existing HDDs.

I'm relatively new to Proxmox and have been struggling to find a solution to create a VM from the qcow2 image files. I would greatly appreciate any assistance or guidance in resolving this issue. Thank you.
 
The command you are looking for looks something like this:
qm importdisk $VMID absolute/path/to/qcow $STORAGE

If you want to try to attach the disk without importing to your existing storage, you need to place the disk into appropriate location, ie:
/var/lib/vz/images/[VMID]/
You can then bring the disk in with "qm disk rescan"


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
The command you are looking for looks something like this:
qm importdisk $VMID absolute/path/to/qcow $STORAGE

If you want to try to attach the disk without importing to your existing storage, you need to place the disk into appropriate location, ie:
/var/lib/vz/images/[VMID]/
You can then bring the disk in with "qm disk rescan"


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Successfully imported disk as 'unused0:local-lvm:vm-701-disk-0' and now I can see under my hardware. May you please assist me next action. 1699475110501.png
 
Either use cli to set the disk : qm set $VMID --scsihw lsi --virtio0 $STORAGE:vm-$VMID-disk-0
Or use GUI to attach it as scsi device, for example. I think its under edit..


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Incredible, it's booting, and I've reached the CentOS login screen, so does this mean the setup is correct? Upon extracting kvm.tgz, I noticed there are two qcow2 disks; should I attach both disks to the VM? By the way, I’m at a loss for how to express my gratitude; it took me two hours to attempt this, and you managed to resolve it in just a few steps.
 
I noticed there are two qcow2 disks; should I attach both disks to the VM?
I wouldnt know what those disks contain, may be one is an OS and the other contains Data? Just attach it as second disk and examine after boot. You may need to mount it manually, or may be it will mount automatically.

I’m at a loss for how to express my gratitude; it took me two hours to attempt this, and you managed to resolve it in just a few steps.
Happy it worked for you!

Cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!