accidentally converted vm to template

A G

New Member
Aug 2, 2017
2
0
1
29
Hello,

I am new to proxmox an accidentally converted a vm to a template. After searching on the internet i found a solution. The solution is to clone the vm and install it again, Only my vm is 2 TB big and i only have 1 TB of free space left. Does anyone have a solution for this problem? Is there no way to revert the template to a normal vm?

Thanks in advance
 
Note that the template creation will also have renamed your disks to reflect the fact that they may become the base volume for new VMs. You should undo this change as well, but this is a bit more involved and depends on the storage. (Usually the name changes from eg. `vm-100-disk-1` to `base-100-disk-1`.)
You can take a look at the "Rename/Move the disk" step in the "Moving disk image from one KVM machine to another"[1] wiki page.
Be careful if you do this, and note that the VM configuration needs to be updated as well.

[1] https://pve.proxmox.com/wiki/Moving_disk_image_from_one_KVM_machine_to_another
 
just ran into that myself. in my setup the image was an LVM volume and i had to set it to read-writeable again after removing the template keyword from the config:

lvchange -p rw /dev/vmdisks/base-108-disk-0

cheers
Pascal
 
  • Like
Reactions: anpjohn
open the conf file for the vm found under /etc/pve/qemu-server and delete the line 'template: 1'.
thanks, I have done this and exited the template interface and returned to the vm interface but when it starts it does nothing and this error appears in the log

Code:
kvm: -device scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100: The device is not writable: Permission denied
TASK ERROR: start failed: QEMU exited with code 1

I don't know how it was before but now in 100.conf I get something like this
scsi0: local-lvm:base-100-disk-0,cache=writethrough,size=25G

and I have changed it to several example forms
scsi0: local-lvm:vm-100-disk-0,cache=writethrough,size=25G
scsi0: local-lvm:vm-100-disk-1,cache=writethrough,size=25G
and dont work

Psuter said:
just ran into that myself. in my setup the image was an LVM volume and i had to set it to read-writeable again after removing the template keyword from the config:

lvchange -p rw /dev/vmdisks/base-108-disk-0
I think I'm having problems with permissions too... but my vm was in the local-lvm (thin)
 
just ran into that myself. in my setup the image was an LVM volume and i had to set it to read-writeable again after removing the template keyword from the config:

lvchange -p rw /dev/vmdisks/base-108-disk-0

cheers
Pascal

I spent about 3 hours trying to find this command. You are the reason I was able to sleep last night!
 
  • Like
Reactions: dnoriega

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!