How can I clone VM to another node?

xsash

New Member
Oct 29, 2023
4
1
1
Hi.
I have a cluster with two nodes.

I need deploy VM to node2 from template on node1. But I can't select any storage on node2.
I don't have any network storage.
What should I do in my case?

1706027250396.png
 
  • Like
Reactions: jazini110
Cluster both nodes and you can access the resources from node1 on node2 and then simply clone the VM (or template) from node1 using Node2
 
Cluster both nodes and you can access the resources from node1 on node2 and then simply clone the VM (or template) from node1 using Node2
Given that both nodes show up in the same Datacenter in the provided UI, I'd venture to say the nodes are already clustered.
If there is no shared storage and the Template is on local storage, OP has two options:
a) Clone the template on node1, then migrate it to node2.
b) Migrate the template from node1 to node2, then clone it.

Using local storage comes with its set of restrictions and limitations.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Yep, my system is a cluster.

Doesn't the Proxmox have a simple one-step method?

I am writing automation for it and all multi-step ways of deploying a VM fom template incur additional costs/logic.
for example: two users want to deploy VM on different nodes at the same time

I'm surprised that such functionality has not yet been implemented natively
https://bugzilla.proxmox.com/show_bug.cgi?id=2059
 
Last edited:
Hi,
It is very inconvenient if clone a BIG vm on local storage to another node.
Is there any other way to achieve the goal?
it was already mentioned:
If there is no shared storage and the Template is on local storage, OP has two options:
a) Clone the template on node1, then migrate it to node2.
b) Migrate the template from node1 to node2, then clone it.
c) backup + restore (with PBS, you can use live-restore for VMs)
 
I curenntly have the situation that i have two seperate Proxmox Hypervisor running on 2 different Systems. i want to copy a template_vm from 1 proxmox hypervisor to the other one using ansible playbook and the ansible prosmox_kvm module.
is cloning a vm from one hypervisor to another one even possible and if so how can i do that?
 
I curenntly have the situation that i have two seperate Proxmox Hypervisor running on 2 different Systems. i want to copy a template_vm from 1 proxmox
You can utilize new "remote-migrate" feature (man qm):
qm remote-migrate <vmid> [<target-vmid>] <target-endpoint> --target-bridge <string> --target-storage <string> [OPTIONS]

Migrate virtual machine to a remote cluster. Creates a new migration task. EXPERIMENTAL feature!

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

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

<target-endpoint>: apitoken=<PVEAPIToken=user@realm!token=SECRET> ,host=<ADDRESS> [,fingerprint=<FINGERPRINT>] [,port=<PORT>]
Remote target endpoint

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

--delete <boolean> (default = 0)
Delete the original VM and related data after successful migration. By default the original VM is kept on the source cluster in a stopped state.

--online <boolean>
Use online/live migration if VM is running. Ignored if VM is stopped.

--target-bridge <string>
Mapping from source to target bridges. Providing only a single bridge ID maps all source bridges to that bridge. Providing the special value 1 will map each source bridge to itself.

--target-storage <string>
Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value 1 will map each source storage to itself.

Since PVE does not produce or maintain ansible modules, you are going to need to reach out to the author of those modules to inquiry about compatibility.

Good luck


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

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!