Nutanix export virtual machines

From Fvettore-WIKI
Revision as of 09:57, 21 July 2025 by Administrator (talk | contribs) (Created page with "== Classic Export == Example: `MONITORING.CIFARELLI.LOC` ACCESS THE CLUSTER VIA SSH <pre> acli vm.get MONITORING.CIFARELLI.LOC include_vmdisk_paths=1 | grep -E 'disk_list|vmdisk_nfs_path|vmdisk_size|vmdisk_uuid' </pre> The result is something like: <pre> nutanix@NTNX-CZ29500B2V-A-CVM:10.0.1.4:~$ acli vm.get MONITORING.CIFARELLI.LOC include_vmdisk_paths=1 | grep -E 'disk_list|vmdisk_nfs_path|vmdisk_size|vmdisk_uuid' disk_list { vmdisk_nfs_path: "/default-co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Classic Export

Example: `MONITORING.CIFARELLI.LOC` ACCESS THE CLUSTER VIA SSH

 acli vm.get MONITORING.CIFARELLI.LOC include_vmdisk_paths=1 | grep -E 'disk_list|vmdisk_nfs_path|vmdisk_size|vmdisk_uuid'

The result is something like:

 nutanix@NTNX-CZ29500B2V-A-CVM:10.0.1.4:~$ acli vm.get MONITORING.CIFARELLI.LOC include_vmdisk_paths=1 | grep -E 'disk_list|vmdisk_nfs_path|vmdisk_size|vmdisk_uuid'
    disk_list {
      vmdisk_nfs_path: "/default-container-4720327164551/.acropolis/vmdisk/6825bd1f-fe03-4490-94a2-205cfdd25d80"
      vmdisk_size: 214748364800
      vmdisk_uuid: "6825bd1f-fe03-4490-94a2-205cfdd25d80"
    disk_list {

Take note of the path.


From a Linux machine:

 sftp -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa -o Port=2222 admin@10.0.0.10

If you get a crypto error:

 update-crypto-policies --show

Take note of the policy: it must be restored afterward.

Temporarily set the policy:

 update-crypto-policies --set DEFAULT:SHA1

This should make it compatible with the old protocol. Then:

 sftp -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedAlgorithms=+ssh-rsa -o Port=2222 admin@10.0.0.10
 admin@10.0.0.10's password:
 Connected to 10.0.0.10.
 sftp> get /default-container-4720327164551/.acropolis/vmdisk/6825bd1f-fe03-4490-94a2-205cfdd25d80

Or, more compactly:

 scp -P2222 admin@10.0.0.10:/default-container-4720327164551/.acropolis/vmdisk/6825bd1f-fe03-4490-94a2-205cfdd25d80 .

Run inside a `screen` session as it can take several hours.

\== Alternative Method == An OVA export utility is now available in Prism Central.
Follow the instructions here: [1](https://portal.nutanix.com/page/documents/details?targetId=Prism-Central-Guide-vpc_2024_2:mul-vm-export-as-ova-pc-t.html)
Once complete, go to OVAs (type it in the application selector), select the export, and copy the export link.

Then, from a LINUX machine where the disk needs to be imported:

 wget --no-check-certificate --user=admin --ask-password --auth-no-challenge -O YOURVM.ova https://10.0.0.90:9440/api/nutanix/v3/ovas/7d89ffc0-9821-4cf0-9360-3e9f3f75c405/file

You can use `virt-v2v` directly to import the VM into KVM. Note the usage:

 virt-v2v -i ova YOURVM.ova -os iso

Specify with `-os` a `dir`-type pool with enough free space (`virsh pool-list`).

Alternatively, extract the file to obtain the images:

 [root@KVM4 ISO]# tar -xvf file
 2dd3009e-f74f-49a9-8a61-d99c7d6c25db.ovf
 a40567b0-9e05-4369-b13c-66e7aa7241fb.qcow2