How to use ovftool command line utility
1)
To see all VMs in the ESXi Server 192.168.1.26
2)
To get the ovf of VM demovm1
3)
To get the ovf of VM vcenter2, poweroff VM before taking ovf
4)
To get the ovf of VM using moref "238"
5)
Download ovf file with progress tracking (Working)
6)
Convert an OVF to a VMX
7)
Create a new VM "p1" on ESXI node 192.168.1.26 using *.vmx file
-n --> Name of new VM
8)
Create a new VM "k1" on ESXI node 192.168.1.126 using *.ovf file
9)
Convert a VMX to an OVF
10)
Convert a VMX to an OVA
1)
To see all VMs in the ESXi Server 192.168.1.26
#ovftool vi://192.168.1.26
2)
To get the ovf of VM demovm1
#ovftool vi://192.168.1.26/demovm1 ~/Desktop/ovfs/
#ovftool vi://root:xxxxxx@192.168.1.26/demovm1 ~/Desktop/ovfs/
3)
To get the ovf of VM vcenter2, poweroff VM before taking ovf
#ovftool --powerOffSource vi://root:xxxxxx@192.168.1.26/vcenter2 ~/Desktop/ovfs/
4)
To get the ovf of VM using moref "238"
#ovftool vi://root:xxxxxx@192.168.1.26?moref=vim.VirtualMachine:238 ~/Desktop/ovfs/
5)
Download ovf file with progress tracking (Working)
#ovftool --machineOutput vi://root:xxxxxx@192.168.1.26?moref=vim.VirtualMachine:238 ~/Desktop/ovfs/
6)
Convert an OVF to a VMX
#ovftool -tt=vmx a2.ovf ~/Desktop/
#ovftool vm1.ovf ~/Desktop/vm2.vmx
7)
Create a new VM "p1" on ESXI node 192.168.1.26 using *.vmx file
#ovftool -ds=datastore2 -n=p1 demovm2.vmx vi://root:xxxxxx@192.168.1.26/
-ds --> Datastore-n --> Name of new VM
8)
Create a new VM "k1" on ESXI node 192.168.1.126 using *.ovf file
#ovftool -ds=datastore2 -n=p2 demovm2.ovf vi://root:xxxxxx@192.168.1.26/
9)
Convert a VMX to an OVF
#ovftool -tt=ovf a2.vmx ~/Desktop/
#ovftool -tt=ovf demovm2.vmx .
10)
Convert a VMX to an OVA
#ovftool -tt=ova a2.vmx ~/Desktop/
#ovftool -tt=ova demovm2.vmx .
a)
ova to ovf
#ovftool -tt=ovf xvm1.ova .
b)
ova to vmx
#ovftool -tt=vmx xvm1.ova .
11)
How to convert ova to ovf to vmxa)
ova to ovf
#ovftool -tt=ovf xvm1.ova .
b)
ova to vmx
#ovftool -tt=vmx xvm1.ova .
Hi Saju,
ReplyDeleteCan you please let me know how to use --nic option in the ovftool command line. I need to configure IP address to the vm i created in the ESXI from the command line.!! Please help me regarding this..
Hi Nagu,
ReplyDeleteWere you able to find any example with --nic option?
If yes, could you please share it with me...?
Hi
ReplyDeleteCan you please let me know if we have any option to boot up server in single user mode using ovftool?