Create a new VM from an existing QCOW2 image

0badc0de

Member
May 3, 2018
25
0
21
57
I am on PVE v6.3-4
I need to create a VM from an existing QCOW2 image I already have in an LVM storage.
Can I do this from web UI instead of figuring it out from the CLI?

I see there's some documentation here.
 
Last edited:
hi,

you can create a VM and attach that qcow2 disk to it on the GUI.
 
hi,

you can create a VM and attach that qcow2 disk to it on the GUI.
I wasn't able to create a VM with custom boot volume.
And I cannot choose a specific image file, only storage pool.
 

Attachments

  • SHOT-20210309_123501.png
    SHOT-20210309_123501.png
    47.8 KB · Views: 87
  • SHOT-20210309_123644.png
    SHOT-20210309_123644.png
    35.9 KB · Views: 80
Last edited:
i guess the easiest way would be on the command line by editing the VM configuration manually. this is located in /etc/pve/qemu-server/VMID.conf.

you can create a basic VM with the default settings by following the wizard, and then edit the config file to point to your chosen disk instead.
 
i guess the easiest way would be on the command line by editing the VM configuration manually. this is located in /etc/pve/qemu-server/VMID.conf.

you can create a basic VM with the default settings by following the wizard, and then edit the config file to point to your chosen disk instead.
This is exactly what I was trying to avoid: manual editing of configuration files.
I would then prefer to use the qm CLI tool.
I thought it was possible from the GUI, as you said.
 
Last edited:
Hi.
It looks like that "qm importdisk" command only works with an existing VMID. Is this my correct understanding?
yes, you can create an empty VM with the settings you want on the GUI and then run importdisk to add the disk in it
 
yes, you can create an empty VM with the settings you want on the GUI and then run importdisk to add the disk in it
Looks like a weird import, but I can live with that. Thanks.
Then, what about changing the boot volume with qm tool instead of manual editing? Will this work?