This week I was converting a bare-metal windows server into an ESXi host while preserving the original OS.

I ran into some trouble because I saved the VMs to a UNC share instead of cloning it directly to a vSphere server.

I copied the VMX and VMDK files output from VMWare converter to my ESXi datastore.

It uploaded fine, but it wouldn’t boot.

 

Module DevicePowerOn power on failed.
Unable to create virtual SCSI device for scsi0:0, ‘/vmfs/volumes/datastorename/VirtualMachineHome/VirtualMachineDisk.vmdk’
Failed to open disk scsi0:0: Unsupported and/or invalid disk type 7. Did you forget to import the disk first?

 

There is a simple fix for this

and you don’t even have to transfer any more files.

You can fix this on the ESXi host itself with SSH access.

Connect to the ESX/ESXi host via SSH.

Run this command to clone the VMWare workstation VMDK to a VMWare infrastructure VMDK :

vmkfstools -i WorkstationVD.vmdk InfrastructureVD.vmdk

Where `WorkstationVD.vmdk` is the path to the vmdk on the host and `InfrastructureVD.vmdk` is the name of the VMDK to be output by the converter.

For example:

`vmkfstools -i /vmfs/volumes/datastore1/folder/workstation.vmdk /vmfs/volumes/datastore1/folder/infrastructure.vmdk`

TIP: If you have thin provisioned VMDKs and you don’t want them to fully inflate, or you are limited by space, append -d thin to the end of the command.

`vmkfstools -i /vmfs/volumes/datastore1/folder/workstation.vmdk /vmfs/volumes/datastore1/folder/infrastructure.vmdk -d thin`

 

 

Attach the converted VMDK to a virtual machine and boot. In most cases it’s best to create a new virtual machine VMX and specify this new VMDK as the Hard Disk.