Thursday May 15, 2008

Virtual Box 1.6 has been released and is no longer in beta for MacOS X.  One of the advertised features is the ability to import VMDK image files from VMware into Virtual Box.  Being the eternal optimist, I decided to try it.  How long could it take?  A few minutes maybe?  I have quite a few different VMs in Fusion and did this with Solaris 10 08/07.

Virtual Box is:

  • a type 2 hypervisor
  • Free
  • Open Source
  • supported on a variety of host OSes (Windows, Linux, Macintosh and OpenSolaris)
  • capable of running a variety of guest OSes
  • now owned and being developed by Sun Microsystems as part of the open source xVM family of virtualization products

The first part was easy. Extract the VMDK file and import it into Virtual Box

  • Right click on your chosen VM.  Choose "Show Package Contents"
  • Find a file with a .vmdk suffix.  Click once to select
  • Command-D (duplicate it) Wait a few minutes while Mac OS copies the multi-GB file
  • Drag the copied file to another location
  • Start Virtual Box
  • File > Virtual Disk Manager
  • Click Add.  Locate and select the copied .vmdk file. Click OK.
  • Create a New VM as usual using the added vmdk file
  • Boot the VM

That should have been it, right?  Unfortunately, after seeing the grub screen and attempting to boot Solaris, I entered an infinite loop of rebooting OS.  Obviously, it's mostly working but something is still wrong.  Luckily, inside of Sun, we archive our mail aliases and Rudolf Kutina had already posted a solution to the problem.

The rebooting sequence resulted from the fact that VMware Fusion emulates SCSI disks (c0t0d0s0) while VBox emulates IDE disks (c0d0s0).  Because of this, the Solaris device trees and vfstab mount entries are not correct.  Rudolf's solution is not for the weak of heart but DOES work.  After all, it's all just a virtual machine and if I screw it up, I just make another copy.  What have you got to lose?

  1. Boot into Solaris Safeboot mode. You can get access at the Grub menu, usually is the 2nd or 3rd option.
  2. Mount the found Solaris partition on /a , Safeboot will usually find the slice on the disk with Solaris and ask if you want it to mount on /a. Select Yes.
  3. Move /a/dev, /a/devices, and /a/etc/path_to_inst to another name (I just append .orig) and then create new directories, (mkdir) /a/dev and /a/devices, and touch file /a/etc/path_to_inst.
  4. Run "devfsadm -r /a" to rebuild the device tree
  5. set TERM so we can use 'vi', TERM=vt100; export TERM
  6. Now we need to fix boot disk patch changes Edit /a/boot/solaris/bootenv.rc and fix the line with "setprop bootpath '/pci@0,0....' to match the path you'll find mounted for /a (i.e. run a 'df -k' command, and you should see /a mounted from /dev/dsk/c1d0s0 or something, then run 'ls -l /dev/dsk/c1d0s0' or whatever your device listed was, and you should see the actual link point to ../../devices/pci@0,0/...ide..)
  7. Fix also disk naming in /a/etc/vfstab to match IDE "c0d0sx" scheme. Change each instance of c1t0d0s0 to c0d0s0 etc.
  8. Recreate archive "bootadm update-archive -v -R /a" to rebuild the boot-archive on /a
  9. Force to reconfigure on next boot with 'touch /a/reconfigure'
  10. Delete /etc/dhcp.e1000g0 /etc/hostname.e1000g0 create /etc/dhcp.pcn0.
  11. Run "cd /; sync; sync; sync; umount /a"
  12. reboot with 'init 6'

Enjoy your new Virtual Box machine.

Instructions are also available for importing a Windows XP .vmdk file to Virtual Box.

Comments:

SCSI naming conventions can be used by enabling SATA Controller support within the details of the VM.
Also, e1000g support can be enabled by changing the network device adapter type also within the details of the VM

Posted by ron calderon on June 01, 2008 at 03:08 PM EDT #

thanks for the post. Can you elaborate how to boot Solaris in safe mode ? I get only one default option when the grub menu comes up which when selected, goes off into the
I am trying this out on VirtualBox on XP as host and OpenSolaris as guest.
Also the vdmk files are from the VMWARE applicance for Opensolaris .

Thanks,

Posted by R on June 01, 2008 at 11:54 PM EDT #

I was using Solaris 10 08/07. Safe mode is a choice in the GRUB boot screen. This is NOT an option for OpenSolaris yet.

Posted by Jim Laurent on June 02, 2008 at 08:52 AM EDT #

Though there is not option for OpenSolaris 2005.08 to boot into failsafe from grub, the same procedure can be followed by booting using OpenSolari 2005.08 Live cd.

Posted by Harshal on October 02, 2008 at 12:49 AM EDT #

You mention that "Instructions are also available for importing a Windows XP .vmdk file to Virtual Box." Where are those instructions?

Sincerely,
Alex Gerwer

Posted by AlexGerwer on December 11, 2008 at 12:18 PM EST #

In particular, I took a Windows XP 32-bit guest vmdk file and loaded it into the latest version of Virtual Box 64-bit running on on a Vista host. When the vmdk file was booting under Virtual Box, the initial Windows flash screen appears, transitioning to a full screen HP which after a couple of seconds goes to a Windows blue screen only for a few seconds, finally recycling through the booting process infinitely (until manually interrupted). The error message on the blue screen is as follows "driver unloaded without canceling pending operations." Numerous different settings on Virtual Box have been tried, but they do not seem to affect this problem in any way what so ever. I would greatly appreciate help with this.

Sincerely,
Alex Gerwer

Posted by AlexGerwer on December 11, 2008 at 12:25 PM EST #

Alex,

If you click on the link, it should take you to: http://www.virtualbox.org/wiki/Migrate_Windows

As a person who is 100% microsoft free at home and work, I'm not the best resource to help you with this problem. The forums or email lists at the Virtual Box community site, however should be able to help you.
http://www.virtualbox.org/wiki/Community

Posted by Jim Laurent on December 11, 2008 at 04:51 PM EST #

As a person who is 100% microsoft free at home and work, I'm not the best resource to help you with this problem. The forums or email lists at the Virtual Box community site, however should be able to help you.
http://www.watchrolexshop.com
http://www.gamegoldme.com
http://www.cheap-lotrogold.com
http://www.globalsale.me/Aion-gold-083.aspx
http://www.cheap-gamegold.org
http://www.gamegoldvip.org

Posted by replica rolex on June 25, 2009 at 12:54 AM EDT #

Note that the entry above is from someone who is working to spam your site and everyone who has been on this site. Please do whatever is required to remove this person from being able to ruin the interactions in this group. I am working to contact the authorities in the United Nations and in the U. S. government to assure that there are consequences for the person or people who are involved in the note above. I appreciate the help of any and all others who are on this site in helping to prosecute the person or people responsible for the above message.

Posted by Alan Good on June 25, 2009 at 03:21 AM EDT #

ugg boots
ugg discount
buy ugg boots

Posted by ugg boots on October 27, 2009 at 12:58 AM EDT #

<a href=http://www.uggg.org/>cheap ugg,short ugg shoes,buy ugg shoes</a>
<a href=http://www.goldtiffanyjewelry.com/>tiffany watches,tiffany jewelry</a>
<a href=http://www.replicatiffany.net/>replica tiffany</a>
<a href=http://www.watches-online.org/>replica watches</a>

Posted by replica watches on October 28, 2009 at 06:02 AM EDT #

[url=http://www.jerseysnfl.org/]jerseysnfl[/url]
[url=http://www.jerseysnfl.org/]nfl jerseys[/url]
[url=http://www.jerseysnfl.org/]official nfl jerseys[/url]

Posted by jerseysnfl on October 31, 2009 at 12:10 AM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed