Hi,
I was facing the same issue!
I have created a VM image (8000) with a custom cloudinit config and converted it to a template which is only visible on the node where it was created.
I'm using a shared storage for images.
After some research I came to the following conclusion:
The config file for the vm-template is stored on the node in /etc/pve/qemu-server, where qemu-server is a symlink to nodes/<node>/qemu-server.
By this apprough, used by proxmox, it is normal that the template is only visible for only the node on which it was created.
Trying to copy the vm-template file to the location of ghe other nodes will result in the message that the file already exist, dispite we can not see it.
The reason for this is that the folder /etc/pve is shared over the cluster nodes, using fuse:
# mount | grep /etc/pve
/dev/fuse on /etc/pve type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
Applying a HA group config does not migrate the VM-template to another node when the node on which it was created becomes unavailable.
Resulting that we are unable to create new VM's using the VM-template on other nodes.
BTW, it is also disappointing that the clones process to another node will first create the vm on the node on which the vm-template is available and migrates it afterwards to the selected node!
Right now, the best solution I have is as follow:
- clone the vm-template with VM_ID 8000) to new VM_ID 8001 on another node.
This will result of course in a new base (OS) and vm-cloudinit image refering to the new VM_ID.
- convert the new VM_ID to a template
- ssh on the node where the template has been cloned to:
edit the file in /etc/pve/qemu-server/8001.conf
change following in the file for the base (OS) and clouninit image, in my case the lines starting with ide2 and scsi0:
- 8001/vm-8001-cloudinit.qcow2
- 8001/base-8001-disk-0.qcow2
replace for both lines the new VM_ID 8001 by the initial VM_ID 8000.
The new vm-template 8001 will now make use of the base (OS) and cloudinit images of the initial vm-template 8000
- The base and cloudinit images for the new vm-template 8001 can now be removed safely.
You can not remove them from the web-interface -> selecting the storage for images, as it will result in an error that the image is assigned to the VM-ID and can not be removed.
However, you can safely remove the folder (new VM_ID 8001) from your shared storage.
This way, you only use disk-space for one single base and cloudinit image.
- Apply the same procedure for cloning the vm-template to other nodes when needed
Hope this is usefull for others, untill proxmox provides a solution to make one single vm-template available for all n odes or allow admins to select nodes on which it should become available for use.