Difference between revisions of "VirtualBox"
(→Make VM available from different user accounts on one computer) |
|||
Line 32: | Line 32: | ||
* Wizard-driven VM Creation. | * Wizard-driven VM Creation. | ||
* Easy to Install and Operate. | * Easy to Install and Operate. | ||
+ | |||
+ | Interface Example: | ||
+ | |||
+ | [[File:Virtualbox-interface-ex95.jpg]] | ||
== basic usage == | == basic usage == |
Revision as of 18:11, 2 July 2015
VirtualBox is virtualization host software that runs as an application on an established operating system. With VirtualBox you can install it on your existing Operating System and create and manage guest virtual machines, each with a guest operating system and its own virtual environment.
VirtualBox runs on Windows, Linux, Macintosh, and Solaris hosts and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8), DOS/Windows 3.x, Linux (2.4, 2.6 and 3.x), Solaris and OpenSolaris, OS/2, and OpenBSD.
The core of VirtualBox is free software released under GNU General Public License version 2 (GPLv2).
Features
This is not a comprehensive list since virtualbox is truly very large in scope and capability.
- Open Source.
- Free Software.
- 64-bit Guests.
- Full Virtualization.
- Linux, Windows, Mac, DOS, Novell, Solaris Guests.
- Cross-Platform Host Support.
- Guest SMP Support up to 32 vCPUs.
- USB Support.
- Full ACPI Support.
- Dynamic Screen Resolutions.
- iSCSI Storage Support.
- PXE Network Booting.
- Snapshot Support.
- Remote Machine Display.
- Extensible RDP Authentication.
- USB over RDP.
- Guest and Host Shared Folders.
- Guest Additions ( Think VMware Tools).
- Command Line Capability.
- OVF Support.
- VM Import/Export.
- Thick and Thin Provisioning.
- Wizard-driven VM Creation.
- Easy to Install and Operate.
Interface Example:
basic usage
First you need to know what key is defined as the HOST key. Typically the default HOST key is the RIGHT CONTROL KEY. The bottom right of the Virtualbox Running VM window will indicate the currently defined HOST key.
- Switch to Fullscreen Mode -> HOST_KEY + F
support
Online User Manual
The link is: Oracle VM VirtualBox User Manual
Increase size of virtual disk
Applies to a virtual drive VDI file. Use the command 'VBoxManage' as this must be done from the console (MS-DOS prompt). For Windows XP the VBoxManage is not in the path by default, and the default base directory is Program Files. The space causes an error. To avoid, the following example is provided for Windows XP users:
C:\Progra~1\Oracle\VirtualBox\VBoxManage modifyhd "Win XP SP3 Image.vdi" --resize 45888
note: You will need to navigate to the path that contains your vdi file prior to execution of the command above! In Windows XP these are typically in a subdirectory of the following:
C:\Documents and Settings\<username>\VirtualBox VMs
Here the VBoxManage command is used to resize a 10GB image to 45GB. The quotes around the image name prevent an error due to the spaces. The use of the 8 char substitute Progra~1 prevents an error.
If you were viewing the virtual drive in Virtual Media Manager GUI, you will have to exit out and close Oracle VM VirtualBox Manager. When you open it again you will see the new size.
For Windows XP if you now start the virtual machine and goto Administrative Tools, Computer Management, Disk Management you will notice unpartitioned space. You can create a new drive letter second partition on the space. If you prefer to increase the primary partition for Windows XP you will need a 3rd party tool such as GParted via Gnome Partition Editor (download the ISO, mount it and boot from it when starting the partition. First load the VM/Win XP, on the VM menu choose Devices, CD/DVD devices, and mount the ISO of Gnome Partition Editor. Shutdown the VM. VM Settings, System, Boot Order, CD/DVD and boot Gnome Partition Editor.) Link: GParted Live CD
Howto Register and Load a vdi Image
Create a new virtual machine: in “VM Name and OS Type”, choose one of “Linux”, “BSD” or whatever matches your OS. Choose the profile that best fits your image in “Version” (for example, if you downloaded an Ubuntu virtual disk image, choose the “Linux” and “Ubuntu” pair). If you have a disk image of a Linux distribution not shown in the drop down list, choose “Linux 2.6″ or “Linux 2.6 (64 bit)” Try to find and use the best possible match for the host operating system within the image file. For memory size you can use the default or add more depending on your needs. Probably use no less than 512MB. On the Hard drive screen it is important that you select USE EXISTING HARD DISK and click the folder image to browse and select your vdi image file.
Example A: For Android image AndroidLive01
- Name and Operating System: type Linux, version Linux 2.6
- Memory Size: 512MB
- Hard drive: Under virtual hard disk, select Use existing hard disk option and browse for AndroidLive01.vdi
- Click CREATE
Make VM available from different user accounts on one computer
First you have to locate the virtual hard drive of the shared machine in a directory where different users have appropriate permissions. By default VirtualBox puts the VMs in your home directory in a path like:
/home/username/VirtualBox VMs
This can be moved to a location where all users have permission to access the VMs.
Make the VirtualBox VMs directory under /home so all users can access it.
mkdir /home/VirtualBox\ VMs groupadd vboxusers usermod -aG vboxusers nicolep
We created a group vboxusers and added a user nicolep to the group.
For all VMs we can chgrp vboxusers * and chmod 775 *
To change default folder on GUI client: File -> Preferences -> General and with command line:
VBoxManage setproperty machinefolder /home/VirtualBox\ VMs
For existing VMs the second user will not be able to see those created under the first user's x.org login session because VirtualBox has a configuration file that lists the VMs. If user 1 is Joe and user 2 is Nicole, we want to make it so Nicole can use Joe's VMs.
cp /home/joe/.config/VirtualBox/VirtualBox.xml /home/nicole/.config/VirtualBox/VirtualBox.xml
Now they both have the same list of VMs.
Next problem is permissions. Every time Joe opens a VM under his login, the permissions get changed locking Nicole out. VirtualBox takes ownership of the VM and changes the permissions resulting in the following error afterwards when you switch user accounts.
The commands have to be manually entered again.
cd /home/VirtualBox\ VMs chgrp vboxusers * -R chmod 775 * -R
Having to change the permissions back each time you login as the other user is not desirable. There are some workarounds suggested by sources online.
See other comments in the discussion tab.
GUESTADDONS DOES NOT WORK IN CONSOLE ONLY, REQUIRES X.ORG
actually: it is said that you can do it in console only.
all of this is moot......................... On the GUEST when it is CentOS:
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.i686.rpm rpm -K rpmforge-release-0.5.3-1.el6.rf.*.rpm rpm -i rpmforge-release-0.5.3-1.el6.rf.*.rpm yum install dkms
Now go to the menu: Devices -> CD/DVD Devices -> Choose a virtual CD/DVD disk file... select: VBoxGuestAdditions_2_2.0.iso
mkdir /mnt/cdrom mount /dev/scd0 /mnt/cdrom
yum install dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
ref: https://forums.virtualbox.org/viewtopic.php?f=7&t=67631
Online Resources
Download Free VirtualBox Images
Many VirtualBox images, complete with installed operating systems, are available for download from the website
These are images containing free, open source, or free to share operating systems and software only.