Wednesday, December 14, 2011

How to upgrade kernel in Linux CentOS

Here's is the guide for you all to update kernel in Linux..especially in Centos...Why the need for upgrading Kernel..might be your existing kernel crashes periodically...or the update you need would not be available in the current Linux version....However if we get a situation to upgrade Linux kernel...do the following...

The most important thing is if you update the kernel..it will automatically update some of the packages like httpd, MySQL. If you want to exclude these changes modify the file,
/etc/yum.conf

as

[main]

exclude=courier* apache* mod_ssl* httpd* perl mysql* php* spamassassin* exim*

cachedir=/var/cache/yum

debuglevel=2

logfile=/var/log/yum.log

pkgpolicy=newest

distroverpkg=centos-release

tolerant=1

exactarch=1

retries=20

obsoletes=1

gpgcheck=1

 

# PUT YOUR REPOS HERE OR IN separate files named file.repo

# in /etc/yum.repos.d

First you need to check the current version of Kernel..type the below command in the prompt
 

uname -a

Most of the admin uses "yum upgrade kernel" to update the Kernel version..

yum upgrade kernel

Nothing to do.
the newer kernel version is not present in the Repo you are curretly using, you need to find out the corresponding repo for the needed kernel...here we are going to upgrade the kernel from kernel-2.6.18-32 to kernel-2.6.18-238.5.1.1
but that kernel version was not found in the default repo.... so we need to find a exact one...for this version I have found one which is given below...

Create a new file called centalt.repo file in /etc/yum.repos.d/ and paste the below contents.....

[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0

Then try


yum update kernel*

It will automatically add a new entry in grub.conf file....so just reboot the server and check..

uname -a

Kernel version is Updated ! ! ! !

How to upgrade kernel in Linux CentOS

Here's is the guide for you all to update kernel in Linux..especially in Centos...Why the need for upgrading Kernel..might be your existing kernel crashes periodically...or the update you need would not be available in the current Linux version....However if we get a situation to upgrade Linux kernel...do the following...

The most important thing is if you update the kernel..it will automatically update some of the packages like httpd, MySQL. If you want to exclude these changes modify the file,
/etc/yum.conf

as

[main]

exclude=courier* apache* mod_ssl* httpd* perl mysql* php* spamassassin* exim*

cachedir=/var/cache/yum

debuglevel=2

logfile=/var/log/yum.log

pkgpolicy=newest

distroverpkg=centos-release

tolerant=1

exactarch=1

retries=20

obsoletes=1

gpgcheck=1

 

# PUT YOUR REPOS HERE OR IN separate files named file.repo

# in /etc/yum.repos.d

First you need to check the current version of Kernel..type the below command in the prompt
 

uname -a

Most of the admin uses "yum upgrade kernel" to update the Kernel version..

yum upgrade kernel

Nothing to do.
the newer kernel version is not present in the Repo you are curretly using, you need to find out the corresponding repo for the needed kernel...here we are going to upgrade the kernel from kernel-2.6.18-32 to kernel-2.6.18-238.5.1.1
but that kernel version was not found in the default repo.... so we need to find a exact one...for this version I have found one which is given below...

Create a new file called centalt.repo file in /etc/yum.repos.d/ and paste the below contents.....

[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0

Then try


yum update kernel*

It will automatically add a new entry in grub.conf file....so just reboot the server and check..

uname -a

Kernel version is Updated ! ! ! !

How to upgrade kernel in Linux CentOS

Here's is the guide for you all to update kernel in Linux..especially in Centos...

Why the need for upgrading Kernel..might be your existing kernel crashes periodically...or the update you need would not be available in the current Linux version....However if we get a situation to upgrade Linux kernel...do the following...

The most important thing is if you update the kernel..it will automatically update some of the packages like httpd, MySQL. If you want to exclude these changes modify the file,

/etc/yum.conf
as
[main]
exclude=courier* apache* mod_ssl* httpd* perl mysql* php* spamassassin* exim*
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=centos-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

First you need to check the current version of Kernel..type the below command in the prompt

uname -a

Most of the admin uses "yum upgrade kernel" to update the Kernel version..

yum upgrade kernel

Nothing to do.
the newer kernel version is not present in the Repo you are curretly using, you need to find out the corresponding repo for the needed kernel...here we are going to upgrade the kernel from kernel-2.6.18-32 to kernel-2.6.18-238.5.1.1
but that kernel version was not found in the default repo.... so we need to find a exact one...for this version I have found one which is given below...


Create a new file called centalt.repo file in /etc/yum.repos.d/ and paste the below contents.....


[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0


Then try


yum update kernel*

It will automatically add a new entry in grub.conf file....so just reboot the server and check..

uname -a

Kernel version is Updated ! ! ! !


Thursday, September 22, 2011

Creating your first virtual machine

Creating your first virtual machine

Click on the "New" button at the top of the VirtualBox Manager window. A wizard will pop up to guide you through setting up a new virtual machine (VM):



On the following pages, the wizard will ask you for the bare minimum of information that is needed to create a VM, in particular:

1. The VM name will later be shown in the VM list of the VirtualBox Manager window, and it will be used for the VM's files on disk. Even though any name could be used, keep in mind that once you have created a few VMs, you will appreciate if you have given your VMs rather informative names; "My VM" would thus be less useful than "Windows XP SP2 with OpenOffice".
2. For "Operating System Type", select the operating system that you want to install later. The supported operating systems are grouped; if you want to install something very unusual that is not listed, select "Other". Depending on your selection, VirtualBox will enable or disable certain VM settings that your guest operating system may require. This is particularly important for 64-bit guests (see the section called “64-bit guests”). It is therefore recommended to always set it to the correct value.
3. On the next page, select the memory (RAM) that VirtualBox should allocate every time the virtual machine is started. The amount of memory given here will be taken away from your host machine and presented to the guest operating system, which will report this size as the (virtual) computer's installed RAM.
Note: Choose this setting carefully! The memory you give to the VM will not be available to your host OS while the VM is running, so do not specify more than you can spare. For example, if your host machine has 1 GB of RAM and you enter 512 MB as the amount of RAM for a particular virtual machine, while that VM is running, you will only have 512 MB left for all the other software on your host. If you run two VMs at the same time, even more memory will be allocated for the second VM (which may not even be able to start if that memory is not available). On the other hand, you should specify as much as your guest OS (and your applications) will require to run properly.

A Windows XP guest will require at least a few hundred MB RAM to run properly, and Windows Vista will even refuse to install with less than 512 MB. Of course, if you want to run graphics-intensive applications in your VM, you may require even more RAM.

So, as a rule of thumb, if you have 1 GB of RAM or more in your host computer, it is usually safe to allocate 512 MB to each VM. But, in any case, make sure you always have at least 256 to 512 MB of RAM left on your host operating system. Otherwise you may cause your host OS to excessively swap out memory to your hard disk, effectively bringing your host system to a standstill.

As with the other settings, you can change this setting later, after you have created the VM.
4. Next, you must specify a virtual hard disk for your VM.
There are many and potentially complicated ways in which VirtualBox can provide hard disk space to a VM (see Chapter 5, Virtual storage for details), but the most common way is to use a large image file on your "real" hard disk, whose contents VirtualBox presents to your VM as if it were a complete hard disk. This file represents an entire hard disk then, so you can even copy it to another host and use it with another VirtualBox installation.

The wizard shows you the following window:


Here you have the following options:
* To create a new, empty virtual hard disk, press the "New" button.
* You can pick an existing disk image file.

The drop-down list presented in the window contains all disk images which are currently remembered by VirtualBox, probably because they are currently attached to a virtual machine (or have been in the past).
Alternatively, you can click on the small folder button next to the drop-down list to bring up a standard file dialog, which allows you to pick any disk image file on your host disk.
Most probably, if you are using VirtualBox for the first time, you will want to create a new disk image. Hence, press the "New" button.
This brings up another window, the "Create New Virtual Disk Wizard", which helps you create a new disk image file in the new virtual machine's folder.
VirtualBox supports two types of image files:
* A dynamically allocated file will only grow in size when the guest actually stores data on its virtual hard disk. It will therefore initially be small on the host hard drive and only later grow to the size specified as it is filled with data.
* A fixed-size file will immediately occupy the file specified, even if only a fraction of the virtual hard disk space is actually in use. While occupying much more space, a fixed-size file incurs less overhead and is therefore slightly faster than a dynamically allocated file.
For details about the differences, please refer to the section called “Disk image files (VDI, VMDK, VHD, HDD)”.
To prevent your physical hard disk from running full, VirtualBox limits the size of the image file. Still, it needs to be large enough to hold the contents of your operating system and the applications you want to install -- for a modern Windows or Linux guest, you will probably need several gigabytes for any serious use:
After having selected or created your image file, again press "Next" to go to the next page.
5. After clicking on "Finish", your new virtual machine will be created. You will then see it in the list on the left side of the Manager window, with the name you entered initially.



Running your virtual machine
To start a virtual machine, you have several options:
* Double-click on its entry in the list within the Manager window or
* select its entry in the list in the Manager window it and press the "Start" button at the top or
* for virtual machines created with VirtualBox 4.0 or later, navigate to the "VirtualBox VMs" folder in your system user's home directory, find the subdirectory of the machine you want to start and double-click on the machine settings file (with a .vbox file extension).
This opens up a new window, and the virtual machine which you selected will boot up. Everything which would normally be seen on the virtual system's monitor is shown in the window, as can be seen with the image in the section called “Some terminology”.

In general, you can use the virtual machine much like you would use a real computer. There are couple of points worth mentioning however.
Starting a new VM for the first time
When a VM gets started for the first time, another wizard -- the "First Start Wizard" -- will pop up to help you select an installation medium. Since the VM is created empty, it would otherwise behave just like a real computer with no operating system installed: it will do nothing and display an error message that no bootable operating system was found.
For this reason, the wizard helps you select a medium to install an operating system from.
* If you have physical CD or DVD media from which you want to install your guest operating system (e.g. in the case of a Windows installation CD or DVD), put the media into your host's CD or DVD drive.
Then, in the wizard's drop-down list of installation media, select "Host drive" with the correct drive letter (or, in the case of a Linux host, device file). This will allow your VM to access the media in your host drive, and you can proceed to install from there.
* If you have downloaded installation media from the Internet in the form of an ISO image file (most probably in the case of a Linux distribution), you would normally burn this file to an empty CD or DVD and proceed as just described. With VirtualBox however, you can skip this step and mount the ISO file directly. VirtualBox will then present this file as a CD or DVD-ROM drive to the virtual machine, much like it does with virtual hard disk images.
For this case, the wizard's drop-down list contains a list of installation media that were previously used with VirtualBox.
If your medium is not in the list (especially if you are using VirtualBox for the first time), select the small folder icon next to the drop-down list to bring up a standard file dialog, with which you can pick the image file on your host disks.
In both cases, after making the choices in the wizard, you will be able to install your operating system.
Capturing and releasing keyboard and mouse
As of version 3.2, VirtualBox provides a virtual USB tablet device to new virtual machines through which mouse events are communicated to the guest operating system. As a result, if you are running a modern guest operating system that can handle such devices, mouse support may work out of the box without the mouse being "captured" as described below; see the section called “"Motherboard" tab” for more information.
Otherwise, if the virtual machine only sees standard PS/2 mouse and keyboard devices, since the operating system in the virtual machine does not "know" that it is not running on a real computer, it expects to have exclusive control over your keyboard and mouse. This is, however, not the case since, unless you are running the VM in full-screen mode, your VM needs to share keyboard and mouse with other applications and possibly other VMs on your host.
As a result, initially after installing a guest operating system and before you install the Guest Additions (we will explain this in a minute), only one of the two -- your VM or the rest of your computer -- can "own" the keyboard and the mouse. You will see a second mouse pointer which will always be confined to the limits of the VM window. Basically, you activate the VM by clicking inside it.
To return ownership of keyboard and mouse to your host operating system, VirtualBox reserves a special key on your keyboard for itself: the "host key". By default, this is the right Control key on your keyboard; on a Mac host, the default host key is the left Command key. You can change this default in the VirtualBox Global Settings. In any case, the current setting for the host key is always displayed at the bottom right of your VM window, should you have forgotten about it:

Next

Creating your first virtual machine

Creating your first virtual machine

Click on the "New" button at the top of the VirtualBox Manager window. A wizard will pop up to guide you through setting up a new virtual machine (VM):



On the following pages, the wizard will ask you for the bare minimum of information that is needed to create a VM, in particular:

1. The VM name will later be shown in the VM list of the VirtualBox Manager window, and it will be used for the VM's files on disk. Even though any name could be used, keep in mind that once you have created a few VMs, you will appreciate if you have given your VMs rather informative names; "My VM" would thus be less useful than "Windows XP SP2 with OpenOffice".
2. For "Operating System Type", select the operating system that you want to install later. The supported operating systems are grouped; if you want to install something very unusual that is not listed, select "Other". Depending on your selection, VirtualBox will enable or disable certain VM settings that your guest operating system may require. This is particularly important for 64-bit guests (see the section called “64-bit guests”). It is therefore recommended to always set it to the correct value.
3. On the next page, select the memory (RAM) that VirtualBox should allocate every time the virtual machine is started. The amount of memory given here will be taken away from your host machine and presented to the guest operating system, which will report this size as the (virtual) computer's installed RAM.
Note: Choose this setting carefully! The memory you give to the VM will not be available to your host OS while the VM is running, so do not specify more than you can spare. For example, if your host machine has 1 GB of RAM and you enter 512 MB as the amount of RAM for a particular virtual machine, while that VM is running, you will only have 512 MB left for all the other software on your host. If you run two VMs at the same time, even more memory will be allocated for the second VM (which may not even be able to start if that memory is not available). On the other hand, you should specify as much as your guest OS (and your applications) will require to run properly.

A Windows XP guest will require at least a few hundred MB RAM to run properly, and Windows Vista will even refuse to install with less than 512 MB. Of course, if you want to run graphics-intensive applications in your VM, you may require even more RAM.

So, as a rule of thumb, if you have 1 GB of RAM or more in your host computer, it is usually safe to allocate 512 MB to each VM. But, in any case, make sure you always have at least 256 to 512 MB of RAM left on your host operating system. Otherwise you may cause your host OS to excessively swap out memory to your hard disk, effectively bringing your host system to a standstill.

As with the other settings, you can change this setting later, after you have created the VM.
4. Next, you must specify a virtual hard disk for your VM.
There are many and potentially complicated ways in which VirtualBox can provide hard disk space to a VM (see Chapter 5, Virtual storage for details), but the most common way is to use a large image file on your "real" hard disk, whose contents VirtualBox presents to your VM as if it were a complete hard disk. This file represents an entire hard disk then, so you can even copy it to another host and use it with another VirtualBox installation.

The wizard shows you the following window:


Here you have the following options:
* To create a new, empty virtual hard disk, press the "New" button.
* You can pick an existing disk image file.

The drop-down list presented in the window contains all disk images which are currently remembered by VirtualBox, probably because they are currently attached to a virtual machine (or have been in the past).
Alternatively, you can click on the small folder button next to the drop-down list to bring up a standard file dialog, which allows you to pick any disk image file on your host disk.
Most probably, if you are using VirtualBox for the first time, you will want to create a new disk image. Hence, press the "New" button.
This brings up another window, the "Create New Virtual Disk Wizard", which helps you create a new disk image file in the new virtual machine's folder.
VirtualBox supports two types of image files:
* A dynamically allocated file will only grow in size when the guest actually stores data on its virtual hard disk. It will therefore initially be small on the host hard drive and only later grow to the size specified as it is filled with data.
* A fixed-size file will immediately occupy the file specified, even if only a fraction of the virtual hard disk space is actually in use. While occupying much more space, a fixed-size file incurs less overhead and is therefore slightly faster than a dynamically allocated file.
For details about the differences, please refer to the section called “Disk image files (VDI, VMDK, VHD, HDD)”.
To prevent your physical hard disk from running full, VirtualBox limits the size of the image file. Still, it needs to be large enough to hold the contents of your operating system and the applications you want to install -- for a modern Windows or Linux guest, you will probably need several gigabytes for any serious use:
After having selected or created your image file, again press "Next" to go to the next page.
5. After clicking on "Finish", your new virtual machine will be created. You will then see it in the list on the left side of the Manager window, with the name you entered initially.



Running your virtual machine
To start a virtual machine, you have several options:
* Double-click on its entry in the list within the Manager window or
* select its entry in the list in the Manager window it and press the "Start" button at the top or
* for virtual machines created with VirtualBox 4.0 or later, navigate to the "VirtualBox VMs" folder in your system user's home directory, find the subdirectory of the machine you want to start and double-click on the machine settings file (with a .vbox file extension).
This opens up a new window, and the virtual machine which you selected will boot up. Everything which would normally be seen on the virtual system's monitor is shown in the window, as can be seen with the image in the section called “Some terminology”.

In general, you can use the virtual machine much like you would use a real computer. There are couple of points worth mentioning however.
Starting a new VM for the first time
When a VM gets started for the first time, another wizard -- the "First Start Wizard" -- will pop up to help you select an installation medium. Since the VM is created empty, it would otherwise behave just like a real computer with no operating system installed: it will do nothing and display an error message that no bootable operating system was found.
For this reason, the wizard helps you select a medium to install an operating system from.
* If you have physical CD or DVD media from which you want to install your guest operating system (e.g. in the case of a Windows installation CD or DVD), put the media into your host's CD or DVD drive.
Then, in the wizard's drop-down list of installation media, select "Host drive" with the correct drive letter (or, in the case of a Linux host, device file). This will allow your VM to access the media in your host drive, and you can proceed to install from there.
* If you have downloaded installation media from the Internet in the form of an ISO image file (most probably in the case of a Linux distribution), you would normally burn this file to an empty CD or DVD and proceed as just described. With VirtualBox however, you can skip this step and mount the ISO file directly. VirtualBox will then present this file as a CD or DVD-ROM drive to the virtual machine, much like it does with virtual hard disk images.
For this case, the wizard's drop-down list contains a list of installation media that were previously used with VirtualBox.
If your medium is not in the list (especially if you are using VirtualBox for the first time), select the small folder icon next to the drop-down list to bring up a standard file dialog, with which you can pick the image file on your host disks.
In both cases, after making the choices in the wizard, you will be able to install your operating system.
Capturing and releasing keyboard and mouse
As of version 3.2, VirtualBox provides a virtual USB tablet device to new virtual machines through which mouse events are communicated to the guest operating system. As a result, if you are running a modern guest operating system that can handle such devices, mouse support may work out of the box without the mouse being "captured" as described below; see the section called “"Motherboard" tab” for more information.
Otherwise, if the virtual machine only sees standard PS/2 mouse and keyboard devices, since the operating system in the virtual machine does not "know" that it is not running on a real computer, it expects to have exclusive control over your keyboard and mouse. This is, however, not the case since, unless you are running the VM in full-screen mode, your VM needs to share keyboard and mouse with other applications and possibly other VMs on your host.
As a result, initially after installing a guest operating system and before you install the Guest Additions (we will explain this in a minute), only one of the two -- your VM or the rest of your computer -- can "own" the keyboard and the mouse. You will see a second mouse pointer which will always be confined to the limits of the VM window. Basically, you activate the VM by clicking inside it.
To return ownership of keyboard and mouse to your host operating system, VirtualBox reserves a special key on your keyboard for itself: the "host key". By default, this is the right Control key on your keyboard; on a Mac host, the default host key is the left Command key. You can change this default in the VirtualBox Global Settings. In any case, the current setting for the host key is always displayed at the bottom right of your VM window, should you have forgotten about it:

Next

Creating your first virtual machine

Creating your first virtual machine

Click on the "New" button at the top of the VirtualBox Manager window. A wizard will pop up to guide you through setting up a new virtual machine (VM):




On the following pages, the wizard will ask you for the bare minimum of information that is needed to create a VM, in particular:

1. The VM name will later be shown in the VM list of the VirtualBox Manager window, and it will be used for the VM's files on disk. Even though any name could be used, keep in mind that once you have created a few VMs, you will appreciate if you have given your VMs rather informative names; "My VM" would thus be less useful than "Windows XP SP2 with OpenOffice".
2. For "Operating System Type", select the operating system that you want to install later. The supported operating systems are grouped; if you want to install something very unusual that is not listed, select "Other". Depending on your selection, VirtualBox will enable or disable certain VM settings that your guest operating system may require. This is particularly important for 64-bit guests (see the section called “64-bit guests”). It is therefore recommended to always set it to the correct value.
3. On the next page, select the memory (RAM) that VirtualBox should allocate every time the virtual machine is started. The amount of memory given here will be taken away from your host machine and presented to the guest operating system, which will report this size as the (virtual) computer's installed RAM.
Note: Choose this setting carefully! The memory you give to the VM will not be available to your host OS while the VM is running, so do not specify more than you can spare. For example, if your host machine has 1 GB of RAM and you enter 512 MB as the amount of RAM for a particular virtual machine, while that VM is running, you will only have 512 MB left for all the other software on your host. If you run two VMs at the same time, even more memory will be allocated for the second VM (which may not even be able to start if that memory is not available). On the other hand, you should specify as much as your guest OS (and your applications) will require to run properly.

A Windows XP guest will require at least a few hundred MB RAM to run properly, and Windows Vista will even refuse to install with less than 512 MB. Of course, if you want to run graphics-intensive applications in your VM, you may require even more RAM.

So, as a rule of thumb, if you have 1 GB of RAM or more in your host computer, it is usually safe to allocate 512 MB to each VM. But, in any case, make sure you always have at least 256 to 512 MB of RAM left on your host operating system. Otherwise you may cause your host OS to excessively swap out memory to your hard disk, effectively bringing your host system to a standstill.

As with the other settings, you can change this setting later, after you have created the VM.
4. Next, you must specify a virtual hard disk for your VM.
There are many and potentially complicated ways in which VirtualBox can provide hard disk space to a VM (see Chapter 5, Virtual storage for details), but the most common way is to use a large image file on your "real" hard disk, whose contents VirtualBox presents to your VM as if it were a complete hard disk. This file represents an entire hard disk then, so you can even copy it to another host and use it with another VirtualBox installation.

The wizard shows you the following window:


Here you have the following options:
* To create a new, empty virtual hard disk, press the "New" button.
* You can pick an existing disk image file.

The drop-down list presented in the window contains all disk images which are currently remembered by VirtualBox, probably because they are currently attached to a virtual machine (or have been in the past).
Alternatively, you can click on the small folder button next to the drop-down list to bring up a standard file dialog, which allows you to pick any disk image file on your host disk.
Most probably, if you are using VirtualBox for the first time, you will want to create a new disk image. Hence, press the "New" button.
This brings up another window, the "Create New Virtual Disk Wizard", which helps you create a new disk image file in the new virtual machine's folder.
VirtualBox supports two types of image files:
* A dynamically allocated file will only grow in size when the guest actually stores data on its virtual hard disk. It will therefore initially be small on the host hard drive and only later grow to the size specified as it is filled with data.
* A fixed-size file will immediately occupy the file specified, even if only a fraction of the virtual hard disk space is actually in use. While occupying much more space, a fixed-size file incurs less overhead and is therefore slightly faster than a dynamically allocated file.
For details about the differences, please refer to the section called “Disk image files (VDI, VMDK, VHD, HDD)”.
To prevent your physical hard disk from running full, VirtualBox limits the size of the image file. Still, it needs to be large enough to hold the contents of your operating system and the applications you want to install -- for a modern Windows or Linux guest, you will probably need several gigabytes for any serious use:
After having selected or created your image file, again press "Next" to go to the next page.
5. After clicking on "Finish", your new virtual machine will be created. You will then see it in the list on the left side of the Manager window, with the name you entered initially.



Running your virtual machine
To start a virtual machine, you have several options:
* Double-click on its entry in the list within the Manager window or
* select its entry in the list in the Manager window it and press the "Start" button at the top or
* for virtual machines created with VirtualBox 4.0 or later, navigate to the "VirtualBox VMs" folder in your system user's home directory, find the subdirectory of the machine you want to start and double-click on the machine settings file (with a .vbox file extension).
This opens up a new window, and the virtual machine which you selected will boot up. Everything which would normally be seen on the virtual system's monitor is shown in the window, as can be seen with the image in the section called “Some terminology”.

In general, you can use the virtual machine much like you would use a real computer. There are couple of points worth mentioning however.
Starting a new VM for the first time
When a VM gets started for the first time, another wizard -- the "First Start Wizard" -- will pop up to help you select an installation medium. Since the VM is created empty, it would otherwise behave just like a real computer with no operating system installed: it will do nothing and display an error message that no bootable operating system was found.
For this reason, the wizard helps you select a medium to install an operating system from.
* If you have physical CD or DVD media from which you want to install your guest operating system (e.g. in the case of a Windows installation CD or DVD), put the media into your host's CD or DVD drive.
Then, in the wizard's drop-down list of installation media, select "Host drive" with the correct drive letter (or, in the case of a Linux host, device file). This will allow your VM to access the media in your host drive, and you can proceed to install from there.
* If you have downloaded installation media from the Internet in the form of an ISO image file (most probably in the case of a Linux distribution), you would normally burn this file to an empty CD or DVD and proceed as just described. With VirtualBox however, you can skip this step and mount the ISO file directly. VirtualBox will then present this file as a CD or DVD-ROM drive to the virtual machine, much like it does with virtual hard disk images.
For this case, the wizard's drop-down list contains a list of installation media that were previously used with VirtualBox.
If your medium is not in the list (especially if you are using VirtualBox for the first time), select the small folder icon next to the drop-down list to bring up a standard file dialog, with which you can pick the image file on your host disks.
In both cases, after making the choices in the wizard, you will be able to install your operating system.
Capturing and releasing keyboard and mouse
As of version 3.2, VirtualBox provides a virtual USB tablet device to new virtual machines through which mouse events are communicated to the guest operating system. As a result, if you are running a modern guest operating system that can handle such devices, mouse support may work out of the box without the mouse being "captured" as described below; see the section called “"Motherboard" tab” for more information.
Otherwise, if the virtual machine only sees standard PS/2 mouse and keyboard devices, since the operating system in the virtual machine does not "know" that it is not running on a real computer, it expects to have exclusive control over your keyboard and mouse. This is, however, not the case since, unless you are running the VM in full-screen mode, your VM needs to share keyboard and mouse with other applications and possibly other VMs on your host.
As a result, initially after installing a guest operating system and before you install the Guest Additions (we will explain this in a minute), only one of the two -- your VM or the rest of your computer -- can "own" the keyboard and the mouse. You will see a second mouse pointer which will always be confined to the limits of the VM window. Basically, you activate the VM by clicking inside it.
To return ownership of keyboard and mouse to your host operating system, VirtualBox reserves a special key on your keyboard for itself: the "host key". By default, this is the right Control key on your keyboard; on a Mac host, the default host key is the left Command key. You can change this default in the VirtualBox Global Settings. In any case, the current setting for the host key is always displayed at the bottom right of your VM window, should you have forgotten about it:

Next

Wednesday, September 21, 2011

VirtualBox Installation

VirtualBox Installation

VirtualBox is a cross-platform virtualization application. What does that mean? For one thing, it installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. Secondly, it extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time. So, for example, you can run Windows and Linux on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC, and so on, all alongside your existing applications. You can install and run as many virtual machines as you like -- the only practical limits are disk space and memory.

VirtualBox is deceptively simple yet also very powerful. It can run everywhere from small embedded systems or desktop class machines all the way up to datacenter deployments and even Cloud environments.

The following screenshot shows you how VirtualBox, installed on a Mac computer, is running Windows 7 in a virtual machine window:



In this User Manual, we'll begin simply with a quick introduction to virtualization and how to get your first virtual machine running with the easy-to-use VirtualBox graphical user interface. Subsequent chapters will go into much more detail covering more powerful tools and features, but fortunately, it is not necessary to read the entire User Manual before you can use VirtualBox.

You can find a summary of VirtualBox's capabilities in the section called “Features overview”. For existing VirtualBox users who just want to see what's new in this release, Why is virtualization useful?

The techniques and features that VirtualBox provides are useful for several scenarios:

* Running multiple operating systems simultaneously. VirtualBox allows you to run more than one operating system at a time. This way, you can run software written for one operating system on another (for example, Windows software on Linux or a Mac) without having to reboot to use it. Since you can configure what kinds of "virtual" hardware should be presented to each such operating system, you can install an old operating system such as DOS or OS/2 even if your real computer's hardware is no longer supported by that operating system.
* Easier software installations. Software vendors can use virtual machines to ship entire software configurations. For example, installing a complete mail server solution on a real machine can be a tedious task. With VirtualBox, such a complex setup (then often called an "appliance") can be packed into a virtual machine. Installing and running a mail server becomes as easy as importing such an appliance into VirtualBox.
* Testing and disaster recovery. Once installed, a virtual machine and its virtual hard disks can be considered a "container" that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts.

On top of that, with the use of another VirtualBox feature called "snapshots", one can save a particular state of a virtual machine and revert back to that state, if necessary. This way, one can freely experiment with a computing environment. If something goes wrong (e.g. after installing misbehaving software or infecting the guest with a virus), one can easily switch back to a previous snapshot and avoid the need of frequent backups and restores.

Any number of snapshots can be created, allowing you to travel back and forward in virtual machine time. You can delete snapshots while a VM is running to reclaim disk space.
* Infrastructure consolidation. Virtualization can significantly reduce hardware and electricity costs. Most of the time, computers today only use a fraction of their potential power and run with low average system loads. A lot of hardware resources as well as electricity is thereby wasted. So, instead of running many such physical computers that are only partially used, one can pack many virtual machines onto a few powerful hosts and balance the loads between them.

Some terminology

When dealing with virtualization (and also for understanding the following chapters of this documentation), it helps to acquaint oneself with a bit of crucial terminology, especially the following terms:

Host operating system (host OS).

This is the operating system of the physical computer on which VirtualBox was installed. There are versions of VirtualBox for Windows, Mac OS X, Linux and Solaris hosts; for details, please see the section called “Supported host operating systems”.

Most of the time, this User Manual discusses all VirtualBox versions together. There may be platform-specific differences which we will point out where appropriate.
Guest operating system (guest OS).

This is the operating system that is running inside the virtual machine. Theoretically, VirtualBox can run any x86 operating system (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve near-native performance of the guest code on your machine, we had to go through a lot of optimizations that are specific to certain operating systems. So while your favorite operating system may run as a guest, we officially support and optimize for a select few (which, however, include the most common ones).

See the section called “Supported guest operating systems” for details.
Virtual machine (VM).

This is the special environment that VirtualBox creates for your guest operating system while it is running. In other words, you run your guest operating system "in" a VM. Normally, a VM will be shown as a window on your computer's desktop, but depending on which of the various frontends of VirtualBox you use, it can be displayed in full-screen mode or remotely on another computer.

In a more abstract way, internally, VirtualBox thinks of a VM as a set of parameters that determine its behavior. They include hardware settings (how much memory the VM should have, what hard disks VirtualBox should virtualize through which container files, what CDs are mounted etc.) as well as state information (whether the VM is currently running, saved, its snapshots etc.). These settings are mirrored in the VirtualBox Manager window as well as the VBoxManage command line program; see Chapter 8, VBoxManage. In other words, a VM is also what you can see in its settings dialog.
Guest Additions.

This refers to special software packages which are shipped with VirtualBox but designed to be installed inside a VM to improve performance of the guest OS and to add extra features. This is described in detail in Chapter 4, Guest Additions.

Features overview

Here's a brief outline of VirtualBox's main features:

* Portability. VirtualBox runs on a large number of 32-bit and 64-bit host operating systems (again, see the section called “Supported host operating systems” for details).

VirtualBox is a so-called "hosted" hypervisor (sometimes referred to as a "type 2" hypervisor). Whereas a "bare-metal" or "type 1" hypervisor would run directly on the hardware, VirtualBox requires an existing operating system to be installed. It can thus run alongside existing applications on that host.

To a very large degree, VirtualBox is functionally identical on all of the host platforms, and the same file and image formats are used. This allows you to run virtual machines created on one host on another host with a different host operating system; for example, you can create a virtual machine on Windows and then run it under Linux.

In addition, virtual machines can easily be imported and exported using the Open Virtualization Format (OVF, see the section called “Importing and exporting virtual machines”), an industry standard created for this purpose. You can even import OVFs that were created with a different virtualization software.
* No hardware virtualization required. For many scenarios, VirtualBox does not require the processor features built into newer hardware like Intel VT-x or AMD-V. As opposed to many other virtualization solutions, you can therefore use VirtualBox even on older hardware where these features are not present. The technical details are explained in the section called “Hardware vs. software virtualization”.
* Guest Additions: shared folders, seamless windows, 3D virtualization. The VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide additional integration and communication with the host system. After installing the Guest Additions, a virtual machine will support automatic adjustment of video resolutions, seamless windows, accelerated 3D graphics and more. The Guest Additions are described in detail in Chapter 4, Guest Additions.

In particular, Guest Additions provide for "shared folders", which let you access files from the host system from within a guest machine. Shared folders are described in the section called “Shared folders”.
* Great hardware support. Among others, VirtualBox supports:
oGuest multiprocessing (SMP). VirtualBox can present up to 32 virtual CPUs to each virtual machine, irrespective of how many CPU cores are physically present on your host.
oUSB device support. VirtualBox implements a virtual USB controller and allows you to connect arbitrary USB devices to your virtual machines without having to install device-specific drivers on the host. USB support is not limited to certain device categories. For details, see the section called “USB settings”.
oHardware compatibility. VirtualBox virtualizes a vast array of virtual devices, among them many devices that are typically provided by other virtualization platforms. That includes IDE, SCSI and SATA hard disk controllers, several virtual network cards and sound cards, virtual serial and parallel ports and an Input/Output Advanced Programmable Interrupt Controller (I/O APIC), which is found in many modern PC systems. This eases cloning of PC images from real machines and importing of third-party virtual machines into VirtualBox.
oFull ACPI support. The Advanced Configuration and Power Interface (ACPI) is fully supported by VirtualBox. This eases cloning of PC images from real machines or third-party virtual machines into VirtualBox. With its unique ACPI power status support, VirtualBox can even report to ACPI-aware guest operating systems the power status of the host. For mobile systems running on battery, the guest can thus enable energy saving and notify the user of the remaining power (e.g. in fullscreen modes).
oMultiscreen resolutions. VirtualBox virtual machines support screen resolutions many times that of a physical screen, allowing them to be spread over a large number of screens attached to the host system.
oBuilt-in iSCSI support. This unique feature allows you to connect a virtual machine directly to an iSCSI storage server without going through the host system. The VM accesses the iSCSI target directly without the extra overhead that is required for virtualizing hard disks in container files. For details, see the section called “iSCSI servers”.
oPXE Network boot. The integrated virtual network cards of VirtualBox fully support remote booting via the Preboot Execution Environment (PXE).
* Multigeneration branched snapshots. VirtualBox can save arbitrary snapshots of the state of the virtual machine. You can go back in time and revert the virtual machine to any such snapshot and start an alternative VM configuration from there, effectively creating a whole snapshot tree. For details, see the section called “Snapshots”. You can create and delete snapshots while the virtual machine is running.
* Clean architecture; unprecedented modularity. VirtualBox has an extremely modular design with well-defined internal programming interfaces and a clean separation of client and server code. This makes it easy to control it from several interfaces at once: for example, you can start a VM simply by clicking on a button in the VirtualBox graphical user interface and then control that machine from the command line, or even remotely. See the section called “Alternative front-ends” for details.

Due to its modular architecture, VirtualBox can also expose its full functionality and configurability through a comprehensive software development kit (SDK), which allows for integrating every aspect of VirtualBox with other software systems. Please see Chapter 11, VirtualBox programming interfaces for details.
* Remote machine display. The VirtualBox Remote Desktop Extension (VRDE) allows for high-performance remote access to any running virtual machine. This extension supports the Remote Desktop Protocol (RDP) originally built into Microsoft Windows, with special additions for full client USB support.

The VRDE does not rely on the RDP server that is built into Microsoft Windows; instead, it is plugged directly into the virtualization layer. As a result, it works with guest operating systems other than Windows (even in text mode) and does not require application support in the virtual machine either. The VRDE is described in detail in the section called “Remote display (VRDP support)”.

On top of this special capacity, VirtualBox offers you more unique features:
oExtensible RDP authentication. VirtualBox already supports Winlogon on Windows and PAM on Linux for RDP authentication. In addition, it includes an easy-to-use SDK which allows you to create arbitrary interfaces for other methods of authentication; see the section called “RDP authentication” for details.
oUSB over RDP. Via RDP virtual channel support, VirtualBox also allows you to connect arbitrary USB devices locally to a virtual machine which is running remotely on a VirtualBox RDP server; see the section called “Remote USB” for details.

Supported host operating systems

Currently, VirtualBox runs on the following host operating systems:

*Windows hosts:
o Windows XP, all service packs (32-bit)
o Windows Server 2003 (32-bit)
o Windows Vista (32-bit and 64-bit[1]).
o Windows Server 2008 (32-bit and 64-bit)
o Windows 7 (32-bit and 64-bit)
*Mac OS X hosts:[2]
o10.5 (Leopard, 32-bit)
o10.6 (Snow Leopard, 32-bit and 64-bit)
o10.7 (Lion, 32-bit and 64-bit)

*Linux hosts (32-bit and 64-bit[3]). Among others, this includes:
oUbuntu 6.06 ("Dapper Drake"), 6.10 ("Edgy Eft"), 7.04 ("Feisty Fawn"), 7.10 ("Gutsy Gibbon"), 8.04 ("Hardy Heron"), 8.10 ("Intrepid Ibex"), 9.04 ("Jaunty Jackalope"), 9.10 ("Karmic Koala"), 10.04 ("Lucid Lynx"), 10.10 ("Maverick Meerkat), 11.04 ("Natty Narwhal").
oDebian GNU/Linux 3.1 ("sarge"), 4.0 ("etch"), 5.0 ("lenny") and 6.0 ("squeeze")
oOracle Enterprise Linux 4 and 5, Oracle Linux 6
oRedhat Enterprise Linux 4, 5 and 6
oFedora Core 4 to 15
oGentoo Linux
oSUSE Linux 9, 10 and 11, openSUSE 10.3, 11.0, 11.1, 11.2, 11.3, 11.4
oMandriva 2007.1, 2008.0, 2009.1, 2010.0 and 2010.1

It should be possible to use VirtualBox on most systems based on Linux kernel 2.6 using either the VirtualBox installer or by doing a manual installation; see the section called “Installing on Linux hosts”. However, the formally tested and supported Linux distributions are those for which we offer a dedicated package.

Note that starting with VirtualBox 2.1, Linux 2.4-based host operating systems are no longer supported.
*Solaris hosts (32-bit and 64-bit) are supported with the restrictions listed in Chapter 14, Known limitations:
oSolaris 11 Express (Nevada build 86 and higher, OpenSolaris 2008.05 and higher)
oSolaris 10 (u8 and higher)

Installing VirtualBox and extension packs

VirtualBox comes in many different packages, and installation depends on your host operating system. If you have installed software before, installation should be straightforward: on each host platform, VirtualBox uses the installation method that is most common and easy to use. If you run into trouble or have special requirements, please refer to Chapter 2, Installation details for details about the various installation methods.

Starting with version 4.0, VirtualBox is split into several components.

1.The base package consists of all open-source components and is licensed under the GNU General Public License V2.
2.Additional extension packs can be downloaded which extend the functionality of the VirtualBox base package. Currently, Oracle provides the one extension pack, which can be found at http://www.virtualbox.org and provides the following added functionality:
1.The virtual USB 2.0 (EHCI) device; see the section called “USB settings”.
2.VirtualBox Remote Desktop Protocol (VRDP) support; see the section called “Remote display (VRDP support)”.
3.Intel PXE boot ROM with support for the E1000 network card.
4.Experimental support for PCI passthrough on Linux hosts; see the section called “PCI passthrough”.

VirtualBox extension packages have a .vbox-extpack file name extension. To install an extension, simply double-click on the package file, and the VirtualBox Manager will guide you through the required steps.

To view the extension packs that are currently installed, please start the VirtualBox Manager (see the next section). From the "File" menu, please select "Preferences". In the window that shows up, go to the "Extensions" category which shows you the extensions which are currently installed and allows you to remove a package or add a new one.

Alternatively you can use VBoxManage on the command line: see the section called “VBoxManage extpack” for details.

Starting VirtualBox

After installation, you can start VirtualBox as follows:

* On a Windows host, in the standard "Programs" menu, click on the item in the "VirtualBox" group. On Vista or Windows 7, you can also type "VirtualBox" in the search box of the "Start" menu.
* On a Mac OS X host, in the Finder, double-click on the "VirtualBox" item in the "Applications" folder. (You may want to drag this item onto your Dock.)
* On a Linux or Solaris host, depending on your desktop environment, a "VirtualBox" item may have been placed in either the "System" or "System Tools" group of your "Applications" menu. Alternatively, you can type VirtualBox in a terminal.

When you start VirtualBox for the first time, a window like the following should come up:



This window is called the "VirtualBox Manager". On the left, you can see a pane that will later list all your virtual machines. Since you have not created any, the list is empty. A row of buttons above it allows you to create new VMs and work on existing VMs, once you have some. The pane on the right displays the properties of the virtual machine currently selected, if any. Again, since you don't have any machines yet, the pane displays a welcome message.

To give you an idea what VirtualBox might look like later, after you have created many machines, here's another example:



NEXT

VirtualBox Installation

VirtualBox Installation

VirtualBox is a cross-platform virtualization application. What does that mean? For one thing, it installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. Secondly, it extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time. So, for example, you can run Windows and Linux on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC, and so on, all alongside your existing applications. You can install and run as many virtual machines as you like -- the only practical limits are disk space and memory.

VirtualBox is deceptively simple yet also very powerful. It can run everywhere from small embedded systems or desktop class machines all the way up to datacenter deployments and even Cloud environments.

The following screenshot shows you how VirtualBox, installed on a Mac computer, is running Windows 7 in a virtual machine window:



In this User Manual, we'll begin simply with a quick introduction to virtualization and how to get your first virtual machine running with the easy-to-use VirtualBox graphical user interface. Subsequent chapters will go into much more detail covering more powerful tools and features, but fortunately, it is not necessary to read the entire User Manual before you can use VirtualBox.

You can find a summary of VirtualBox's capabilities in the section called “Features overview”. For existing VirtualBox users who just want to see what's new in this release, Why is virtualization useful?

The techniques and features that VirtualBox provides are useful for several scenarios:

* Running multiple operating systems simultaneously. VirtualBox allows you to run more than one operating system at a time. This way, you can run software written for one operating system on another (for example, Windows software on Linux or a Mac) without having to reboot to use it. Since you can configure what kinds of "virtual" hardware should be presented to each such operating system, you can install an old operating system such as DOS or OS/2 even if your real computer's hardware is no longer supported by that operating system.
* Easier software installations. Software vendors can use virtual machines to ship entire software configurations. For example, installing a complete mail server solution on a real machine can be a tedious task. With VirtualBox, such a complex setup (then often called an "appliance") can be packed into a virtual machine. Installing and running a mail server becomes as easy as importing such an appliance into VirtualBox.
* Testing and disaster recovery. Once installed, a virtual machine and its virtual hard disks can be considered a "container" that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts.

On top of that, with the use of another VirtualBox feature called "snapshots", one can save a particular state of a virtual machine and revert back to that state, if necessary. This way, one can freely experiment with a computing environment. If something goes wrong (e.g. after installing misbehaving software or infecting the guest with a virus), one can easily switch back to a previous snapshot and avoid the need of frequent backups and restores.

Any number of snapshots can be created, allowing you to travel back and forward in virtual machine time. You can delete snapshots while a VM is running to reclaim disk space.
* Infrastructure consolidation. Virtualization can significantly reduce hardware and electricity costs. Most of the time, computers today only use a fraction of their potential power and run with low average system loads. A lot of hardware resources as well as electricity is thereby wasted. So, instead of running many such physical computers that are only partially used, one can pack many virtual machines onto a few powerful hosts and balance the loads between them.

Some terminology

When dealing with virtualization (and also for understanding the following chapters of this documentation), it helps to acquaint oneself with a bit of crucial terminology, especially the following terms:

Host operating system (host OS).

This is the operating system of the physical computer on which VirtualBox was installed. There are versions of VirtualBox for Windows, Mac OS X, Linux and Solaris hosts; for details, please see the section called “Supported host operating systems”.

Most of the time, this User Manual discusses all VirtualBox versions together. There may be platform-specific differences which we will point out where appropriate.
Guest operating system (guest OS).

This is the operating system that is running inside the virtual machine. Theoretically, VirtualBox can run any x86 operating system (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve near-native performance of the guest code on your machine, we had to go through a lot of optimizations that are specific to certain operating systems. So while your favorite operating system may run as a guest, we officially support and optimize for a select few (which, however, include the most common ones).

See the section called “Supported guest operating systems” for details.
Virtual machine (VM).

This is the special environment that VirtualBox creates for your guest operating system while it is running. In other words, you run your guest operating system "in" a VM. Normally, a VM will be shown as a window on your computer's desktop, but depending on which of the various frontends of VirtualBox you use, it can be displayed in full-screen mode or remotely on another computer.

In a more abstract way, internally, VirtualBox thinks of a VM as a set of parameters that determine its behavior. They include hardware settings (how much memory the VM should have, what hard disks VirtualBox should virtualize through which container files, what CDs are mounted etc.) as well as state information (whether the VM is currently running, saved, its snapshots etc.). These settings are mirrored in the VirtualBox Manager window as well as the VBoxManage command line program; see Chapter 8, VBoxManage. In other words, a VM is also what you can see in its settings dialog.
Guest Additions.

This refers to special software packages which are shipped with VirtualBox but designed to be installed inside a VM to improve performance of the guest OS and to add extra features. This is described in detail in Chapter 4, Guest Additions.

Features overview

Here's a brief outline of VirtualBox's main features:

* Portability. VirtualBox runs on a large number of 32-bit and 64-bit host operating systems (again, see the section called “Supported host operating systems” for details).

VirtualBox is a so-called "hosted" hypervisor (sometimes referred to as a "type 2" hypervisor). Whereas a "bare-metal" or "type 1" hypervisor would run directly on the hardware, VirtualBox requires an existing operating system to be installed. It can thus run alongside existing applications on that host.

To a very large degree, VirtualBox is functionally identical on all of the host platforms, and the same file and image formats are used. This allows you to run virtual machines created on one host on another host with a different host operating system; for example, you can create a virtual machine on Windows and then run it under Linux.

In addition, virtual machines can easily be imported and exported using the Open Virtualization Format (OVF, see the section called “Importing and exporting virtual machines”), an industry standard created for this purpose. You can even import OVFs that were created with a different virtualization software.
* No hardware virtualization required. For many scenarios, VirtualBox does not require the processor features built into newer hardware like Intel VT-x or AMD-V. As opposed to many other virtualization solutions, you can therefore use VirtualBox even on older hardware where these features are not present. The technical details are explained in the section called “Hardware vs. software virtualization”.
* Guest Additions: shared folders, seamless windows, 3D virtualization. The VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide additional integration and communication with the host system. After installing the Guest Additions, a virtual machine will support automatic adjustment of video resolutions, seamless windows, accelerated 3D graphics and more. The Guest Additions are described in detail in Chapter 4, Guest Additions.

In particular, Guest Additions provide for "shared folders", which let you access files from the host system from within a guest machine. Shared folders are described in the section called “Shared folders”.
* Great hardware support. Among others, VirtualBox supports:
oGuest multiprocessing (SMP). VirtualBox can present up to 32 virtual CPUs to each virtual machine, irrespective of how many CPU cores are physically present on your host.
oUSB device support. VirtualBox implements a virtual USB controller and allows you to connect arbitrary USB devices to your virtual machines without having to install device-specific drivers on the host. USB support is not limited to certain device categories. For details, see the section called “USB settings”.
oHardware compatibility. VirtualBox virtualizes a vast array of virtual devices, among them many devices that are typically provided by other virtualization platforms. That includes IDE, SCSI and SATA hard disk controllers, several virtual network cards and sound cards, virtual serial and parallel ports and an Input/Output Advanced Programmable Interrupt Controller (I/O APIC), which is found in many modern PC systems. This eases cloning of PC images from real machines and importing of third-party virtual machines into VirtualBox.
oFull ACPI support. The Advanced Configuration and Power Interface (ACPI) is fully supported by VirtualBox. This eases cloning of PC images from real machines or third-party virtual machines into VirtualBox. With its unique ACPI power status support, VirtualBox can even report to ACPI-aware guest operating systems the power status of the host. For mobile systems running on battery, the guest can thus enable energy saving and notify the user of the remaining power (e.g. in fullscreen modes).
oMultiscreen resolutions. VirtualBox virtual machines support screen resolutions many times that of a physical screen, allowing them to be spread over a large number of screens attached to the host system.
oBuilt-in iSCSI support. This unique feature allows you to connect a virtual machine directly to an iSCSI storage server without going through the host system. The VM accesses the iSCSI target directly without the extra overhead that is required for virtualizing hard disks in container files. For details, see the section called “iSCSI servers”.
oPXE Network boot. The integrated virtual network cards of VirtualBox fully support remote booting via the Preboot Execution Environment (PXE).
* Multigeneration branched snapshots. VirtualBox can save arbitrary snapshots of the state of the virtual machine. You can go back in time and revert the virtual machine to any such snapshot and start an alternative VM configuration from there, effectively creating a whole snapshot tree. For details, see the section called “Snapshots”. You can create and delete snapshots while the virtual machine is running.
* Clean architecture; unprecedented modularity. VirtualBox has an extremely modular design with well-defined internal programming interfaces and a clean separation of client and server code. This makes it easy to control it from several interfaces at once: for example, you can start a VM simply by clicking on a button in the VirtualBox graphical user interface and then control that machine from the command line, or even remotely. See the section called “Alternative front-ends” for details.

Due to its modular architecture, VirtualBox can also expose its full functionality and configurability through a comprehensive software development kit (SDK), which allows for integrating every aspect of VirtualBox with other software systems. Please see Chapter 11, VirtualBox programming interfaces for details.
* Remote machine display. The VirtualBox Remote Desktop Extension (VRDE) allows for high-performance remote access to any running virtual machine. This extension supports the Remote Desktop Protocol (RDP) originally built into Microsoft Windows, with special additions for full client USB support.

The VRDE does not rely on the RDP server that is built into Microsoft Windows; instead, it is plugged directly into the virtualization layer. As a result, it works with guest operating systems other than Windows (even in text mode) and does not require application support in the virtual machine either. The VRDE is described in detail in the section called “Remote display (VRDP support)”.

On top of this special capacity, VirtualBox offers you more unique features:
oExtensible RDP authentication. VirtualBox already supports Winlogon on Windows and PAM on Linux for RDP authentication. In addition, it includes an easy-to-use SDK which allows you to create arbitrary interfaces for other methods of authentication; see the section called “RDP authentication” for details.
oUSB over RDP. Via RDP virtual channel support, VirtualBox also allows you to connect arbitrary USB devices locally to a virtual machine which is running remotely on a VirtualBox RDP server; see the section called “Remote USB” for details.

Supported host operating systems

Currently, VirtualBox runs on the following host operating systems:

*Windows hosts:
o Windows XP, all service packs (32-bit)
o Windows Server 2003 (32-bit)
o Windows Vista (32-bit and 64-bit[1]).
o Windows Server 2008 (32-bit and 64-bit)
o Windows 7 (32-bit and 64-bit)
*Mac OS X hosts:[2]
o10.5 (Leopard, 32-bit)
o10.6 (Snow Leopard, 32-bit and 64-bit)
o10.7 (Lion, 32-bit and 64-bit)

*Linux hosts (32-bit and 64-bit[3]). Among others, this includes:
oUbuntu 6.06 ("Dapper Drake"), 6.10 ("Edgy Eft"), 7.04 ("Feisty Fawn"), 7.10 ("Gutsy Gibbon"), 8.04 ("Hardy Heron"), 8.10 ("Intrepid Ibex"), 9.04 ("Jaunty Jackalope"), 9.10 ("Karmic Koala"), 10.04 ("Lucid Lynx"), 10.10 ("Maverick Meerkat), 11.04 ("Natty Narwhal").
oDebian GNU/Linux 3.1 ("sarge"), 4.0 ("etch"), 5.0 ("lenny") and 6.0 ("squeeze")
oOracle Enterprise Linux 4 and 5, Oracle Linux 6
oRedhat Enterprise Linux 4, 5 and 6
oFedora Core 4 to 15
oGentoo Linux
oSUSE Linux 9, 10 and 11, openSUSE 10.3, 11.0, 11.1, 11.2, 11.3, 11.4
oMandriva 2007.1, 2008.0, 2009.1, 2010.0 and 2010.1

It should be possible to use VirtualBox on most systems based on Linux kernel 2.6 using either the VirtualBox installer or by doing a manual installation; see the section called “Installing on Linux hosts”. However, the formally tested and supported Linux distributions are those for which we offer a dedicated package.

Note that starting with VirtualBox 2.1, Linux 2.4-based host operating systems are no longer supported.
*Solaris hosts (32-bit and 64-bit) are supported with the restrictions listed in Chapter 14, Known limitations:
oSolaris 11 Express (Nevada build 86 and higher, OpenSolaris 2008.05 and higher)
oSolaris 10 (u8 and higher)

Installing VirtualBox and extension packs

VirtualBox comes in many different packages, and installation depends on your host operating system. If you have installed software before, installation should be straightforward: on each host platform, VirtualBox uses the installation method that is most common and easy to use. If you run into trouble or have special requirements, please refer to Chapter 2, Installation details for details about the various installation methods.

Starting with version 4.0, VirtualBox is split into several components.

1.The base package consists of all open-source components and is licensed under the GNU General Public License V2.
2.Additional extension packs can be downloaded which extend the functionality of the VirtualBox base package. Currently, Oracle provides the one extension pack, which can be found at http://www.virtualbox.org and provides the following added functionality:
1.The virtual USB 2.0 (EHCI) device; see the section called “USB settings”.
2.VirtualBox Remote Desktop Protocol (VRDP) support; see the section called “Remote display (VRDP support)”.
3.Intel PXE boot ROM with support for the E1000 network card.
4.Experimental support for PCI passthrough on Linux hosts; see the section called “PCI passthrough”.

VirtualBox extension packages have a .vbox-extpack file name extension. To install an extension, simply double-click on the package file, and the VirtualBox Manager will guide you through the required steps.

To view the extension packs that are currently installed, please start the VirtualBox Manager (see the next section). From the "File" menu, please select "Preferences". In the window that shows up, go to the "Extensions" category which shows you the extensions which are currently installed and allows you to remove a package or add a new one.

Alternatively you can use VBoxManage on the command line: see the section called “VBoxManage extpack” for details.

Starting VirtualBox

After installation, you can start VirtualBox as follows:

* On a Windows host, in the standard "Programs" menu, click on the item in the "VirtualBox" group. On Vista or Windows 7, you can also type "VirtualBox" in the search box of the "Start" menu.
* On a Mac OS X host, in the Finder, double-click on the "VirtualBox" item in the "Applications" folder. (You may want to drag this item onto your Dock.)
* On a Linux or Solaris host, depending on your desktop environment, a "VirtualBox" item may have been placed in either the "System" or "System Tools" group of your "Applications" menu. Alternatively, you can type VirtualBox in a terminal.

When you start VirtualBox for the first time, a window like the following should come up:



This window is called the "VirtualBox Manager". On the left, you can see a pane that will later list all your virtual machines. Since you have not created any, the list is empty. A row of buttons above it allows you to create new VMs and work on existing VMs, once you have some. The pane on the right displays the properties of the virtual machine currently selected, if any. Again, since you don't have any machines yet, the pane displays a welcome message.

To give you an idea what VirtualBox might look like later, after you have created many machines, here's another example:



NEXT

VirtualBox

VirtualBox is a cross-platform virtualization application. What does that mean? For one thing, it installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. Secondly, it extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time. So, for example, you can run Windows and Linux on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC, and so on, all alongside your existing applications. You can install and run as many virtual machines as you like -- the only practical limits are disk space and memory.

VirtualBox is deceptively simple yet also very powerful. It can run everywhere from small embedded systems or desktop class machines all the way up to datacenter deployments and even Cloud environments.

The following screenshot shows you how VirtualBox, installed on a Mac computer, is running Windows 7 in a virtual machine window:




In this User Manual, we'll begin simply with a quick introduction to virtualization and how to get your first virtual machine running with the easy-to-use VirtualBox graphical user interface. Subsequent chapters will go into much more detail covering more powerful tools and features, but fortunately, it is not necessary to read the entire User Manual before you can use VirtualBox.

You can find a summary of VirtualBox's capabilities in the section called “Features overview”. For existing VirtualBox users who just want to see what's new in this release, Why is virtualization useful?

The techniques and features that VirtualBox provides are useful for several scenarios:

* Running multiple operating systems simultaneously. VirtualBox allows you to run more than one operating system at a time. This way, you can run software written for one operating system on another (for example, Windows software on Linux or a Mac) without having to reboot to use it. Since you can configure what kinds of "virtual" hardware should be presented to each such operating system, you can install an old operating system such as DOS or OS/2 even if your real computer's hardware is no longer supported by that operating system.
* Easier software installations. Software vendors can use virtual machines to ship entire software configurations. For example, installing a complete mail server solution on a real machine can be a tedious task. With VirtualBox, such a complex setup (then often called an "appliance") can be packed into a virtual machine. Installing and running a mail server becomes as easy as importing such an appliance into VirtualBox.
* Testing and disaster recovery. Once installed, a virtual machine and its virtual hard disks can be considered a "container" that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts.

On top of that, with the use of another VirtualBox feature called "snapshots", one can save a particular state of a virtual machine and revert back to that state, if necessary. This way, one can freely experiment with a computing environment. If something goes wrong (e.g. after installing misbehaving software or infecting the guest with a virus), one can easily switch back to a previous snapshot and avoid the need of frequent backups and restores.

Any number of snapshots can be created, allowing you to travel back and forward in virtual machine time. You can delete snapshots while a VM is running to reclaim disk space.
* Infrastructure consolidation. Virtualization can significantly reduce hardware and electricity costs. Most of the time, computers today only use a fraction of their potential power and run with low average system loads. A lot of hardware resources as well as electricity is thereby wasted. So, instead of running many such physical computers that are only partially used, one can pack many virtual machines onto a few powerful hosts and balance the loads between them.

Some terminology

When dealing with virtualization (and also for understanding the following chapters of this documentation), it helps to acquaint oneself with a bit of crucial terminology, especially the following terms:

Host operating system (host OS).

This is the operating system of the physical computer on which VirtualBox was installed. There are versions of VirtualBox for Windows, Mac OS X, Linux and Solaris hosts; for details, please see the section called “Supported host operating systems”.

Most of the time, this User Manual discusses all VirtualBox versions together. There may be platform-specific differences which we will point out where appropriate.
Guest operating system (guest OS).

This is the operating system that is running inside the virtual machine. Theoretically, VirtualBox can run any x86 operating system (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve near-native performance of the guest code on your machine, we had to go through a lot of optimizations that are specific to certain operating systems. So while your favorite operating system may run as a guest, we officially support and optimize for a select few (which, however, include the most common ones).

See the section called “Supported guest operating systems” for details.
Virtual machine (VM).

This is the special environment that VirtualBox creates for your guest operating system while it is running. In other words, you run your guest operating system "in" a VM. Normally, a VM will be shown as a window on your computer's desktop, but depending on which of the various frontends of VirtualBox you use, it can be displayed in full-screen mode or remotely on another computer.

In a more abstract way, internally, VirtualBox thinks of a VM as a set of parameters that determine its behavior. They include hardware settings (how much memory the VM should have, what hard disks VirtualBox should virtualize through which container files, what CDs are mounted etc.) as well as state information (whether the VM is currently running, saved, its snapshots etc.). These settings are mirrored in the VirtualBox Manager window as well as the VBoxManage command line program; see Chapter 8, VBoxManage. In other words, a VM is also what you can see in its settings dialog.
Guest Additions.

This refers to special software packages which are shipped with VirtualBox but designed to be installed inside a VM to improve performance of the guest OS and to add extra features. This is described in detail in Chapter 4, Guest Additions.

Features overview

Here's a brief outline of VirtualBox's main features:

* Portability. VirtualBox runs on a large number of 32-bit and 64-bit host operating systems (again, see the section called “Supported host operating systems” for details).

VirtualBox is a so-called "hosted" hypervisor (sometimes referred to as a "type 2" hypervisor). Whereas a "bare-metal" or "type 1" hypervisor would run directly on the hardware, VirtualBox requires an existing operating system to be installed. It can thus run alongside existing applications on that host.

To a very large degree, VirtualBox is functionally identical on all of the host platforms, and the same file and image formats are used. This allows you to run virtual machines created on one host on another host with a different host operating system; for example, you can create a virtual machine on Windows and then run it under Linux.

In addition, virtual machines can easily be imported and exported using the Open Virtualization Format (OVF, see the section called “Importing and exporting virtual machines”), an industry standard created for this purpose. You can even import OVFs that were created with a different virtualization software.
* No hardware virtualization required. For many scenarios, VirtualBox does not require the processor features built into newer hardware like Intel VT-x or AMD-V. As opposed to many other virtualization solutions, you can therefore use VirtualBox even on older hardware where these features are not present. The technical details are explained in the section called “Hardware vs. software virtualization”.
* Guest Additions: shared folders, seamless windows, 3D virtualization. The VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide additional integration and communication with the host system. After installing the Guest Additions, a virtual machine will support automatic adjustment of video resolutions, seamless windows, accelerated 3D graphics and more. The Guest Additions are described in detail in Chapter 4, Guest Additions.

In particular, Guest Additions provide for "shared folders", which let you access files from the host system from within a guest machine. Shared folders are described in the section called “Shared folders”.
* Great hardware support. Among others, VirtualBox supports:
oGuest multiprocessing (SMP). VirtualBox can present up to 32 virtual CPUs to each virtual machine, irrespective of how many CPU cores are physically present on your host.
oUSB device support. VirtualBox implements a virtual USB controller and allows you to connect arbitrary USB devices to your virtual machines without having to install device-specific drivers on the host. USB support is not limited to certain device categories. For details, see the section called “USB settings”.
oHardware compatibility. VirtualBox virtualizes a vast array of virtual devices, among them many devices that are typically provided by other virtualization platforms. That includes IDE, SCSI and SATA hard disk controllers, several virtual network cards and sound cards, virtual serial and parallel ports and an Input/Output Advanced Programmable Interrupt Controller (I/O APIC), which is found in many modern PC systems. This eases cloning of PC images from real machines and importing of third-party virtual machines into VirtualBox.
oFull ACPI support. The Advanced Configuration and Power Interface (ACPI) is fully supported by VirtualBox. This eases cloning of PC images from real machines or third-party virtual machines into VirtualBox. With its unique ACPI power status support, VirtualBox can even report to ACPI-aware guest operating systems the power status of the host. For mobile systems running on battery, the guest can thus enable energy saving and notify the user of the remaining power (e.g. in fullscreen modes).
oMultiscreen resolutions. VirtualBox virtual machines support screen resolutions many times that of a physical screen, allowing them to be spread over a large number of screens attached to the host system.
oBuilt-in iSCSI support. This unique feature allows you to connect a virtual machine directly to an iSCSI storage server without going through the host system. The VM accesses the iSCSI target directly without the extra overhead that is required for virtualizing hard disks in container files. For details, see the section called “iSCSI servers”.
oPXE Network boot. The integrated virtual network cards of VirtualBox fully support remote booting via the Preboot Execution Environment (PXE).
* Multigeneration branched snapshots. VirtualBox can save arbitrary snapshots of the state of the virtual machine. You can go back in time and revert the virtual machine to any such snapshot and start an alternative VM configuration from there, effectively creating a whole snapshot tree. For details, see the section called “Snapshots”. You can create and delete snapshots while the virtual machine is running.
* Clean architecture; unprecedented modularity. VirtualBox has an extremely modular design with well-defined internal programming interfaces and a clean separation of client and server code. This makes it easy to control it from several interfaces at once: for example, you can start a VM simply by clicking on a button in the VirtualBox graphical user interface and then control that machine from the command line, or even remotely. See the section called “Alternative front-ends” for details.

Due to its modular architecture, VirtualBox can also expose its full functionality and configurability through a comprehensive software development kit (SDK), which allows for integrating every aspect of VirtualBox with other software systems. Please see Chapter 11, VirtualBox programming interfaces for details.
* Remote machine display. The VirtualBox Remote Desktop Extension (VRDE) allows for high-performance remote access to any running virtual machine. This extension supports the Remote Desktop Protocol (RDP) originally built into Microsoft Windows, with special additions for full client USB support.

The VRDE does not rely on the RDP server that is built into Microsoft Windows; instead, it is plugged directly into the virtualization layer. As a result, it works with guest operating systems other than Windows (even in text mode) and does not require application support in the virtual machine either. The VRDE is described in detail in the section called “Remote display (VRDP support)”.

On top of this special capacity, VirtualBox offers you more unique features:
oExtensible RDP authentication. VirtualBox already supports Winlogon on Windows and PAM on Linux for RDP authentication. In addition, it includes an easy-to-use SDK which allows you to create arbitrary interfaces for other methods of authentication; see the section called “RDP authentication” for details.
oUSB over RDP. Via RDP virtual channel support, VirtualBox also allows you to connect arbitrary USB devices locally to a virtual machine which is running remotely on a VirtualBox RDP server; see the section called “Remote USB” for details.

Supported host operating systems

Currently, VirtualBox runs on the following host operating systems:

*Windows hosts:
o Windows XP, all service packs (32-bit)
o Windows Server 2003 (32-bit)
o Windows Vista (32-bit and 64-bit[1]).
o Windows Server 2008 (32-bit and 64-bit)
o Windows 7 (32-bit and 64-bit)
*Mac OS X hosts:[2]
o10.5 (Leopard, 32-bit)
o10.6 (Snow Leopard, 32-bit and 64-bit)
o10.7 (Lion, 32-bit and 64-bit)

*Linux hosts (32-bit and 64-bit[3]). Among others, this includes:
oUbuntu 6.06 ("Dapper Drake"), 6.10 ("Edgy Eft"), 7.04 ("Feisty Fawn"), 7.10 ("Gutsy Gibbon"), 8.04 ("Hardy Heron"), 8.10 ("Intrepid Ibex"), 9.04 ("Jaunty Jackalope"), 9.10 ("Karmic Koala"), 10.04 ("Lucid Lynx"), 10.10 ("Maverick Meerkat), 11.04 ("Natty Narwhal").
oDebian GNU/Linux 3.1 ("sarge"), 4.0 ("etch"), 5.0 ("lenny") and 6.0 ("squeeze")
oOracle Enterprise Linux 4 and 5, Oracle Linux 6
oRedhat Enterprise Linux 4, 5 and 6
oFedora Core 4 to 15
oGentoo Linux
oSUSE Linux 9, 10 and 11, openSUSE 10.3, 11.0, 11.1, 11.2, 11.3, 11.4
oMandriva 2007.1, 2008.0, 2009.1, 2010.0 and 2010.1

It should be possible to use VirtualBox on most systems based on Linux kernel 2.6 using either the VirtualBox installer or by doing a manual installation; see the section called “Installing on Linux hosts”. However, the formally tested and supported Linux distributions are those for which we offer a dedicated package.

Note that starting with VirtualBox 2.1, Linux 2.4-based host operating systems are no longer supported.
*Solaris hosts (32-bit and 64-bit) are supported with the restrictions listed in Chapter 14, Known limitations:
oSolaris 11 Express (Nevada build 86 and higher, OpenSolaris 2008.05 and higher)
oSolaris 10 (u8 and higher)

Installing VirtualBox and extension packs

VirtualBox comes in many different packages, and installation depends on your host operating system. If you have installed software before, installation should be straightforward: on each host platform, VirtualBox uses the installation method that is most common and easy to use. If you run into trouble or have special requirements, please refer to Chapter 2, Installation details for details about the various installation methods.

Starting with version 4.0, VirtualBox is split into several components.

1.The base package consists of all open-source components and is licensed under the GNU General Public License V2.
2.Additional extension packs can be downloaded which extend the functionality of the VirtualBox base package. Currently, Oracle provides the one extension pack, which can be found at http://www.virtualbox.org and provides the following added functionality:
1.The virtual USB 2.0 (EHCI) device; see the section called “USB settings”.
2.VirtualBox Remote Desktop Protocol (VRDP) support; see the section called “Remote display (VRDP support)”.
3.Intel PXE boot ROM with support for the E1000 network card.
4.Experimental support for PCI passthrough on Linux hosts; see the section called “PCI passthrough”.

VirtualBox extension packages have a .vbox-extpack file name extension. To install an extension, simply double-click on the package file, and the VirtualBox Manager will guide you through the required steps.

To view the extension packs that are currently installed, please start the VirtualBox Manager (see the next section). From the "File" menu, please select "Preferences". In the window that shows up, go to the "Extensions" category which shows you the extensions which are currently installed and allows you to remove a package or add a new one.

Alternatively you can use VBoxManage on the command line: see the section called “VBoxManage extpack” for details.

Starting VirtualBox

After installation, you can start VirtualBox as follows:

* On a Windows host, in the standard "Programs" menu, click on the item in the "VirtualBox" group. On Vista or Windows 7, you can also type "VirtualBox" in the search box of the "Start" menu.
* On a Mac OS X host, in the Finder, double-click on the "VirtualBox" item in the "Applications" folder. (You may want to drag this item onto your Dock.)
* On a Linux or Solaris host, depending on your desktop environment, a "VirtualBox" item may have been placed in either the "System" or "System Tools" group of your "Applications" menu. Alternatively, you can type VirtualBox in a terminal.

When you start VirtualBox for the first time, a window like the following should come up:



This window is called the "VirtualBox Manager". On the left, you can see a pane that will later list all your virtual machines. Since you have not created any, the list is empty. A row of buttons above it allows you to create new VMs and work on existing VMs, once you have some. The pane on the right displays the properties of the virtual machine currently selected, if any. Again, since you don't have any machines yet, the pane displays a welcome message.

To give you an idea what VirtualBox might look like later, after you have created many machines, here's another example:



NEXT