[SOLVED] Unable to clone VM across Nodes with ansible script

david.59

New Member
Feb 20, 2023
3
0
1
Hello
I am new to Proxmox and don't know a lot about it tbh.
I was able to clone VMs from one storage to another storage on one Node with my ansible script as well as just clone it to the same storage.
I tried the same but it does not work; let's say from Node1 to Node2

I have a shared storage where the template is stored (it's an iSCSI storage)

ansible version:
ansible [core 2.14.2]
config file = /home/labor/prov/ansible.cfg
configured module search path = ['/home/labor/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /home/labor/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] (/usr/bin/python3)
jinja version = 3.0.3
libyaml = True

with Proxmox Virtual Environment 6.3-2

The Error message is;

The full traceback is:
File "/tmp/ansible_proxmox_kvm_payload_v16pdh0b/ansible_proxmox_kvm_payload.zip/ansible_collections/community/general/plugins/modules/proxmox_kvm.py", line 1311, in main
File "/tmp/ansible_proxmox_kvm_payload_v16pdh0b/ansible_proxmox_kvm_payload.zip/ansible_collections/community/general/plugins/modules/proxmox_kvm.py", line 1016, in create_vm
File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 87, in post
return self(args)._request("POST", data=data)
File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 79, in _request
resp.content))
fatal: [172.16.124.90 -> 172.16.124.91]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"acpi": true,
"agent": null,
"api_host": "172.16.124.90",
"api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"api_token_id": null,
"api_token_secret": null,
"api_user": "root@pam",
"args": null,
"autostart": false,
"balloon": 0,
"bios": null,
"boot": "cnd",
"bootdisk": null,
"cicustom": null,
"cipassword": null,
"citype": null,
"ciuser": null,
"clone": "ansible",
"cores": 1,
"cpu": "kvm64",
"cpulimit": null,
"cpuunits": 1000,
"delete": null,
"description": null,
"digest": null,
"efidisk0": null,
"force": null,
"format": "raw",
"freeze": null,
"full": true,
"hostpci": null,
"hotplug": null,
"hugepages": null,
"ide": null,
"ipconfig": {
"ipconfig0": "ip=172.16.126.95/21,gw=172.16.120.1"
},
"keyboard": null,
"kvm": true,
"localtime": null,
"lock": null,
"machine": null,
"memory": 512,
"migrate_downtime": null,
"migrate_speed": null,
"name": "ansible-cloned2",
"net": {
"net0": "virtio,bridge=vmbr0,firewall=1,tag=2"
},
"newid": null,
"node": "ch-wla-pve01b",
"numa": null,
"numa_enabled": null,
"onboot": null,
"ostype": "l26",
"parallel": null,
"pool": null,
"protection": null,
"proxmox_default_behavior": "compatibility",
"reboot": null,
"revert": null,
"sata": null,
"scsi": null,
"scsihw": null,
"serial": null,
"shares": null,
"skiplock": null,
"smbios": null,
"snapname": null,
"sockets": 1,
"sshkeys": null,
"startdate": null,
"startup": null,
"state": "present",
"storage": "lvm-iSCSI",
"tablet": false,
"tags": null,
"target": null,
"tdf": null,
"template": false,
"timeout": 600,
"update": false,
"validate_certs": false,
"vcpus": null,
"vga": "std",
"virtio": {
"virtio0": "lvm-iSCSI:32"
},
"vmid": 145,
"watchdog": null
}
},
"msg": "Unable to clone vm ansible-cloned2 from vmid 145=500 Internal Server Error: b'{\"data\":null}'",
"vmid": 145
}
 
If I have a look at "/etc/pve/qemu-server/*" Node2 is unable to see the 145.conf despite saving it on a shared storage.
 
I had to use Node1 as "node1" and Node2 as "target"
Snipped:
node: "Node1"
target: "Node2"
 

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!