VirtualBox

From AFP548 Wiki
Jump to: navigation, search

This article is intended for VirtualBox 4.1.8 (may work on newer versions too) on Mac, but can be used for PCs as well. This guide will show you how to virtualize Windows on a Mac.

Supported host OS[edit]

There’s a version of VirtualBox for Mac and Windows. The host OSes that have been tested so far include: Mac OS 10.5, 10.6, 10.7 and Windows 7 x86/64. On Mac OS 10.4, you can only run VirtualBox 3.0.14 and Shared Folders do not seem to function.

Install VirtualBox[edit]

  1. Download VirtualBox from https://www.virtualbox.org/wiki/Downloads
  2. Open the installer and double click on the VirtualBox.mpkg icon and click on “Continue” until it finishes installing.
    • If you want to uninstall VirtualBox, double click on the VirtualBox_Uninstall.tool icon to uninstall VirtualBox.

Copy virtual HDD[edit]

  1. On your dock, click on the Finder icon. On the top file menu.
  2. Click on “Home” which will take you to the user account home folder.
  3. You will create a new folder here. Click on the top file menu and select “New Folder”. Alternatively, you can right click (hold CTRL and mouse click) to create a new folder inside your home folder. Name the new folder “VirtualBox VMs” (case-sensitive).
  4. Copy the virtual harddrive (VMDK or VHD file) onto the folder you just created on the Mac. This can take some time depending on the medium you are using to transfer the file
    Note: VMDK files will also work in VMware Fusion.

Create Virtual Machine[edit]

  1. Open VirtualBox which is located under the /Applications folder.
  2. Click on “New” to create a new guest virtual OS.
  3. Click on “Continue” to create the virtual guest OS.
  4. Give the virtual OS a name. It’s important to choose the appropriate version of the OS you want to setup. If you’re going to install a 64-bit version of Windows, make sure that’s what you select.
  5. You need to allocate a certain amount of memory. Make sure you give Windows 7 at least 1GB of RAM. Keep in mind how much memory the Mac has as well because the virtual OS will be sharing hardware resources with the Mac. OS X Leopard and Snow Leopard require at least 1GB and OS X Lion requires 2GB of RAM. If the user does not meet minimum memory requirements on the machine, you should NOT install VirtualBox for user. You may want to consider configuring BootCamp in that case.
  6. At this point you are going to point the virtual OS to the already pre-loaded virtual HDD image. Click on “Use existing hard disk” and click on the folder icon.
  7. Select the virtual HDD image you copied earlier.
  8. Now you should be able to select the appropriate virtual HDD image. The size of the image is dynamic so it will only increase as programs and files get stored on Windows. The limit depends on the harddrive used to create the virtual image. Click on “Continue”.
  9. Click on “Done”. You’ve now added the virtual guest OS to VirtualBox. However it still needs to be configured.

Configure Virtual Guest OS[edit]

  1. Highlight the Windows 7 guest OS and click on “Settings”. The next few steps are important to follow. Windows 7 will give you the BSOD if you do not configure the virtual hardware components properly.
  2. Click on the System tab. This only applies to 64-bit versions of Windows. For our images, you MAY need to have 2 available cores to allocate to the Virtual OS, otherwise you’ll have problems booting into Windows. This does NOT apply to 32-bit versions of Windows.
  3. Click on the Display tab. You will want to max out the video memory to 128MB and Enable 3D Acceleration. Do NOT select 256MB of RAM unless the video card supports 256MB.
  4. Click on the Storage tab. You will want to make sure the virtual CD drive points to the actual CD/DVD-ROM which should appear as Host Drive 'HL-DT-ST DVDRW GA32N'. Click on the disc icon next to where you see the CD/DVD Drive: drop down menu to select the optical drive. This will allow users to load any CD/DVDs into Windows.
  5. You will also want to make sure that you remove the virtual HDD image from SATA. Highlight the HDD under “SATA Controller” and click on the “minus (-)” sign below. This step is critical. Failing to do this will cause the BSOD in Windows 7.
  6. Highlight “IDE Controller” and click on the “plus (+)” sign for HDD (the one to the right). If you are unsure, let the mouse pointer hover over the disc icons, you will see one that clearly says Add Hard Disk which is the one you want to click. This will result in a popup giving you the option to “Choose existing disk”. If you do not see this then you selected the wrong disc icon.
  7. Select the virtual HDD image which you copied earlier to /Macintosh HD/Users/<user account>/VirtualBox VMs/ . Open the file and it should now be listed under IDE Controller.
  8. Click on “Shared Folders”. This will allow us to create a folder that gives the user access to files on her Mac within Windows. Click on the folder with the “plus (+)” sign on the right.
    Note: On a Mac running OS 10.4 (Tiger), this part of the guide may not work.
  9. You will be prompted with the folder path you want to share. Click on the drop down to select “Other…”. I always choose the user’s home folder on the Mac because this gives them access to all folders in their profile. The user's home folder is located under /Macintosh HD/Users/<username>. Obviously use your judgment if they tend to save their files in other locations outside of their account folder.
  10. Once you select the folder path, make sure you check “Auto-mount” so that the shared path is mounted automatically in Windows as a Network drive. You can click OK and the shared path will appear under the Shared Folders. You can continue to share other folders as well if you want or if requested by the end user.

Configure Windows[edit]

Once you’re done with the hardware configurations of the virtual OS, you are ready to start Windows. Please note that in some of the virtual HDD images, you may get a prompt to run “chkdsk”. Just let it run without interruption. Windows will run through sysprep and restart a few times during this entire process.

Once you start/restart Windows, it will give you a prompt(s) regarding the mouse/keyboard capture. You can click on “Capture”. With the drivers in Windows you can easily move the mouse and keyboard between both the Host and Guest OS. Click on “Do not show this message again” so that it doesn’t keep bugging you about it.

Install VirtualBox Drivers[edit]

Now you need to do a few more things within Windows to get the virtual guest OS up and running fully.

  1. Start Windows within VirtualBox and let it load to the desktop.
  2. Click on “Devices” and select “Install Guest Additions” on the top bar menu.
  3. Open up the CD drive in Windows. You will install the drivers so that Windows can co-exist with the Mac. Select the appropriate setup file for the version of Windows you are running (32 or 64 bit). Once this part is done you will be asked to restart.

Remember to point the CD/DVD devices back to the actual CD/DVD drive on the host machine when you are done with installing the VirtualBox drivers. This can be done through “Devices” in the VirtualBox file menu or under “Settings” for the virtual guest OS.

Notes[edit]

CTRL + ATL + DEL[edit]

Unfortunately, this does not work in VirtualBox through the keyboard. When you have the VM open, you will need to go to “Machine” then click on “Insert CTRL + ATL + DEL”. This mainly affects virtual machines that get added to an Active Directory domain.

CD/DVDs[edit]

This really only applies to Macs with optical drives. Newer Macs are not coming with any optical drives and so the following may be unnecessary for those Macs.

  • CD/DVDs inserted into Mac while VirtualBox is open might cause the disc to NOT appear on the Mac. In order to make the CD reappear to eject it, they will need to close down VirtualBox.
  • Remember to point the CD/DVD devices back to the actual CD/DVD drive on the host machine when you are done with installing the VirtualBox drivers. This can be done through “Devices” in the VirtualBox file menu or in the “Settings” for the virtual guest OS.

VirtualBox vs BootCamp[edit]

  • VirtualBox does not require restarting the Mac to load Windows.
  • VirtualBox allows you to work with files within your Mac.
  • BootCamp does not share hardware resources with Mac OS. Better option for hardware intensive applications.
  • CTRL + ATL + DEL works through keyboard.

Enter Seamless Mode[edit]

Seamless mode allows the user to access Windows without the desktop in the way. Only the taskbar appears so that you can open up applications and folders “seamlessly”.

  • To enable Seamless mode, click on “Machine” and select “Enter Seamless Mode”.
  • To disable Seamless mode, click on “Machine” and select “Exit Seamless Mode”.

Quick Boot Up[edit]

You can shutdown Windows through the traditional Shutdown button in Start Menu. However it takes longer to load up when you start it up again. If you click on “VirtualBox VM” and select “Quit VirtualBox VM” you will get the option to “Save the machine state” which starts up the machine with all the programs you had running before quitting VirtualBox. This will allow Windows to boot up in less than 20 seconds. However it's probably best to restart the virtual machine normally every so often in case of pending Windows updates that may be required.

Things User Needs To Know[edit]

  • CD/DVD drives when inserted while using VirtualBox need to be ejected from within Windows.
  • USB devices will not be recognized by Windows; Save files to Mac desktop to open them in Windows.
  • Mac files can be accessed by going to Start Menu-> Computer and clicking on the network drive.
  • Do NOT open documents at the same time in Windows & Mac.
  • Seamless mode will save you screen space.
  • Use “Save The Machine State” for a quick boot up.
  • CTRL + ATL + DEL is available in top file menu.
  • Save all documents on Mac desktop/folders if possible to avoid potential loss in case virtual OS becomes corrupt.