Difference between revisions of "VirtualBox"

From Organic Design wiki
m (Running a virtual OS X)
(Change source-code blocks to standard format)
Line 23: Line 23:
 
=== Changing screen resolution ===
 
=== Changing screen resolution ===
 
The only thing I found to be a bit of a problem was getting the default screen resolution of 1024x768 to change to the native resolution of may laptop panel which is 1366x768. All the various instructions I'd found from Google searches didn't work, but I found a combination that did. First in the virtual machine I had to add the following key and value to {{h|'''/Extra/org.chameleon.Boot.plist'''}}, some instructions say ''/Library/Preferences/SystemConfiguration/com.apple.Boot.plist'', but this didn't work for me. Note that editing this file needs to be done by the root user.
 
The only thing I found to be a bit of a problem was getting the default screen resolution of 1024x768 to change to the native resolution of may laptop panel which is 1366x768. All the various instructions I'd found from Google searches didn't work, but I found a combination that did. First in the virtual machine I had to add the following key and value to {{h|'''/Extra/org.chameleon.Boot.plist'''}}, some instructions say ''/Library/Preferences/SystemConfiguration/com.apple.Boot.plist'', but this didn't work for me. Note that editing this file needs to be done by the root user.
{{code|<pre><key>Graphics Mode</key>
+
<source>
<string>1366x768x32</string></pre>}}
+
<key>Graphics Mode</key>
 +
<string>1366x768x32</string>
 +
</source>
  
 
And this same resolution then needs to be added to the Virtual Box options after stopping the machine. Be sure to use the exact name of your virtual machine, use '''VBoxManage list vms''' if unsure and copy/paste.
 
And this same resolution then needs to be added to the Virtual Box options after stopping the machine. Be sure to use the exact name of your virtual machine, use '''VBoxManage list vms''' if unsure and copy/paste.
{{code|<pre>VBoxManage setextradata "OS X" "CustomVideoMode1" "1366x768x32"</pre>}}
+
<source>
 +
VBoxManage setextradata "OS X" "CustomVideoMode1" "1366x768x32"
 +
</source>
  
 
Then restart the VM and its should be in the correct resolution, like mine shown in the picture below which is the OS X virtual machine running in full screen mode at the native resolution of the panel.
 
Then restart the VM and its should be in the correct resolution, like mine shown in the picture below which is the OS X virtual machine running in full screen mode at the native resolution of the panel.
Line 44: Line 48:
 
== Problems using external USB storage devices on Windows guests ==
 
== Problems using external USB storage devices on Windows guests ==
 
We came across the problem of external USB drives being greyed out when trying to access them from the guest windows system. Fortunately the solution is pretty simple:
 
We came across the problem of external USB drives being greyed out when trying to access them from the guest windows system. Fortunately the solution is pretty simple:
{{code|<pre>sudo addgroup YOU vboxusers</pre>}}
+
<source>
 +
sudo addgroup YOU vboxusers
 +
</source>
 
You then have to restart, because the kernel needs to be reloaded. This is described in more detail [http://news.softpedia.com/news/How-to-Fix-VirtualBox-USB-Support-111715.shtml here].
 
You then have to restart, because the kernel needs to be reloaded. This is described in more detail [http://news.softpedia.com/news/How-to-Fix-VirtualBox-USB-Support-111715.shtml here].
  

Revision as of 18:11, 22 May 2015

VirtualBox is a general-purpose full virtualizer for x86 hardware. Targeted at server, desktop and embedded use, it is now the only professional-quality virtualization solution that is also Open Source Software. Quoted from VirtualBox home page. Download the latest version here.

This page discusses the use of VirtualBox on Ubuntu host systems. We use the software to run other operating systems such Windows XP and vista, in order to document procedures or help clients who run such software.

Running a virtual OS X

Running Mac OS X in a virtual box was quite a difficult achievement in the past, but nowadays there's some helpful utilities that make the process a lot easier, in fact there's even full VirtualBox OS X disk images around so that you don't even need to go through the installation process at all. The two main utilties are called iBoot and MultiBeast which are available from tonymacx86 (registration required to access files), and the basic procedure for using them is described here.

Create a new virtual machine with Mac OS X operating system, 1.5GB RAM, a 20GB SATA disk, and then ensure that VT, Nested Paging and PAE are enabled and that EFI boot loader is disabled.

The first utility iBoot is required to boot the OS X installation iso or dmg. When the installation asks where to install to, there are no options, so the disk utility needs to be used to create a partition (shown in the screenshots below). The installation should succeed, but iBoot will still be required to boot the hard disk. To allow the installed system to boot normally by itself, the second utility, MultiBeast is required which is installed inside the OS X virtual machine and will install a boot loader. Set the EasyBeast install and Customisation/Boot Options/32 Bit Apple Boot Screen (or 64 bit if you used a 64 bit installation), here's a screen shot of my MultiBeast configuration.

Here's some screen shots I took along the way as I tested the iBoot and MultiBeast method.

OSX-VBox-1.jpg OSX-VBox-2.jpg OSX-VBox-3.jpg
OSX-VBox-4.jpg OSX-VBox-6.jpg OSX-VBox-7.jpg

Changing screen resolution

The only thing I found to be a bit of a problem was getting the default screen resolution of 1024x768 to change to the native resolution of may laptop panel which is 1366x768. All the various instructions I'd found from Google searches didn't work, but I found a combination that did. First in the virtual machine I had to add the following key and value to /Extra/org.chameleon.Boot.plist, some instructions say /Library/Preferences/SystemConfiguration/com.apple.Boot.plist, but this didn't work for me. Note that editing this file needs to be done by the root user.

<key>Graphics Mode</key>
<string>1366x768x32</string>

And this same resolution then needs to be added to the Virtual Box options after stopping the machine. Be sure to use the exact name of your virtual machine, use VBoxManage list vms if unsure and copy/paste.

VBoxManage setextradata "OS X" "CustomVideoMode1" "1366x768x32"

Then restart the VM and its should be in the correct resolution, like mine shown in the picture below which is the OS X virtual machine running in full screen mode at the native resolution of the panel.

DellOSX.jpg

Using shared folders

This applies for Windows XP and Vista guest OS.

  • Install Guest Additions (Devices > Install Guest Additions)
  • Click on folder icon on the bottom of the VirtualBox
  • Create a new shared folder: select a directory on Host and choose a name (e.g. my_shared_folder)
  • On a command shell (cmd) and type net use x: \\vboxsrv\my_shared_folder
  • Where x: is a free device letter.
  • You should now be able to browse the shared folder by going to "My Computer" on the guest OS

Problems using external USB storage devices on Windows guests

We came across the problem of external USB drives being greyed out when trying to access them from the guest windows system. Fortunately the solution is pretty simple:

sudo addgroup YOU vboxusers

You then have to restart, because the kernel needs to be reloaded. This is described in more detail here.

No audio on Windows 7 32-bit guest

Setting up a Windows 7 32-bit guest was fairly easy, except that audio does not work out-of-the-box. The problem is referred to here, and the most straightforward solution is to use Windows Update to get the driver.

Windows7 32bit ac97 driver.png

Feedback: VMware image failed to work in my VirtualBox on Ubuntu.