Results 1 to 10 of 95

Thread: Boot an existing Vista/Windows 7 (Physical HD) install with VirtualBox

Threaded View

  1. #1
    Join Date
    May 2008
    Ubuntu Karmic Koala (testing)

    Boot an existing Vista/Windows 7 (Physical HD) install with VirtualBox

    Credit for this all goes to Sand Lee, who put in all the effort and troubleshooting. That guide on XP is located here. Much of this is copying what was done and just adding to it because of a lack of time on Sand Lee's part.

    I have recently Upgraded to the Windows 7 beta (build 7000) and to Jaunty 9.04. Using the same settings as before, this VM still works for me, I hope it does for you also.

    I re-made this tutorial based on Sand Lee's for XP, and used him additions to change it to Vista, so all credit goes to him, I am just posting this to make it easier to find for people. I agree with him when he says VMware felt off, I could not get it to work personally, plus VirtualBox is Open Source. Using a VM makes it much easier to boot into Vista if you need something quickly and do not want to exit your current session. I did this with Intrepid Ibex, Ubuntu 8.10.
    Please read or skim the tutorial before attempting it. Note: This tutorial was tested to work with VBoxOSE 2.04 and may not work for users w/ SATA drives.

    Step 1: Create a grub boot cd
    Creating a grub cd will let you boot straight into your target Windows partition.
    Following method adapted from grub manual.

     mkdir -p iso/boot/grub ; cp /usr/lib/grub/*-pc/stage2_eltorito /boot/grub/menu.lst iso/boot/grub
    This creates a copy of your current GRUB, so from here you configure ~/iso/boot/grub/menu.lst to boot your target partition (~ is your home).
    • Change the default option to your vista partition.
    • Set the timeout at 1.
    • If your vista partion says savedefault in the grub.lst be sure to delete that line.
    • Then run the following to create the grub.iso file.

    mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso iso
    Step 2: Create a virtual disk (.vmdk)
    When creating such a disk, it's preferable to only specify your Windows partition. This is a safety precaution that will prevent a data corruption problem that results from booting into the currently running OS. As a preliminary step, you must add yourself to the disk and vboxusers groups,
    sudo usermod -G disk,vboxusers -a `whoami`
    Log out and log back in here... and edit the following command to point to your WinVista partition: (I specified my WinVista partition - /dev/sda2 - with "-partitions 2")
    VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WinHD.vmdk -rawdisk /dev/sda -partitions 2 -relative -register
    Step 3: Boot into Vista and disable hardware-specific and unnecessary start-up items in msconfig
    • Click Start > In Search Box type msconfig
    • Hit Enter key
    • Remove anything not necessary, some trial and error may be required if you are not sure what you need

    Step 4: Boot back into Ubuntu and create a VM with the settings below. If they don't work try switching settings.
    • Create a machine that uses the created .vmdk (in the drop-down menu of the HD selection section)
    • You may have to switch between the two IDE controllers types (Settings/Advanced) to see which works for you
    • Use the same MAC as your real network card for your virtual card if you experience network problems

    Step 5: Boot Vista in VirtualBox
    • Realize that you may have to reactivate your copy of Vista

    *** Do Step 6 at your own risk, some have had problems with it ***
    Step 6: Mount the Guest additions CD to install the VBox Drivers
    • You will have to mount your HDD for this so be careful and make sure to select your Vista partition.
    • Image can be found here.
    • Do not install it directly into Vbox, only use it in Vista for finding the driver.
    • Reboot Vista and install the Guest additions inside Vista for a better experience.

    Step 7: Mount network drivers CD to install drivers
    • Again be careful and select your Vista partition because you HDD is mounted.
    • Download files and create ISO using the code below thanks to
      cd ~/install_files
      unzip -d driver
      mkisofs -o driver.iso -R -J driver
    • Mount driver.iso in VirtualBox
    • go to: Control Panel > Hardware and Sound > Device Manager. Right click on Ethernet Controller > Update Driver Software > Browser my computer…
    • Navigate to the CDROM drive, and click ok.

    ::: ::: Troubleshooting ::: :::

    More Troubleshooting:
    Migrate_Windows - Virtualbox

    Sources & Helpful Links:
    Sand Lee's Original Post
    vboxforums-version,squidoo-virt, mazimi-virt, mazimi-bypass, mesbalivernes-virt, Network Drivers tutorial

    Comments and suggestions welcome!
    Attached Images Attached Images
    Last edited by canabal; April 6th, 2009 at 05:54 AM.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts