Template Conversion Issue - Base Disks not Created

joshua60111

New Member
Sep 13, 2024
2
0
1
Hi all,
I'm new to Proxmox and am having trouble creating a template for a Ubuntu VM:

I'm using Proxmox 7.4-3, the VM is Ubuntu 24-04 straight from osboxes.org.
I converted the .vmdk to .qcow2 with qemu and uploaded it to /var/lib/vz/images/102 and assigned the image to a disk with:
qm set 102 --scsi1 local:102/Ubuntu.qcow2 - Which works fine and boots no problem.

However, when I try to convert this machine to a template I get the following error:
root@pve:~# qm template 102
file '/var/lib/vz/images/102/Ubuntu.qcow2' already exists

No base disks are created, and although the VM is now marked as a template in the GUI I can't create any linked clones:
1726433366891.png

VM config before converting to template:
root@pve:~# qm config 102
boot: order=scsi1;ide2;net0
cores: 2
ide2: none,media=cdrom
memory: 4096
meta: creation-qemu=7.2.0,ctime=1726431596
name: UbuntuTest2
net0: rtl8139=E2:CF:88:2F:90:7C,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi1: local:102/Ubuntu.qcow2,size=500G
scsihw: virtio-scsi-single
smbios1: uuid=690abadb-f6f3-495c-9b93-384d4c2d4d4a
sockets: 1
vmgenid: 2dc760dd-38fd-429d-900c-f5c0da17ae3c
root@pve:~#

After converting to template:
root@pve:~# qm config 102
boot: order=scsi1;ide2;net0
cores: 2
ide2: none,media=cdrom
memory: 4096
meta: creation-qemu=7.2.0,ctime=1726431596
name: UbuntuTest2
net0: rtl8139=E2:CF:88:2F:90:7C,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi1: local:102/Ubuntu.qcow2,size=500G
scsihw: virtio-scsi-single
smbios1: uuid=690abadb-f6f3-495c-9b93-384d4c2d4d4a
sockets: 1
template: 1
vmgenid: 2dc760dd-38fd-429d-900c-f5c0da17ae3c

Any help would be appreciated. I'm probably doing something incredibly stupid.
Thanks in advance.
 
Dont use custom names for your disks.

You have two options to try:
- Even though you'd be converting qcow to qcow, import the original disk from the start: qm disk import
- Or, rename "ubuntu.qcow" to name that conforms to PVE disk naming standards: vm-[id]-disk-[counter] before you "set" it.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: joshua60111
Dont use custom names for your disks.

You have two options to try:
- Even though you'd be converting qcow to qcow, import the original disk from the start: qm disk import
- Or, rename "ubuntu.qcow" to name that conforms to PVE disk naming standards: vm-[id]-disk-[counter] before you "set" it.


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

Uploading disk images in the format 'vm-<VMID>-disk-<ID>.qcow2' worked perfectly.
I could then use qm set 102 --scsi1 local:102/vm-102-disk-1.qcow2 and convert the machine to a template.

When I tried using importdisk, it automatically converted the image to .raw even though I uploaded as .qcow2. I don't think .raw works with templates so this solution didn't work for me - but the above solved my problem!
root@pve:~# qm importdisk 102 UbuntuTest2-102-disk-001.qcow2 local
importing disk 'UbuntuTest2-102-disk-001.qcow2' to VM 102 ...
Formatting '/var/lib/vz/images/102/vm-102-disk-0.raw', fmt=raw size=536870912000 preallocation=off

Thanks again!
 

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!