Unable to provision a virtual machine on local storage by cloning a template from a shared storage

JohnDoes

New Member
Sep 29, 2018
10
0
1
49
Hi

We have 2 nodes (Prox1 and Prox2) in a cluster. Each node has local-lvm LVM for KVM guests and shared NFS mount for templates available on both nodes.

Prox1 storage:
- Local LVM
- shared NFS mount

Prox2 storage:
- Local LVM
- shared NFS mount

The templates are located on Prox1 on the NFS storage. When cloning a template from Prox1 to Prox2 the only option for 'Target storage' is the shared NFS storage, which is a deal-breaker for us.

Is it possible to clone a template from one node to another if the destination storage is not shared (i.e. not available on the source node)? Are we doing something wrong?

In our case we want to clone a template from Prox 1 stored on the shared NFS mount to Prox 2 on the local LVM. This is required in order to use commercially available billing software that lists the templates from a single common location (the shared NFS mount) on the order form and provisions the KVM virtual server on the first available node on it’s local LVM storage.

Thanks.

JD
 
Only with a full clone, you can change the target storage.
 
there is only one option (NFS) where the template is, as a destination for the full clone, no mention of the local storage. See the attached image.
 

Attachments

  • clone.jpg
    clone.jpg
    49.7 KB · Views: 15
Are your storages restricted to nodes or content? In either case you wouldn't see them in the selection.
 
If we are unable to see them in the selection, then how are we supposed to full clone a template from a shared (NFS) storage to the local storage on the node? The node lists both NFS and local storage as storages. Is there some special way to accomplish this without using the web interface?
 
Please post the /etc/pve/storage.cfg.
 
we have also experienced this on latest 8.0.3.

here how to duplicate it

three nodes in a cluster
all have local storage (btfs local mounts in our case, but normal local-lvm will have the same issue), not marked as shared
all have access to the same shared NFS store.

the template id:'9000' exists on the first node, the disks in the template are stored on the shared nfs store. (using https://pve.proxmox.com/wiki/Cloud-Init_Support#_preparing_cloud_init_templates as an example)

if we try and clone the template (from node1) and change the target to another host (node2) the only option that will appear in the target storage list is the shared nfs mount (even with full clone option selected). we would like to be able to select the local storage on the destination host rather than the shared nfs share. our usecase is high speed local storage, we only want the nfs mount as a shared storage medium for templates.

/etc/pve/storage.cfg:
Code:
dir: local
    disable
    path /var/lib/vz
    content backup,vztmpl,iso
    shared 0

lvmthin: local-lvm
    disable
    thinpool data
    vgname pve
    content images,rootdir

btrfs: testnode1-btrfs
    path /local_nvme
    content images,rootdir,iso
    nodes testnode1
    prune-backups keep-all=1

btrfs: testnode2-btrfs
    path /local_nvme
    content iso,rootdir,images
    nodes testnode2
    prune-backups keep-all=1

btrfs: testnode3-btrfs
    path /local_nvme
    content rootdir,iso,images
    nodes testnode3
    prune-backups keep-all=1

nfs: pbs_template_store
    export /mnt/pbsnfsshare
    path /mnt/pve/pbs_template_store
    server <REDACTEDIP>
    content images,iso
    prune-backups keep-all=1

related bug report: https://bugzilla.proxmox.com/show_bug.cgi?id=2059
 
Last edited:

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!