1

I have a OVA file(MyOvafile.ova) which contain MemorySize=16GB and CPU count=4. I have deployed the Ovftool on VMware ESXi server.

I am using the following command to deploy the VM:

/vmfs/volumes/DataStore1/vmware-ovftool/ovftool --memorySize:15360 --name=Test_VM -dm=thin -ds=DataStore1 /vmfs/volumes/DataStore1/OVA_V5.1_BSI-8/MyOvafile.ova

Now the problem i am facing:

As i am giving MemorySize of 15360MB but after deployment VM has the same values as defined in ova file (MyOvafile.ova i.e 16GB)

My Question:

How can i change the value of MemorySize and CPU count through ovftool command?

ajay
  • 41
  • 5
  • Been looking for a resolution for this as well. `--memorySize` and `--numberOfCpus` apparently only apply for vCloud. Annoying! – Marakai Sep 18 '17 at 06:16
  • I found and am not using `cot`. I'll write a proper answer as soon as I've gotten a clean workflow going. Right now, I'm still (albeit successfully) experimenting with the various options. – Marakai Sep 18 '17 at 07:15

1 Answers1

1

Apparently, this seems a bug in OVFTOOL (and documentation as well). CPU and memory cannot be overridden by OVFTOOL's corresponding parameters. However, there is hack by modifying it in VMX file of VM (and then using reconfigure command).

1) Get VMXfile Location (ending with .vmx) :

vim-cmd vmsvc/getallvms Vmid Name File Guest OS Version Annotation

72     Test_vm [datastore2] VM_name/VM_name.vmx   rhel6_64Guest   vmx-08

2) Modify vmx file (for example, using awk) for changing 'vCPUS=REQ_CPUs' entry.

3) Reconfigure .vmx file

vim-cmd vmsvc/reload <VM_ID>

Issue reported in VMware community: https://communities.vmware.com/message/2698710#2698710