Clone a Nutanix VM through Prism Central and optionally adjust CPU, RAM, VLAN, description, and power state.
- Finds source VM by name
- Creates target VM from source spec
- Removes source UUID, MAC addresses, and IP endpoints
- Optionally changes CPU, RAM, VLAN, and description
- Supports dry-run mode
Edit nutanix_vm_clone.py:
NTNX_PRISMCENTRAL_IP = "YOUR_IP:9440"
PC_TOKEN = "YOUR GENERATED TOKEN FROM nutanix_auth.py"
SUBNET_UUIDS = {...}python nutanix_vm_clone.py --source template01 --name server-new-01 --dry-run
python nutanix_vm_clone.py --source template01 --name server-new-01 --cpu 4 --ram 8 --vlan 80 --power onAlways review the dry-run payload first. Do not commit real tokens, UUIDs, IP addresses, or internal details.
Example script. Test in a safe environment before production use.