16

I have a vmdk file and vmx file (and all the other files from someone elses datastore) copied onto my own data store. If I try to deploy from the vmx file, I get a vm with the name "unknown # (invalid)" where # is a sequential number depending on how many times I've tried. If I try to deploy from vmdk, I get an unbootable VM.

Is there an easy way to get a VM up and running from the VM folder?

Edit: When I try to deploy from VMX file, I get this vm:

uknown vm

and I am not able to edit the settings or power it up.

EDIT:

We fixed the issue. The file was given to us from VMPlayer and the hardware version was incompatible. We lowered the HW Version and exported as an .ova file. From there we were able to import into vCenter.

Jeff
  • 661
  • 7
  • 13
  • 26

3 Answers3

16

Are you using the vSphere client? If so, your key is to use the .vmx file.

Generically (without details on versions, etc.), this is accomplished by browsing the datastore, navigating to the VM's folder, right-clicking the relevant .vmx file and Adding the VM to your inventory.

From there, you should have a VM available in your datacenter (or host) inventory. That's when you'd be able to power on the virtual machine.

enter image description here

Edit:

If the .vmx is no good, you can create a NEW virtual machine...

enter image description here

  • Select "Custom".
  • Configure with the requisite specifications.
  • When you get to the "Select a Disk" portion, choose "Use an existing virtual disk".
  • This will open a dialog where you can browse to the .VMDK file.
  • Complete the setup.
  • Profit.
ewwhite
  • 194,921
  • 91
  • 434
  • 799
  • 1
    And if you do this and you're still getting the VM coming in as "unknown", then there's probably something wrong with the `.vmx`. It's a text file, open it up and compare with a working one. – Shane Madden Mar 04 '14 at 23:37
  • Is there a way to generate a new vmx from the vmdk? – Jeff Mar 04 '14 at 23:49
  • @Jeff See my update above. – ewwhite Mar 04 '14 at 23:59
  • I tried that too... I will just accept this answer, but I don't know that I asked it correctly. Another note, the zip I was given had a number of snapshots that got reassembled once I fully uploaded the folder. Does that matter? Thanks for your help. – Jeff Mar 05 '14 at 00:07
  • @Jeff Oh, the snapshots may not have been consolidated. They're not shown in the Datastore Browser dialog on purpose. That could be your problem here. Do you have any access to the original system? – ewwhite Mar 05 '14 at 00:16
  • I do not, but I can contact the owner. – Jeff Mar 05 '14 at 00:26
1

To add a .vmdk virtual disk to the VMware machine, please do the following:

Open your VMware virtual machine and make sure it is powered off; Choose VM -> Settings; On the Hardware tab, click Add to start the Add Hardware wizard, select Hard Disk and click Next. On the Select a Disk page, select Use an existing virtual disk and click Next. On the Select an Existing Disk page, enter the path name and filename for the existing disk file, or browse to the file and click OK. (!) Even if the converted virtual disk consists of several .vmdk files, you will need to pick only one .vmdk file at the last page of the wizard. This will add the whole virtual disk.

sub-zero
  • 11
  • 1
1

If wanna create the vm via vmdk file, you should change your vmdk file.

vmkfstools -i source.vmdk -d thin target.vmdk

Then it will generate two file(target.vmdk and target-flat.vmdk). You should use target.vmdk to create the vm.

create vm via vmdk

Mystic
  • 11
  • 3