VMware Cloud Community
dbutch1976
Hot Shot
Hot Shot
Jump to solution

Add VM to inventory not working

Hello,

I am trying to use PowerCLI to add a VM to inventory.  I know the exact location and I'm not having any issues seeing the file, I have verified the location using ls:

ls vmstores:\srmvc2.MYDOMAIN.ca@443\DR\NASG_SVM1_ESX_Templates\PICOB_NEW1\PICOB_NEW1.vmx

   Datastore path: [NASG_SVM1_ESX_Templates] PICOB_NEW1

            LastWriteTime            Type       Length Name
            -------------            ----       ------ ----
     2016/04/18  11:35 AM    VmConfigFile         3554 PICOB_NEW1.vmx

This result seems to indicate the path to the vmx file is correct, I attempt to add the file to inventory using the following command:

New-VM -VMHost srmesxi62.MYDOMAIN.ca -Location Migrating -VMFilePath "vmstores:\srmvc2.MYDOMAIN.ca@443\DR\NASG_SVM1_ESX_Templates\PICOB_NEW1\PICOB_NEW1.vmx"

This returns an invalid path error.  This must be dead simple to fix, but I can't see where I'm going wrong.  Any ideas?

Reply
0 Kudos
1 Solution

Accepted Solutions
dmmcsherry
Enthusiast
Enthusiast
Jump to solution

Your path formatting is incorrect, try this:

New-VM -VMHost srmesxi62.MYDOMAIN.ca -Location Migrating -VMFilePath "[NASG_SVM1_ESX_Templates] PICOB_NEW1/PICOB_NEW1.vmx"

View solution in original post

Reply
0 Kudos
2 Replies
dmmcsherry
Enthusiast
Enthusiast
Jump to solution

Your path formatting is incorrect, try this:

New-VM -VMHost srmesxi62.MYDOMAIN.ca -Location Migrating -VMFilePath "[NASG_SVM1_ESX_Templates] PICOB_NEW1/PICOB_NEW1.vmx"

Reply
0 Kudos
dbutch1976
Hot Shot
Hot Shot
Jump to solution

Awesome, thanks!

Reply
0 Kudos