Difference between revisions of "VirtualBox"

From Sugar Labs
Jump to navigation Jump to search
Line 1: Line 1:
 
{{TOCright}}
 
{{TOCright}}
[[wikipedia:VirtualBox|VirtualBox]] is an x86 virtualization system available as either GPL or commercial software. It runs on either Win32, Intel Mac or Linux host machines, allowing you to run [[Emulator image files|Sugar images]] within the virtual machine. The following instructions are mostly for VirtualBox OSE (Open Source Edition), which is available in packages in many Linux distributions. You can also download it and its documentation from the [http://www.virtualbox.org/ VirtualBox.org] Web site.
+
 
==Disc images==
+
With [[wikipedia:VirtualBox|VirtualBox<sup>®</sup>]] one can run [[Emulator image files|Sugar]] on Microsoft Windows, Intel-based  Apple Macintosh, or Linux host computers from within a virtual machine window.
 +
 
 +
The following instructions are intended for new Learners.
 +
 
 +
(See [[VirtualBox/Technical]] for some collected details and the [http://www.virtualbox.org/ VirtualBox.org] Web site.)
 +
==Sugar disc images==
 
===Sugar on a Stick===
 
===Sugar on a Stick===
These are instructions for using a copy of Sugar on a Stick, configured to run in a VirtualBox<sup>®</sup> virtual appliance (a virtual machine disc image ready to run in the VirtualBox host application).
+
These are instructions for using a copy of [[Sugar on a Stick]], configured to run in a VirtualBox<sup>®</sup> virtual appliance (a virtual machine disc image ready to run in the VirtualBox host application).
  
 
* Download http://www.sugarlabs.org/static/soas/soas-strawberry-vdi.zip (dated: 24 June 2009)
 
* Download http://www.sugarlabs.org/static/soas/soas-strawberry-vdi.zip (dated: 24 June 2009)
 
* Unzip the file you just downloaded and remember where you put it - you'll get a .vdi file.
 
* Unzip the file you just downloaded and remember where you put it - you'll get a .vdi file.
* Follow the instructions below to get and configure the VirtualBox host application.
+
* Follow the instructions below to download and configure the VirtualBox host application.
  
Please be aware of the fact that this is still beta quality and not at all ready for production use. You might want to create your own VirtualBox disc image from another snapshot or iso disc file. Instructions to do so are located here, [[VirtualBox/Preparing a disk image]].
+
Please be aware that this is still beta quality and not at all ready for production use. You might want to create your own VirtualBox disc image from another snapshot or iso disc file. Instructions to do so are located here, [[VirtualBox/Preparing a disk image]].
===QEMU image conversion===
 
You can also convert .img image files from [[QEMU]] formats, such as qcow2, to vmdk format, which VirtualBox can open. The qemu-img command usually detects the source image format automatically.
 
 
 
$ qemu-img convert -O vmdk file.img file.vmdk
 
  
 
==Install VirtualBox==
 
==Install VirtualBox==
=== OS X ===
+
=== on OS X - the Apple Macintosh operating system ===
  
 
# Download VirtualBox for OS X from here, http://www.virtualbox.org/wiki/Downloads
 
# Download VirtualBox for OS X from here, http://www.virtualbox.org/wiki/Downloads
Line 32: Line 33:
 
You can watch a screencast video of the rest of the process on a Mac here: http://tinyurl.com/nz4rhd.
 
You can watch a screencast video of the rest of the process on a Mac here: http://tinyurl.com/nz4rhd.
  
=== Windows ===
+
=== on Microsoft Windows ===
  
 
: Download from http://www.virtualbox.org/wiki/Downloads.
 
: Download from http://www.virtualbox.org/wiki/Downloads.
  
=== Linux ===
+
=== on GNU/Linux ===
 
:See http://www.virtualbox.org/wiki/Linux_Downloads
 
:See http://www.virtualbox.org/wiki/Linux_Downloads
 
:For Ubuntu, it is available in Synaptic Package Manager, once you add the the URI, distribution & components to your 3rd-party software sources or enter the following in your /etc/apt/sources.list.
 
:For Ubuntu, it is available in Synaptic Package Manager, once you add the the URI, distribution & components to your 3rd-party software sources or enter the following in your /etc/apt/sources.list.
deb <nowiki>http://download.virtualbox.org/virtualbox/debian</nowiki> <distribution> non-free
+
::{{Code|deb <nowiki>http://download.virtualbox.org/virtualbox/debian</nowiki> <distribution> non-free}}
 
 
:Install '''dkms''', as well, so upgrades will update the kernel modules.
 
 
 
Ubuntu 8.04 Hardy: Use downloaded file from link above, Synaptic does not load Virtual Box that works [satellit 05/08/2009]
 
 
 
====Install on USB disc====
 
(2-GB or larger USB storage device needed to run VirtualBox Images)
 
  
One could modify the instructions at [[VMware#One_8-GiB_stick_with_2_partitions]]
+
:Install '''dkms''', as well, so upgrades to your system will update the kernel modules.
* Download VirtualBox OSE program, and install instead of VMPlayer.
 
* Boot PC from stick, and run images on same or 2nd stick.
 
==Experimental Prebuilt VirtualBox 4GB Blueberry.vdi files==
 
* Prebuilt : '''Blueberrycleared.vdi.tar.gz''' [http://people.sugarlabs.org/Tgillard/Blueberrycleared.vdi.tar.gz]'''soas-blueberry-vmdk-1.zip''' [http://people.sugarlabs.org/wadeb/soas-blueberry-vmdk-1.zip]
 
* ReadMe:[http://people.sugarlabs.org/Tgillard/Blueberrycleared.txt]
 
  
==Virtualbox 3.2.1 on 16GB Toshiba USB Running Ubuntu 9.10 Karmic==
+
:(See the [[Talk:VirtualBox]] page for experimental installation variations.)
A nice portable USB Stick solution [http://wiki.sugarlabs.org/go/Talk:VirtualBox]
 
  
 
==Setup a Virtual Machine for Sugar on a Stick==
 
==Setup a Virtual Machine for Sugar on a Stick==
(You can watch a screencast video of the process on a Mac here: http://tinyurl.com/nz4rhd.)
+
{{Iframe|You can watch a screencast video of the process on a Mac here: |http://www.screencast.com/users/solutiongrove/folders/Jing/media/2ab6e487-6bee-4517-b099-a96aab0e0098
 +
|940|896|1}}
 
# In VirtualBox click New
 
# In VirtualBox click New
 
# Click Next
 
# Click Next
Line 90: Line 79:
 
* On Mac keyboards, you might wish to change the Virtual Box default key for switching the Sugar cursor to the normal one, as the default key (control right arrow on Mac keyboards) is trapped by Sugar. (Windows and Linux keyboards use Right Ctrl.) You may do this change in File/settings of the Virtual Box menu.
 
* On Mac keyboards, you might wish to change the Virtual Box default key for switching the Sugar cursor to the normal one, as the default key (control right arrow on Mac keyboards) is trapped by Sugar. (Windows and Linux keyboards use Right Ctrl.) You may do this change in File/settings of the Virtual Box menu.
  
==Mounting Drives==
 
 
===Hard Drives===
 
 
When booting from a CD image, with a hard drive image attached, you can mount the hard drive by creating an empty directory to mount it on. The form of the command is
 
 
$ mount -t ext3 /dev/sda1 /mnt/drive
 
 
for the first hard drive. The mount point can be anywhere you have permission to create a directory, although /mnt and ~/mnt are the usual choices.
 
 
This gives you a place to save files that cannot be written to CDs.
 
 
===USB===
 
 
USB access is not available in the Open Source Edition of VirtualBox.
 
 
In order to access USB storage devices, the user must have access to the usbfs file system. The permissions for usbfs can be changed by editing the /etc/fstab file.
 
 
For example, most Linux distributions have a user group called usb or similar, of which the current user must be a member. To give all users of that group access to usbfs, make sure the following line is present in /etc/fstab:
 
 
# 85 is the USB group
 
none /proc/bus/usb usbfs devgid=85,devmode=664 0 0
 
 
Replace 85 with the group ID that matches your system (search /etc/group for "usb" or similar).
 
 
After this, you should be able to mount real USB drives in the normal manner.
 
 
===Shared Directories===
 
 
In order to access a directory on your real hard drive, VirtualBox needs the Guest Additions installed.
 
 
Mount the VBoxGuestAdditions.iso file
 
 
Change to the directory where your CD-ROM drive is mounted and execute as root:
 
 
sh ./VBoxLinuxAdditions-x86.run
 
 
In a 64-bit Linux guest, use VBoxLinuxAdditions-amd64.run instead.
 
 
After this installation, you can create a share in the VirtualBox GUI, and mount it in somewhat the normal way, but with the vboxsf file system type.
 
 
mount -t vboxsf [-o OPTIONS] sharename mountpoint
 
  
 
==Resources==
 
==Resources==

Revision as of 22:10, 10 May 2010

With VirtualBox® one can run Sugar on Microsoft Windows, Intel-based Apple Macintosh, or Linux host computers from within a virtual machine window.

The following instructions are intended for new Learners.

(See VirtualBox/Technical for some collected details and the VirtualBox.org Web site.)

Sugar disc images

Sugar on a Stick

These are instructions for using a copy of Sugar on a Stick, configured to run in a VirtualBox® virtual appliance (a virtual machine disc image ready to run in the VirtualBox host application).

Please be aware that this is still beta quality and not at all ready for production use. You might want to create your own VirtualBox disc image from another snapshot or iso disc file. Instructions to do so are located here, VirtualBox/Preparing a disk image.

Install VirtualBox

on OS X - the Apple Macintosh operating system

  1. Download VirtualBox for OS X from here, http://www.virtualbox.org/wiki/Downloads
  2. If you haven't done so yet, you should start the download of the Sugar on a Stick vdi zip file (above).
  3. Install it by opening the DMG.
  4. Follow the instructions in the window
    1. Double click VirtualBox.mpkg
    2. If you see a warning about running a program from the Internet, click OK to run it.
    3. Click continue until you see the license popup, click Agree.
    4. Choose location to install, probably something like Macintosh HD, then click Continue.
    5. Click Continue, then Install. Enter password, if required.
  5. Now you can run VirtualBox by opening the Applications folder and double clicking on the icon.
  6. Next Follow the instructions Setup a Virtual Machine for Sugar on a Stick

You can watch a screencast video of the rest of the process on a Mac here: http://tinyurl.com/nz4rhd.

on Microsoft Windows

Download from http://www.virtualbox.org/wiki/Downloads.

on GNU/Linux

See http://www.virtualbox.org/wiki/Linux_Downloads
For Ubuntu, it is available in Synaptic Package Manager, once you add the the URI, distribution & components to your 3rd-party software sources or enter the following in your /etc/apt/sources.list.
deb http://download.virtualbox.org/virtualbox/debian <distribution> non-free
Install dkms, as well, so upgrades to your system will update the kernel modules.
(See the Talk:VirtualBox page for experimental installation variations.)

Setup a Virtual Machine for Sugar on a Stick

You can watch a screencast video of the process on a Mac here:
  1. In VirtualBox click New
  2. Click Next
  3. Enter a name "Sugar"
  4. Operating System: choose Linux
  5. Version: choose Fedora
  6. Click Next
  7. For memory leave 256 MB
  8. Click Next
  9. Virtual Hard Disk click Existing
  10. Click the little folder to the right of the selection box
    1. A new window pops up
    2. Click Add button in the toolbar
    3. Browse to the location where you extracted the .vdi disk image
    4. Click Open
    5. Click Select
  11. Click Next
  12. Click Finish
  13. Select Sugar on the left
  14. Click Start in the toolbar
  15. After a minute or two you should see the Sugar screen asking for you name
  16. Enter your name
  17. Click Done at the bottom of the window. You might have to scroll.
  18. From now on you can start VirtualBox and start the "Sugar" virtual machine

Issues

  • Activating the Frame might be a little difficult. The lower 2 corners are easiest and you may want to configure edge activation in the My Settings > Frame panel. With VirtualBox Guest Additions installed (see here), only the bottom edge and corners are available for Frame activation.
  • On Mac keyboards, you might wish to change the Virtual Box default key for switching the Sugar cursor to the normal one, as the default key (control right arrow on Mac keyboards) is trapped by Sugar. (Windows and Linux keyboards use Right Ctrl.) You may do this change in File/settings of the Virtual Box menu.


Resources