VDI vs. VMDK

Discussions about using Mac OS X Server guests in VirtualBox.

VDI vs. VMDK

Postby mike-h30 » 3. Jan 2011, 17:44

I have been experimenting with VM's and noticed that if I create a VM from scratch, the virtual hard disk created is a VDI file. If I import a VM, the virtual hard drive created is a VMDK file.

Is one file more robust than the other?

Does it matter whether a VM is created from scratch thus having a VDI file or importing one with the end result a VMDK file?

Thanks.

-Mike
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,

Re: VDI vs. VMDK

Postby Perryg » 3. Jan 2011, 17:54

VirtualBox will work and support other file types like vhd and vmdk. It is my experience that VirtualBox handles the vdi file type a little better as far as speed goes, but for portability the vmdk types are preferred.
Perryg
Site Moderator
 
Posts: 25942
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: VDI vs. VMDK

Postby mike-h30 » 4. Jan 2011, 02:30

So in that case, when creating a new VM on a target machine, should I first create the VM, then after the VM is created, replace the VDI file (newly created VM) with the VDI file from my previous machine?
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,

Re: VDI vs. VMDK

Postby Perryg » 4. Jan 2011, 02:46

That's up to you and for every user their mileage will vary. I myself tend to leave things that are not broken alone. Meaning I create a new guest and leave it as a VDI. Now if I need to export that file to another PC it will of course be in the vmdk format. If this file is getting replaced and is working for me fast enough I leave it alone. If however I plan to keep it on the machine for a while I do tend to convert it to VDI to increase the speed.
Perryg
Site Moderator
 
Posts: 25942
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: VDI vs. VMDK

Postby mike-h30 » 4. Jan 2011, 04:01

The reason I had to create the VM on anther machine was due to issues creating the VM on my MIni Server (no optical drive). I created the VM on my iMac and want to move it over to the Mini Server. I also downloaded Virtual Box 4.0 and I was not able to get the DMG image to boot as I attempted to try and create the VM with the newly supported DMG file format in the latest release.

Thus I have a working VM on my iMac but my iMac is not my intended server - the Mini Server is. So I am trying to figure out the best solution. Based on your advice, I would like to have the VDI file on my Mini Server. The only way for me to do that is to create the VDI file on my Mini and then replace that VDI with the VDI that was created on my iMac.

I am not sure why my DMG image would not boot in Virtual Box 4.0. I could try it again and see what happens.
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,

Re: VDI vs. VMDK

Postby Perryg » 4. Jan 2011, 04:17

What ever works for you should be fine. All you need to do is make sure that you keep the settings the same and it should work fine by cp/paste from one to the other.
Perryg
Site Moderator
 
Posts: 25942
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: VDI vs. VMDK

Postby mike-h30 » 4. Jan 2011, 05:31

Thanks! That's what I will do then.
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,

Re: VDI vs. VMDK

Postby mike-h30 » 6. Jan 2011, 02:14

Perryg wrote:What ever works for you should be fine. All you need to do is make sure that you keep the settings the same and it should work fine by cp/paste from one to the other.


Copying a VDI file from one location to another does not seem to be so easy after all. I keep getting an error telling me that the UUID of the medium (/file-path/my-virtual-machine.vdi) does not match the value stored in the media registry (/file-path/VirtualBox.xml). In addition to copying over the VDI file I also copied the files "my-virtual-machine.xml" and "VirtualBox.xml" from my old location to the new location. I would prefer to use the VDI file based on your observation of better performance rather than the VMDK (from importing the appliance). Please advise.
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,

Re: VDI vs. VMDK

Postby Perryg » 6. Jan 2011, 02:36

I don't know why you copied all the other stuff, but here is how I do it.
first you need to remove the VM from VirtualBox on the second machine. It will not allow two copies of the same thing.
Now take the copy from the first machine and put the vdi file in the folder where it would go if you actually built it from scratch.
Create a new VM (guest) and when asked if you want to create a new HDD or use an existing one tell it to use an existing one and attach the one that you copied from the first machine.
Make sure that the settings are the same as the original one including the MAC (NIC) address if it is Windows.
Perryg
Site Moderator
 
Posts: 25942
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX - Other

Re: VDI vs. VMDK

Postby mike-h30 » 6. Jan 2011, 02:40

I see. I will try that.

Also, I just tried copying over the entire VirtualBox directory and that worked.

Thanks!
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,

Re: VDI vs. VMDK

Postby mike-h30 » 7. Jan 2011, 17:34

Perryg wrote:I don't know why you copied all the other stuff, but here is how I do it.
first you need to remove the VM from VirtualBox on the second machine. It will not allow two copies of the same thing.
Now take the copy from the first machine and put the vdi file in the folder where it would go if you actually built it from scratch.
Create a new VM (guest) and when asked if you want to create a new HDD or use an existing one tell it to use an existing one and attach the one that you copied from the first machine.
Make sure that the settings are the same as the original one including the MAC (NIC) address if it is Windows.


That worked perfectly. Thanks!
mike-h30
 
Posts: 53
Joined: 8. Mar 2009, 22:11
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: OSX, SLES, OpenSUSE, XP,


Return to Mac OS X Server guests

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests