Import of qcow2 images to Proxmox

rakeshgsharmag

New Member
Jul 13, 2023
6
1
3
I have a big qcow2 image on drive and want to run it in Proxmox VM. Is it possible to run it without qm disk import command?
The command takes almost 12 hrs to import the image.
 
You did not say which drive the qcow is on. If its on the same disk where your other data is located, you can just :
"mv file.qcow /var/lib/vz/images/[VMID]/"
optionally: mv file.qcow vm-[vmid]-disk-[counter].qcow
qm set [vmid] --scsi[counter] local:vm-[vmid]-disk-[counter].qcow
or if you didnt rename: qm set [vmid] --scsi[counter] local:file.qcow

However, if your qcow is on a different disk and you want to keep it there, then perhaps the solution is to add the disk as storage location in PVE, mark it available for "image" storage, place the file in appropriate structure and then add it to VM in a similar fashion as above.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Once the file is in the location where a storage is configured, you could also run qm rescan and it should show up as an unused disk, if the name follows the vm-{vmid}-{other stuff} schema.
 
  • Like
Reactions: MON@H and bbgeek17
Thank you for the prompt response but could you please explain it in more details.
Here is the steps I followed.
I have images in folder /mnt/pve/NFS

Step 1) I have created soft link : ln -s /mnt/pve/NFS/VMS/CM3/Med.qcow2 vm-101-disk-1.qcow
My VMID is 101
Step 2) Run the Set command: qm set 101 --scsi1 local:vm-101-disk-1.qcow2

After running its giving error: unable to parse directory volume name 'vm-101-disk-1.qcow2'
unable to parse directory volume name 'vm-101-disk-1.qcow2'
Also tried with brackets but did not worked : unable to parse directory volume name 'vm-[101]-disk-[1].qcow'

Please suggest where exactly I am writing wrong command. Also tried with --scsi 0 but same result.
 
1) you dont need a link
2) it seems that you storage is not called "local". That was just an example, its always a good practice to make sure you understand the naming before running anything you see on the internet. It seems that your storage may be called "NFS.
Note that it is an assumption, based on the path you posted. Check your /etc/pve/storage.cfg and "pvesm status" for proper naming.
3) the path is wrong. If your NFS is setup for "content images", then it must contain path "images/[VMID]/". It will be created for you by PVE when a new qcow is created by PVE. Otherwise you need to create it manually.
See here for reference: https://pve.proxmox.com/wiki/Storage:_Directory


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

I followed the instruction and created folder under NFS. folder name in 101 and image inside it is vm-101-disk-0.qcow2.
Created new VM Os as do not use any media. Storage is NFS and format is QEMU image type.
Hard disk on the VM shows below configuration. File present in path: /mnt/pve/NFS.101/vm-101-disk-0.qcow2.
1689318764200.png

Still I am getting error:

1689318845592.png

Could you please suggest the solution or what exactly is wrong here. I am new to proxmox so please bear with me for silly mistakes.
 
A Virtual Machine is a computer, it needs a properly installed Operating System. It appears that the disk you were trying to attach either does not have OS on it, or the OS is not compatible with virtualization, or its broken.
You will probably be better served by installing new OS on a different disk (do make sure you dont overwrite your important disk). Which OS you install depends on many factors, including familiarity and desired functionality.

It seems to me that you are at the very beginning of your virtualization journey, in which case youtube has many tutorials that may help, google "youtube proxmox vm installation".

P.S. I suggest being extra careful with your disk and VM manipulations. By default when removing the VM the disks are also removed. Experiment on a different VM and then move the disk when ready.


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

Thanks for reply.
Let me explain it one more time, The Image which I am trying is working perfectly fine on my other VM, as well as when I import it in Proxmos.
I do not have enough space and it takes lot of time in importing. I have 15 images and some of them are of size more than 4TB.
I am evaluating proxmox so that I can move my whole infra on it.

What I am trying to explain here is, it has OS and everything. Its a working image with SAP software running on it.
If you could guide to boot this image I will be able to complete my experiment as I thing Proxmox is the right solution.
Really appreciate your help here, Do let me know how should I do that again please.
I will push step by step results here so that we fix this asap.
 
Last edited:
The Image which I am trying is working perfectly fine on my other VM, as well as when I import it in Proxmos.
What I am trying to explain here is, it has OS and everything. Its a working image with SAP software running on it.
Thank you for providing this new information.

If you could guide to boot this image
I can try to point you in the right direction. Most of the assistance provided in the forum is from volunteers. Proxmox staff participates as well, but they cant address every question. If you need dedicated support you should work with a Proxmox specialist partner or buy a subscription that comes with access to Support.

As to your issue, here are a few commands that you should run and perhaps provide full output back to the forum:
- Start with examining the image: qemu-img info [image-name]
- Review VM configuration: qm config [vmid]
- Confirm your storage is accessible: pvesm status
- Confirm the disk is found: pvesm list NFS --content images
- Examine your disk to confirm that it contains the data you think it should (steps 1,2,3,5) https://gist.github.com/shamil/62935d9b456a6f9877b5

Based on the information above, there may be other steps.

Good luck.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: huzgrisyon
I cant tell what you have going on...

You previously posted a screenshot of a disk in VM101. You are now posting VM100.

The disk virtual size is 500GB, however its physical size is 78mb. Which indicates that its mostly or completely empty/zero. 500G is not that large, is that the file that was taking you 12 hours to import?

Is there a reason you skipped the last point?

Also, I recommend using text copy/paste with CODE tags instead of images.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Thank you for support. I figured out what was going wrong and able to use the image from NFS. In my case I was first doing the copy of qcow2 file at specific location ex: images/101/vm-100-disk-0.qcow2 and after that I was create a VM and setting up path. Once I create a VM the image was getting overwritten and causing the issue. This time I tried after creating VM and then placing qcow2 file at right location did work fine.

Thanks for much needed support.
 
  • Like
Reactions: bbgeek17

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!