I know this is an a very old thread, but it comes up on the first page of a Google/Bing search as of 2024-11-14. And since there was no answer, I'm providing one. I hope that this is able to help somebody at some point.
The answer is that by default, the OVFTool imports things as thick for some reason, even on the current version of 4.6.3.
You need to specify the following in your command:
--diskMode or -dm
Select target disk format. Supported formats are: monolithicSparse, monolithicFlat, twoGbMaxExtentSparse, twoGbMaxExtentFlat, seSparse (vSphere target), eagerZeroedThick (vSphere target), thin (vSphere target), thick (vSphere target), sparse, and flat.
All the commands can also be specified using ovftool.exe --help. They are also in the PDF User Guide.
Here is a simple example that makes the OVFTool deploy a thin provisioned VM when using the OVFTool on a Windows 10 installation. It prompts for user name and password:
C:\Program Files\VMware\VMware OVF Tool>ovftool.exe --noSSLVerify -ds="DATASTORE_NAME" -dm="thin" -n="VM_NAME_HERE" "C:\temp\OVF\FOLDER\VM_NAME.ovf" vi://IP_OF_ESXi/
Opening OVF source: C:\temp\OVF\FOLDER\VM_NAME.ovf
The manifest validates
Enter login information for target vi://IP_OF_ESXi/
Username: YOURUSERNAME
Password: **************************
Opening VI target: vi://USERNAME@IP_OF_ESXi:443/
Deploying to VI: vi://USERNAME@IP_OF_ESXi:443/
Transfer Completed
Completed successfully
Original Message:
Sent: Sep 27, 2016 09:19 AM
From: user9922
Subject: Moving VM using host-client or OVF Tool disable Thin provisioning on harddisks
If you, in datastore-browser, move a VM (e.g. the folder the VM is located) to another location, e.g. another datastore on the same host, the harddisk is no longer thin provisioned.
I also tried to use the OVF Tool with this command:
ovftool -ds=DS2 vi://root:password@host1/VM1_DS1 vi://root:password@host1 |
The new harddisk it not thin provisioned afterwards :-(
I believe if I first export the VM to an OVF and then import it, the thin provisioning is preserved....but that is double work :-(
Any way to do this in one transfer?
host-client version: 1.9.1
OVF Tool version: 4.1.0