[SOLVED] Proxmox Ceph. Clone Templates Between nodes

rrb

New Member
Apr 19, 2023
3
0
1
Hello community,

My first post here.

I have been searching on the subject and the posts I have seen on the forum and by search engines on the subject have not finished me clarify my doubt.

To put in context. I have 3 PVE Nodes in Cluster with CEPH as backend storage for the VMs.

In the ceph pool I have VM templates to clone. The template looks assigned to a node (pve03) even though it is in the distributed filesystem. The problem comes that when I try to clone (linked clone and full) the template from that storage . It only allows me to clone it on the same node and not to other nodes. Is this the expected behavior? Is there any scenario where templates can be defined centrally and cloned (preferably linked clone) to any node?

1708687193723.pngclone-from-pve03-to-pve111708687350082.png

Thanks,

Code:
pve-manager/8.1.4/ec5affc9e41f1d79 (running kernel: 6.5.11-8-pve)
ceph version 18.2.1 (850293cdaae6621945e1191aa8c28ea2918269c3) reef (stable)


Edit: Solved. Share storage CEPH allow to create linked clones between nodes. if someone comes to this post, let them know that even if the comments say it is not possible, it is.
In my case the problem was that I had atached an iso to the template. This iso was stored in a local storage, that is why Proxmox did not allow to clone from the template. I want to point out that even though bbgeek17 says that the GUI does not implement it, it does. Also say that it is not necessary to clone the VM and migrate it previously to perform the cloning. Just to clarify it and not to create confusion.
 
Last edited:
I believe clone to the node that owns template is the current constraint. You'll have to migrate the clone to the node of your choosing or move the template prior to cloning. I dont know if enhancement request is opened to change the behavior. You can check here https://bugzilla.proxmox.com and open one if you wish.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Hi bbgeek17, thanks for your suggestion.

According to your comment it is not possible to clone templates between nodes from a distributed CEPH storage.

Regarding the second question. Are there other distributed file systems compatible with Proxmox that support cloning templates between nodes? What do people usually do for this type of scenarios?
 
Regarding the second question. Are there other distributed file systems compatible with Proxmox that support cloning templates between nodes? What do people usually do for this type of scenarios?
This is not a storage restriction. In fact, I forgot that this is a UI limitation only. As you can imagine exposing every nuke of CLI in UI makes it very sprawling.
The CLI allows you to do what you want:
Code:
       qm clone <vmid> <newid> [OPTIONS]

       Create a copy of virtual machine/template.

       <vmid>: <integer> (100 - 999999999)
           The (unique) ID of the VM.

       <newid>: <integer> (100 - 999999999)
           VMID for the clone.

       --bwlimit <integer> (0 - N) (default = clone limit from datacenter or storage config)
           Override I/O bandwidth limit (in KiB/s).

       --description <string>
           Description for the new VM.

       --format <qcow2 | raw | vmdk>
           Target format for file storage. Only valid for full clone.

       --full <boolean>
           Create a full copy of all disks. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.

       --name <string>
           Set a name for the new VM.

       --pool <string>
           Add the new VM to the specified pool.

       --snapname <string>
           The name of the snapshot.

       --storage <string>
           Target storage for full clone.

       --target <string>
           Target node. Only allowed if the original VM is on shared storage.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
templates have a lot of limitations. you will find that using an actual VM as your template works better than the template object in almost every way.
 
templates have a lot of limitations. you will find that using an actual VM as your template works better than the template object in almost every way.
Using a VM as a template is not the most suitable. The cloning time is excessive and you duplicate the same bytes over and over again taking up storage space unnecessarily. I don't see the option of cloning VMs as templates as viable, but thanks for your point of view.

This is not a storage restriction. In fact, I forgot that this is a UI limitation only. As you can imagine exposing every nuke of CLI in UI makes it very sprawling.
The CLI allows you to do what you want:
Code:
       qm clone <vmid> <newid> [OPTIONS]

       Create a copy of virtual machine/template.

       <vmid>: <integer> (100 - 999999999)
           The (unique) ID of the VM.

       <newid>: <integer> (100 - 999999999)
           VMID for the clone.

       --bwlimit <integer> (0 - N) (default = clone limit from datacenter or storage config)
           Override I/O bandwidth limit (in KiB/s).

       --description <string>
           Description for the new VM.

       --format <qcow2 | raw | vmdk>
           Target format for file storage. Only valid for full clone.

       --full <boolean>
           Create a full copy of all disks. This is always done when you clone a normal VM. For VM templates, we try to create a linked clone by default.

       --name <string>
           Set a name for the new VM.

       --pool <string>
           Add the new VM to the specified pool.

       --snapname <string>
           The name of the snapshot.

       --storage <string>
           Target storage for full clone.

       --target <string>
           Target node. Only allowed if the original VM is on shared storage.



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
I think im missing something. When try to clone a template from a node03 to node11 i get the following results:

Bash:
root@pve03:~# qm clone 101 102 --full false --name linkedbtnodes --target pve11
can't clone VM to node 'pve11' (VM uses local storage)

Template configuration file:
INI:
cat /etc/pve/nodes/pve03/qemu-server/101.conf
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: local:iso/debian-live-12.5.0-amd64-cinnamon.iso,media=cdrom,size=3303104K  # <---
memory: 512
meta: creation-qemu=8.1.5,ctime=1708607814
name: template-test
net0: virtio=BC:24:11:67:C8:9D,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: dev-distributed-pool:base-101-disk-0,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=f3ff2857-3e43-4094-9602-12297dd3e71f
sockets: 1
template: 1
vmgenid: a443751b-f98b-4b38-8ca1-bb5881c2dfed

Ohh... Ok i find the issue. I had a ISO attached on the template... And the ISO was stored on a local storage. When the iso is removed from the template its possible to clone the template to other nodes as linked clone.
 

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!