Page 1 of 1
V2V CLI VHD->ESXi
Posted: Thu Sep 20, 2018 7:42 pm
by sirsamuel
Hello,
I'm having trouble getting CLI working from VHD to ESXi. I've been trying to get the VMDK path right, but it keeps saying "Incorrect vmdk file name."
When I run through the GUI, it works fine.
I tried:
Code: Select all
.\StarV2Vc.exe if=\\share\enhomebuild_disk_1.vhdx r=ESXI ip=... usr=root pwd=... ot=VMDK_VMFS of="[enesxvirt_vmware] enhomebuild/enhomebuild.vmdk"
.\StarV2Vc.exe if=\\share\enhomebuild_disk_1.vhdx r=ESXI ip=... usr=root pwd=... ot=VMDK_VMFS of="/folder/ha-datacenter/enesxvirt_vmware/entestwin10/enhome.vmdk"
.\StarV2Vc.exe if=\\share\enhomebuild_disk_1.vhdx r=ESXI ip=... usr=root pwd=... ot=VMDK_VMFS of="/folder/entestwin10/enhome.vmdk?dcPath=ha%252ddatacenter&dsName=enesxvirt_vmware"
And all kinds of variations. Same error: "Incorrect vmdk file name."
What should the syntax be?
Thanks in advance!
Re: V2V CLI VHD->ESXi
Posted: Fri Sep 21, 2018 12:22 pm
by Oleg(staff)
Hello sirsamuel,
You do not need to this parameter r=ESXI, you are writing to ESXi, not reading.
You need to change ot=VMDK_VMFS to ot=VMDK_ESXI.
Re: V2V CLI VHD->ESXi
Posted: Fri Sep 21, 2018 1:37 pm
by sirsamuel
Thanks!
And how do I specify the datastore and the file path?
Now it says:
Input file: \\...\enhomebuild_disk_1.vhdx
Input file format: Microsoft VHDX image
Image size: 128849018880 bytes
Error 26 ds flag can't be empty '(null)'
Re: V2V CLI VHD->ESXi
Posted: Fri Sep 21, 2018 2:06 pm
by sirsamuel
Got it working! Needed to add:
of="/test/enhome.vmdk" ot=VMDK_ESXI vmdktype=SCSI ds=localdisk_envware1
Re: V2V CLI VHD->ESXi
Posted: Fri Sep 21, 2018 8:34 pm
by Boris (staff)
Thanks for posting the resulting command for the benefit of the community.
Re: V2V CLI VHD->ESXi (and vice versa?)
Posted: Tue Sep 25, 2018 9:09 pm
by jj.anderson
Hi, sorry for intruding but I have a very similar problem, albeit for the opposite conversion direction.
Trying to convert directly from ESXi to VHDX, I'm unable to correctly specify the datastore and path to the VMDK file.
I always end up with the error "incorrect vmdk file name".
Here's my line, I've varied the usage of quotation marks and the position of the ds= parameter, all to no avail:
Code: Select all
starV2Vc.exe r=esxi ip=$HOST usr=$USER pwd=$PASS if=/W7VM/W7VM.vmdk of=E:\W7VM.vhdx ot=VHDX ds=datastore2_SAS
Btw sirsamuel, how did you find out about the "ds="? There isn't anything mentioned in the help file or the command line help, is there?
Thanks,
JJ
Re: V2V CLI VHD->ESXi
Posted: Wed Sep 26, 2018 10:17 am
by Oleg(staff)
Please use
if=[localdisk_envware1] W7VM/W7VM.vmdk
or
if=/folder/W7VM/W7VM.vmdk?dcPath=ha%252ddatacenter&dsName=localdisk_envware1
ds is not needed.
Re: V2V CLI VHD->ESXi
Posted: Thu Sep 27, 2018 8:29 pm
by jj.anderson
Hi Oleg, thanks for the response, unfortunately both versions do not work for me.
if=[datastore2_SAS] W7VM/W7VM.vmdk of=E:\OutputFile.vhdx ot=VHDX
Still results in "incorrect vmdk file name", both with or without the space after the
].
if="/folder/W7VM/W7VM.vmdk?dcPath=ha%252ddatacenter&dsName=datastore2_SAS" of=E:\OutputFile.vhdx ot=VHDX
This one gives the same "incorrect vmdk file name" and, if not using quotes, an additional "command dsName not recognized" due to the
&
FYI here's a screenshot of the Datastore Browser, to verify the actual paths:

If it is of any importance, the host in question is standalone, managed directly through the vSphere client, no vCenter server.
Using the GUI on the same host and VMDK works perfectly btw. (thanks for the great tool!), so maybe you could add a button to the final dialogue page to generate a proper command line from the settings chosen in the GUI?
Thanks,
JJ
Re: V2V CLI VHD->ESXi
Posted: Mon Oct 01, 2018 4:31 pm
by jj.anderson
Just wanted to let you know that I did not find a solution to the syntax problem, so I had to go the somewhat tedious route of converting manually through the GUI.
Nevertheless, thanks again for the great tool!
JJ
Re: V2V CLI VHD->ESXi
Posted: Tue Oct 02, 2018 10:16 am
by Oleg(staff)
I passed the information about the problem you faced to our R&D team.