V2V CLI VHD->ESXi

VM image converter (VMDK, VHD, VHDX, IMG, RAW, QCOW and QCOW2), P2V migrator

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
sirsamuel
Posts: 3
Joined: Thu Sep 20, 2018 7:37 pm

Thu Sep 20, 2018 7:42 pm

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!
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Fri Sep 21, 2018 12:22 pm

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.
sirsamuel
Posts: 3
Joined: Thu Sep 20, 2018 7:37 pm

Fri Sep 21, 2018 1:37 pm

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)'
sirsamuel
Posts: 3
Joined: Thu Sep 20, 2018 7:37 pm

Fri Sep 21, 2018 2:06 pm

Got it working! Needed to add:

of="/test/enhome.vmdk" ot=VMDK_ESXI vmdktype=SCSI ds=localdisk_envware1
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Fri Sep 21, 2018 8:34 pm

Thanks for posting the resulting command for the benefit of the community.
jj.anderson
Posts: 3
Joined: Tue Sep 25, 2018 8:29 pm

Tue Sep 25, 2018 9:09 pm

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
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Wed Sep 26, 2018 10:17 am

Please use
if=[localdisk_envware1] W7VM/W7VM.vmdk
or
if=/folder/W7VM/W7VM.vmdk?dcPath=ha%252ddatacenter&dsName=localdisk_envware1
ds is not needed.
jj.anderson
Posts: 3
Joined: Tue Sep 25, 2018 8:29 pm

Thu Sep 27, 2018 8:29 pm

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: Image
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
jj.anderson
Posts: 3
Joined: Tue Sep 25, 2018 8:29 pm

Mon Oct 01, 2018 4:31 pm

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
Oleg(staff)
Staff
Posts: 568
Joined: Fri Nov 24, 2017 7:52 am

Tue Oct 02, 2018 10:16 am

I passed the information about the problem you faced to our R&D team.
Post Reply