VMware vSphere

 View Only
  • 1.  img vs vmdk

    Posted Aug 16, 2007 02:27 PM

    I have a virtual machine that I loaded under VMware Server at home. It consists of a large *-flat.img file where the machine is stored. However, when I try to load it on a VMware ESX Server, it doesn't want to see the files to open. I see that my existing ESX machines use a *-flat.vmdk storage method. What's the difference between img and vmdk flat files? Can I convert my img to vmdk? Is that not the problem and I need to be looking at something else? I don't think it's permissions, the new machine matches my working existing machines in terms of ownership and permissions.

    Thanks,

    Scott



  • 2.  RE: img vs vmdk

    Posted Aug 16, 2007 02:33 PM

    How did you create the VM on Server? I've never heard of an img file used in a VM before...



  • 3.  RE: img vs vmdk

    Posted Aug 16, 2007 02:47 PM

    File -> Open from VMware Server and I open the *.vmx file. In the VMware ESX Server there's no "Open" option, so I create a new VM, use a Custom config, and when it gets to the Disk section I select "Use an existing virtual disk". When I browse to the directory, the ESX app says it's looking for *.vmdk, *.dsk or *.raw files to open but it doesn't display the *.vmdk file that does exist in the VM directory. That's why I originally suspected permissions, but everything appears to be in good shape.

    Thanks,

    Scott



  • 4.  RE: img vs vmdk

    Posted Aug 16, 2007 02:49 PM

    No, HOW did you CREATE the guest originally? The one that is working on VMware Server?



  • 5.  RE: img vs vmdk

    Posted Aug 16, 2007 03:10 PM

    No, HOW did you CREATE the guest originally?

    The one that is working on VMware Server?

    Unfortunately it's a friend of a friend deal, so I'm not sure. I will try to track down who created it to find out what they did to create the machine.

    Thanks,

    Scott



  • 6.  RE: img vs vmdk

    Posted Aug 16, 2007 03:08 PM

    .img files can be booted as a floppy image. Perhaps that what the previous configuration was doing (look at the vmx or edit properites on the old VMware Server vmx file).

    So with ESX, you could go to the VM in question, 'edit settings', point the floppy to boot from the .img file (ensure that 'connect at power on' is checked). Then power up the VM and quickly hit F2 to enter the VMs bios, and change the boot order to floppy first.

    Alternatively, you may also be able to use VMware Converter but no guarantees.



  • 7.  RE: img vs vmdk

    Posted Aug 16, 2007 07:38 PM

    So with ESX, you could go to the VM in question,

    'edit settings', point the floppy to boot from the

    .img file (ensure that 'connect at power on' is

    checked). Then power up the VM and quickly hit

    F2 to enter the VMs bios, and change the boot

    order to floppy first.

    That sounds like an interesting option to try, but I can't even get the VM created, so I don't have access to any settings. Unless there's a way I can create an empty VM and copy the files over once it's configured, to cheat my way into getting the VM running?

    Thanks,

    Scott



  • 8.  RE: img vs vmdk

    Posted Aug 16, 2007 08:12 PM

    If you cannot create a VM, possible reasons include the host not being licensed properly, or the location of the .img file not being on a VMFS accessible datastore (i.e. \_supported_ locations are /vmimages or /vmfs/volumes/*).

    Anyway, creating the dummy VM is the way to go. Just choose the OS closest to your desired VM, and give it a 1GB disk. Once the VM is created, delete the disk, and copy over your actual disk to the desired VMs folder.

    Adjust the properties to point to the newly copied disk. power up and pray.

    If that doesn't work, then you may consider using VMware converter (either on your source machine at home, or the copied image).

    As a final note, ensure that the .img file is always copied around in binary mode (as opposed to text/ascii) between physical servers.



  • 9.  RE: img vs vmdk

    Posted Aug 16, 2007 10:51 PM

    To use a one-piece flat disk created with VMserver in ESX you need to make 2 edits to the descriptor - see

    http://sanbarrow.com/vmdk/monolithicFlat-with-WS-and-ESX.html