Difference between revisions of "Using VirtualBox/9.2"

From PC-BSD Wiki
Jump to: navigation, search
m (Installing VirtualBox Guest Additions)
(35 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{NavHeader|back=PC-BSD Live Mode|forward=Installing PC-BSD}}</noinclude>
+
<noinclude><translate>
A virtualized environment allows you to test drive an operating system without overwriting your current operating system. This is an excellent way to practice installation, to see if all of your hardware is supported, or to try multiple versions of operating systems. Virtualization software effectively creates windows (known as virtual machines) into which you can install and use an operating system. The only limitation to virtualization is your hardware as each virtual machine uses CPU and RAM. Depending upon the amount of CPU and RAM in your computer, you may find that the operating system you install using virtualization software runs slowly. If your computer slows down greatly, try closing other applications running on your computer to free up some RAM.
+
  
PC-BSD provides a PBI for {{citelink|url=http://www.virtualbox.org/|txt=VirtualBox}}, an open source virtualization program.  VirtualBox also runs on Windows, Linux, Macintosh, and OpenSolaris and supports a large number of operating systems that can be installed into a virtual machine. If your computer is already running a version of PC-BSD, you can use [[Using AppCafe®|AppCafe®]] to install VirtualBox. If your computer is running another operating system, download the binary for your operating system from the {{citelink|url=http://www.virtualbox.org/wiki/Downloads|txt=VirtualBox Downloads page}}.
+
<!--T:1-->
 +
{{NavHeader|back=PC-BSD® Live Mode|forward=Installing PC-BSD®}}</noinclude>
  
In order to use PC-BSD within VirtualBox, you will need to either:
+
<!--T:2-->
 +
A virtualized environment allows you to test drive an operating system without overwriting your current operating system. This is an excellent way to practice installation, determine whether all of your hardware is supported, or to try multiple versions of different operating systems. Virtualization software effectively creates windows (known as virtual machines) into which you can install and use an operating system. The only limitation to virtualization is your hardware as each virtual machine uses CPU and RAM. [[File:Vbox1b.png|thumb|393px|'''Figure 2.7a: Initial VirtualBox Screen''']] Depending upon the amount of CPU and RAM in your computer, you may find that the operating system you install using virtualization software runs slowly. If your computer slows down greatly, try closing other applications running on your computer to free up some RAM.
  
'''1.''' download the PC-BSD virtual disk, which contains a virtual machine with a pre-installed version of PC-BSD
+
<!--T:3-->
 +
PC-BSD® provides a PBI for {{citelink|url=http://www.virtualbox.org/|txt=VirtualBox}}, an open source virtualization program.  VirtualBox also runs on Windows, Linux, Macintosh, and OpenSolaris and supports a large number of operating systems that can be installed into a virtual machine. If your computer is already running a version of PC-BSD®, you can use [[Using AppCafe®|AppCafe®]] to install VirtualBox. If your computer is running another operating system, download the binary for your operating system from the {{citelink|url=http://www.virtualbox.org/wiki/Downloads|txt=VirtualBox Downloads page}}.
  
or
+
<!--T:4-->
 +
In order to use PC-BSD® within VirtualBox, you will need to either:
 +
* download the PC-BSD® virtual disk, which contains a virtual machine with a pre-installed version of PC-BSD® or
  
'''2.''' download the PC-BSD ISO, create your own virtual machine, and use the ISO to install PC-BSD into it.
+
<!--T:5-->
 +
* download the PC-BSD® ISO, create your own virtual machine, and use the ISO to install PC-BSD® into it.
  
'''NOTE:''' VirtualBox does not automatically support USB as a boot device. The [https://www.virtualbox.org/wiki/Downloads Oracle VM VirtualBox Extension Pack] can be used to convert an .img file to a VMDK. However, there is no BSD Extension Pack at this time. This means that you should not download a PC-BSD USB image if you plan to use it within VirtualBox on a BSD system.
+
<!--T:6-->
 +
{{note|icon64=VirtualBox does not automatically support USB as a boot device. The [https://www.virtualbox.org/wiki/Downloads Oracle VM VirtualBox Extension Pack] can be used to convert an .img file to a VMDK. However, there is no BSD Extension Pack at this time. This means that you should not download a PC-BSD® USB image if you plan to use it within VirtualBox on a BSD system.}}
  
If you have downloaded the PC-BSD virtual disk, skip ahead to [[Using VirtualBox#Using the Downloadable VirtualBox Disk|Using the Downloadable VirtualBox Disk]].
+
<!--T:7-->
 +
If you have downloaded the PC-BSD® virtual disk, skip ahead to [[Using VirtualBox#Using the Downloadable VirtualBox Disk|Using the Downloadable VirtualBox Disk]].
  
 +
<!--T:8-->
 
If you have downloaded the ISO file, you will need to first create a virtual machine that meets the following minimum requirements:
 
If you have downloaded the ISO file, you will need to first create a virtual machine that meets the following minimum requirements:
  
* 512 MB base memory size
+
<!--T:9-->
 +
* 2048 MB base memory size
  
* a virtual disk ''' ''at least 8 GB in size'' ''' to hold the operating system and swap
+
<!--T:10-->
 +
* a virtual disk ''' ''at least 20 GB in size'' ''' for a TrueOS® installation or ''' ''at least 50 GB in size'' ''' for a PC-BSD® installation
  
 +
<!--T:11-->
 
* a bridged adapter
 
* a bridged adapter
  
=== Creating a Virtual Machine ===
+
=== Creating a Virtual Machine === <!--T:12-->
  
Once installed, start VirtualBox to see the screen shown in Figure 2.8a:
+
<!--T:13-->
 +
[[File:vbox1c.png|thumb|393px|'''Figure 2.7b: Type in a Name and Select the Operating System for the New Virtual Machine''']]
 +
Once installed, start VirtualBox to see the screen shown in Figure 2.7a. To create the virtual machine, click the "New" button to start the new virtual machine wizard. Click the "Next" button to see the screen in Figure 2.7b.
  
'''Figure 2.8a: Initial VirtualBox Screen'''
+
<!--T:14-->
 +
Enter a name for your virtual machine, which can be anything that makes sense to you. Click the "Operating System" drop-down menu and select BSD which will automatically change the "Version" menu item to FreeBSD. Click Next to see the screen in Figure 2.7c:
  
[[Image:Vbox1b.png|border]]
+
<!--T:15-->
 +
[[File:Vbox1.png|thumb|393px|'''Figure 2.7c: Select the Amount of Memory Reserved for the Virtual Machine''']]
  
To create the virtual machine, click the New button to start the new virtual machine wizard. Click the Next button to see the screen in Figure 2.8b:
+
<!--T:16-->
 +
The base memory size must be changed to '''''at least 2048 MB.'' ''' If your system has a lot of RAM, use more. Any number within the green area is considered a safe value by VirtualBox, meaning it should not slow down your computer too much. When finished, click "Next" to see the screen in Figure 2.7d:
  
'''Figure 2.8b: Type in a Name and Select the Operating System for the New Virtual Machine'''
+
<!--T:17-->
 +
[[File:Vbox2b.png|thumb|393px|'''Figure 2.7d: Select Whether to Use an Existing or Create a New Virtual Disk''']]
  
[[Image:vbox1c.png|border]]
+
<!--T:18-->
 +
This screen is used to create the virtual hard disk--in other words, the amount of disk space that will be available to the virtual machine. If this is your first virtual machine, keep the default of "Start-up disk" and click "Next". If you have created a virtual machine in the past and wish to reuse its disk space, select "Use existing hard disk" from the drop-down menu. You can create as many virtual machines as you wish. However, if your computer is getting low on disk space, you should consider reusing existing virtual hard disks to prevent your hard drive from being used up by old virtual machines.
  
Enter a name for your virtual machine, which can be anything that makes sense to you. Click the Operating System drop down menu and select BSD which will automatically change the Version menu to FreeBSD. Click Next to see the screen in Figure 2.8c:
+
<!--T:19-->
 +
If you choose to create a new hard disk, the "Create New Virtual Disk Wizard", seen in Figure 2.7e, will launch when you click "Next".
  
'''Figure 2.8c: Select the Amount of Memory Reserved for the Virtual Machine'''
+
<!--T:20-->
 
+
[[File:Vbox2c.png|thumb|393px|'''Figure 2.7e: Create New Virtual Disk Wizard]]
[[Image:Vbox1.png]]
+
 
+
The base memory size must be changed to '''''at least 512 MB. If you wish to use ZFS, it will need to be at least 2048 MB.'' ''' If your system has a lot of RAM, use more. Any number within the green area is considered a safe value by VirtualBox, meaning it should not slow down your computer too much. When finished, click Next to see the screen in Figure 2.8d:
+
 
+
'''Figure 2.8d: Select Whether to Use an Existing or Create a New Virtual Disk'''
+
 
+
[[Image:Vbox2b.png]]
+
 
+
This screen is used to create the virtual hard disk--in other words, the amount of disk space that will be available to the virtual machine. If this is your first virtual machine, keep the default of "Start-up disk" and click Next. If you have created a virtual machine in the past and wish to reuse its disk space, select "Use existing hard disk" and select it from the drop down menu. You can create as many virtual machines as you wish. However, if your computer is getting low in disk space, you should consider reusing existing virtual hard disks to prevent your hard drive from being used up by old virtual machines.
+
 
+
If you choose to create a new hard disk, the "Create New Virtual Disk Wizard", seen in Figure 2.8e, will launch when you click Next.
+
 
+
'''Figure 2.8e: Create New Virtual Disk Wizard
+
 
+
[[Image:Vbox2c.png]]
+
  
 +
<!--T:21-->
 
The wizard can be used to create the following types of virtual disk formats:
 
The wizard can be used to create the following types of virtual disk formats:
  
* '''VDI:''' Virtual Disk Image is the format used by VirtualBox. Select this option if you downloaded a PC-BSD ISO file.  
+
<!--T:22-->
 +
* '''VDI:''' Virtual Disk Image is the format used by VirtualBox. Select this option if you downloaded a PC-BSD® ISO file.  
  
* '''VMDK:''' Virtual Machine Disk is the format used by {{citelink|url=http://vmware.com/|txt=VMWare}}. Select this option if you downloaded a PC-BSD VMware disk image.
+
<!--T:23-->
 +
* '''VMDK:''' Virtual Machine Disk is the format used by {{citelink|url=http://vmware.com/|txt=VMWare}}.  
  
 +
<!--T:24-->
 
* '''VHD:''' Virtual Hard Disk is the format used by {{citelink|wp|url=Microsoft_Virtual_PC|txt=Windows Virtual PC}}.
 
* '''VHD:''' Virtual Hard Disk is the format used by {{citelink|wp|url=Microsoft_Virtual_PC|txt=Windows Virtual PC}}.
  
 +
<!--T:25-->
 
* '''HDD:''' is the format used by {{citelink|url=http://www.parallels.com/|txt=Parallels}}.
 
* '''HDD:''' is the format used by {{citelink|url=http://www.parallels.com/|txt=Parallels}}.
  
Once you make a selection, click the Next button to see the screen in Figure 2.8f:
+
<!--T:26-->
 +
Once you make a selection, click the "Next" button to see the screen in Figure 2.7f:
  
'''Figure 2.8f: Select the Storage Type for the Virtual Disk'''
+
<!--T:27-->
 +
[[File:Vbox3a.png|thumb|393px|'''Figure 2.7f: Select the Storage Type for the Virtual Disk''']]
  
[[Image:Vbox3a.png]]
+
<!--T:28-->
 +
You can now choose whether you want "Dynamically allocated" or "Fixed size" storage. The first option uses disk space as needed until it reaches the maximum size that you will set in the next screen. The second option creates a disk the same size as that specified amount of disk space, whether it is used or not. Choose the first option if you are worried about disk space; otherwise, choose the second option as it allows VirtualBox to run slightly faster. Once you select "Next", you will see the screen in Figure 2.7g:
  
You can now choose whether you want "Dynamically allocated" or "Fixed size" storage. The first option uses disk space as needed until it reaches the maximum size that you will set in the next screen. The second option creates a disk the same size as that specified amount of disk space, whether it's used or not. Choose the first option if you are worried about disk space; otherwise choose the second option as it allows VirtualBox to run slightly faster. Once you select Next, you will see the screen in Figure 2.8g:
+
<!--T:29-->
 +
[[File:Vbox4b.png|thumb|393px|'''Figure 2.7g: Select the File Name and Size of the Virtual Disk''']]
  
'''Figure 2.8g: Select the File Name and Size of the Virtual Disk'''
+
<!--T:30-->
 +
This screen is used to set the size (or upper limit) of the virtual machine. If you plan to install PC-BSD® into the virtual machine, ''' ''increase the size to at least 20 GB'' ''' or you will receive an error during the PC-BSD® installation. If you plan to install KDE, GNOME, multiple desktop managers, or PBIs within the virtual machine, you will probably want to choose at least 50 GB. Whatever size you set, make sure that your computer has enough free disk space to support it. Use the folder icon to browse to a directory on disk with sufficient space to hold your virtual machine.
  
[[Image:Vbox4b.png]]
+
<!--T:31-->
 +
Once you make your selection and press "Next", you will see a summary of your choices. You can use the "Back" button to return to a previous screen if you wish to change any values. Otherwise, click "Create" to finish using the wizard. Your virtual machine should now show up in the left box, as seen in the example in Figure 2.7h:
  
This screen is used to set the size (or upper limit) of the virtual machine. If you plan to install PC-BSD into the virtual machine, ''' ''increase the size to at least 8 GB'' ''' or you will receive an error during the PC-BSD installation. If you plan to install KDE, GNOME, multiple desktop managers, or PBIs within the virtual machine, you will probably want to choose at least 20 - 30GB. Whatever size you set, make sure that your computer has enough free disk space to support it. Use the folder icon to browse to a directory on disk with sufficient space to hold your virtual machine.
+
<!--T:32-->
 +
[[File:Vbox5a.png|thumb|393px|'''Figure 2.7h: The New Virtual Machine''']]
  
Once you make your selection and press Next, you will see a summary of your choices. You can use the Back button to return to a previous screen if you wish to change any values. Otherwise, click Create to finish using the wizard. Your virtual machine should now show up in the left box, as seen in the example in Figure 2.8h:
+
==== Configuring the Network Adapter ==== <!--T:33-->
  
'''Figure 2.8h: The New Virtual Machine'''
+
<!--T:34-->
 +
If you wish to use your network card, you will need to configure bridging on your virtual machine. To do this, go to ''Settings'' ➜ ''Network''. In the "Attached to" drop-down menu select "Bridged Adapter" then select the name of the physical interface from the Name drop-down menu. In the example shown in Figure 2.7i, the Intel Pro/1000 Ethernet card is attached to the network and has a device name of ''re0''.
  
[[Image:Vbox5a.png]]
+
<!--T:35-->
 +
[[File:Vbox7a.png|thumb|393px|'''Figure 2.7i: Configuring a Bridged Adapter in VirtualBox''']]
  
==== Configuring the Network Adapter ====
+
==== Configuring the Storage Device ==== <!--T:36-->
  
If you wish to use your network card, you will need to configure bridging on your virtual machine. To do this, go to ''Settings'' ➜ ''Network''. In the "Attached to" drop-down menu select Bridged Adapter then select the name of the physical interface from the Name drop-down menu. In the example shown in Figure 2.8i, the Intel Pro/1000 Ethernet card is attached to the network and has a device name of ''re0''.
+
<!--T:37-->
 +
Before starting your virtual machine, you will want to configure it to use your installation media. Click the Storage hyperlink in the right frame to access the storage screen seen in Figure 2.7j:
  
'''Figure 2.8i: Configuring a Bridged Adapter in VirtualBox'''
+
<!--T:38-->
 +
[[File:Vbox6b.png|thumb|393px|'''Figure 2.7j: The Storage Settings of the Virtual Machine''']]
  
[[Image:Vbox7a.png|border]]
+
<!--T:39-->
 
+
Double-click the word ''Empty'', which represents your DVD reader. If you wish to access the PC-BSD® installer from your DVD reader, double-check that the Slot is pointing to the correct location (e.g. IDE Secondary Master) and use the drop-down menu to change it if the location is incorrect. Click the "CD/DVD Device" drop-down menu to change it from empty to the Host Drive value.
==== Configuring the Storage Device ====
+
 
+
Before starting your virtual machine, you will want to configure it to use your installation media. Click the Storage hyperlink in the right frame to access the storage screen seen in Figure 2.8j:
+
 
+
'''Figure 2.8j: The Storage Settings of the Virtual Machine'''
+
 
+
[[Image:Vbox6a.png|border]]
+
 
+
Double-click the word Empty, which represents your DVD reader. If you wish to access the PC-BSD installer from your DVD reader, double-check that the Slot is pointing to the correct location (e.g. IDE Secondary Master) and use the drop down menu to change it if the location is incorrect. Click the CD/DVD Device drop down menu to change it from empty to the Host Drive value.
+
  
 +
<!--T:40-->
 
If you prefer to use an ISO that is stored on your hard disk, click the DVD icon ➜ ''Choose a virtual CD/DVD disk file'' to open a browser menu where you can navigate to the location of the ISO. Highlight the desired ISO and click Open. The name of the ISO will now appear in the Storage Tree section.
 
If you prefer to use an ISO that is stored on your hard disk, click the DVD icon ➜ ''Choose a virtual CD/DVD disk file'' to open a browser menu where you can navigate to the location of the ISO. Highlight the desired ISO and click Open. The name of the ISO will now appear in the Storage Tree section.
  
'''NOTE:''' the selected ISO/DVD can be 32-bit, even if you are using VirtualBox on a 64-bit system. Depending upon the extensions available in your CPU, you may or may not be able to run a 64-bit ISO on a 64-bit system. If you receive the error "your CPU does not support long mode" when you try to boot a 64-bit ISO, your CPU either does not have the required extension or AMD-V/VT-x is disabled in the system BIOS.
+
<!--T:42-->
 +
You are now ready to install PC-BSD® into your virtual machine. Simply highlight the virtual machine and click on the green "Start" icon. A window will open indicating that the virtual machine is starting. If you have a DVD inserted, you should hear it spin and it should start to boot into the installation program. If it does not or if you are using an ISO stored on the hard disk, press F12 to select the boot device when you see the message to do so, then press "c" to boot from CD-ROM. You can then proceed through the installation as described in the [[Installing PC-BSD®|Installation]] section.
  
You are now ready to install PC-BSD into your virtual machine. Simply highlight the virtual machine and click on the green Start icon. A window will open indicating that the virtual machine is starting. If you have a DVD inserted, you should hear it spin and it should start to boot into the installation program. If it doesn't or if you're using an ISO stored on the hard disk, press F12 to select the boot device when you see the message to do so, then press "c" to boot from CD-ROM. You can then proceed through the installation as described in the [[Installing PC-BSD|Installation]] section.
+
<!--T:43-->
 +
{{note|width=48.5%|icon64=the virtual machine will capture your mouse pointer. Use your right Ctrl button if you wish to leave the virtual machine and use your mouse to interact with other applications on your computer. To go back to the virtual machine, simply click anywhere inside the virtual machine and VirtualBox will re-capture your mouse pointer.}}
  
'''NOTE:''' the virtual machine will "capture" your mouse pointer. Use your right Ctrl button if you wish to leave the virtual machine and use your mouse to interact with other applications on your computer. To go back to the virtual machine, simply click anywhere inside the virtual machine and VirtualBox will re-capture your mouse pointer.
+
=== Installing VirtualBox Guest Additions === <!--T:44-->
  
=== Installing VirtualBox Guest Additions ===
+
<!--T:45-->
 +
Beginning with PC-BSD® 9.0, you can install the {{citelink|url=http://www.virtualbox.org/manual/ch04.html|txt=VirtualBox Guest Additions}} either during installation or afterwards using ''[[Control Panel]]'' ➜ [[System Manager#Install/Uninstall Desktops and System Components | ''System Manager'' ➜ ''System Packages'']] ➜ ''Misc''. The guest additions add mouse pointer integration, shared folders between the host and guest, better video support, and a shared clipboard. To use the improved video support, select ''vboxvideo'' in ''[[Control Panel]]'' ➜ ''[[Display]]''.
  
Beginning with PC-BSD 9.0, you can install the {{citelink|url=http://www.virtualbox.org/manual/ch04.html|txt=VirtualBox Guest Additions}} either during installation or afterwards using ''[[Control Panel]]'' ➜ [[System Manager#Install/Uninstall Desktops and System Components | ''System Manager'' ➜ ''System Packages'']] ➜ ''Misc''. The guest additions add mouse pointer integration, shared folders between the host and guest, better video support, and a shared clipboard. To use the improved video support, select ''vboxvideo'' in ''[[Control Panel]]'' ➜ [[Display]].
+
=== Using the Downloadable VirtualBox or VMWare Disk === <!--T:46-->
  
=== Using the Downloadable VirtualBox Disk ===
+
<!--T:47-->
 +
PC-BSD® provides pre-built VirtualBox and VMWare disks which create a a pre-made virtual machine with PC-BSD already installed. The VirtualBox file ends in a ''.vdi.bz2'' extension and the VMWare disk file ends in a ''.vmdk.bz2'' extension. The ''.bz2'' means that either file needs to be unzipped first so that it just ends with a ''.vdi'' or ''.vmdk'' extension.
  
The downloadable PC-BSD virtual disk contains a pre-made virtual machine. This file ends in a ''.vdi.bz2'' extension, meaning that it needs to be unzipped first so that it just ends with a ''.vdi'' extension.
+
<!--T:48-->
 +
On a Linux or BSD system, use the '''bunzip2''' command by giving it the name of the file which you downloaded:
  
On a Linux or BSD system, use the '''bunzip2''' command:
+
<!--T:49-->
 +
{{txtbox|box='''bunzip2 PCBSD9.0-x86-VBOX.vdi.bz2'''}}
  
'''bunzip2 PCBSD9.0-x86-VBOX.vdi.bz2'''
+
<!--T:50-->
 +
Since this is a large file, the command will take a few minutes to extract the image. You will receive the prompt back when it has finished.
  
Since this is a large file, the command will take a few minutes to extract the image. You will receive the prompt back when it is finished.
+
<!--T:51-->
 +
On a Windows system, you can use a utility such as {{citelink|url=http://www.7-zip.org/|txt=7-Zip}}. On a Mac OS X system, simply double-click the file in "Finder" to extract it.
  
On a Windows system, you can use a utility such as {{citelink|url=http://www.7-zip.org/|txt=7-Zip}}. On a Mac OS X system, Simply double-click the file in Finder to extract it.
+
<!--T:52-->
 +
Once the file is unzipped, open VirtualBox as described in [[Using VirtualBox#Creating a Virtual Machine|Creating a Virtual Machine]]. When you get to Figure 2.7d, select "Use existing hard disk".
  
Once the file ends in a ''.vdi'', open VirtualBox as described in [[Using VirtualBox#Creating a Virtual Machine|Creating a Virtual Machine]]. When you get to Figure 2.8d, select "Use existing hard disk".
+
<!--T:53-->
 +
Use the browse icon to browse to the location of the ''.vdi'' or ''.vmdk'' file then press "Next". A message will indicate that the virtual machine will be created; click the "Create" button to finish the wizard. You can then [[Using VirtualBox#Configuring the Network Adapter|configure the network adapter]] and start the virtual machine.
  
Use the browse icon to browse to the location of the ''.vdi'' file then press Next. A message will indicate that the virtual machine will be created; click the Create button to finish the wizard. You can then [[Using VirtualBox#Configuring the Network Adapter|configure the network adapter]] and start the virtual machine.
+
<!--T:54-->
 +
The virtual machine will boot into the [[Post Installation Configuration and Installation Troubleshooting|first boot wizard]] for PC-BSD® so that the system can be configured. Once the display wizard is finished and the login prompt appears, input the username and password that you configured at the login screen.
  
The virtual machine will boot into PC-BSD. Once the display wizard is finished and the login prompt appears, input the password ''pcbsd'' at the login screen. Should you be prompted for the administrative password, it is the same value. Since the password is a known value, you should create your own user account and change the ''root'' user's password using [[User Manager]].
+
=== Troubleshooting VirtualBox === <!--T:55-->
  
=== Troubleshooting VirtualBox ===
+
<!--T:56-->
 +
While using a virtual environment allows you to test an operating system without affecting what else is currently installed on the system, there are some things to be aware of when using VirtualBox.
  
While using a virtual environment allows you to test an operating system without affecting what else is currently installed on the system, there are some tips to be aware of when using VirtualBox.
+
<!--T:57-->
 
+
If the installer program fails to load, try increasing the amount of RAM in the virtual machine.  
If the installer program fails to load, try increasing the amount of RAM in the virtual machine. The bare minimum is 512 MB, but increasing this value to 1024 or higher will sometimes allow an unbootable ISO to boot into the installer.
+
  
 +
<!--T:58-->
 
If the installation fails and you would like to review the installation log, right-click the virtual machine window and select xterm from the menu. You can now type '''more /tmp/pc-sysinstall.log''' to review the log.
 
If the installation fails and you would like to review the installation log, right-click the virtual machine window and select xterm from the menu. You can now type '''more /tmp/pc-sysinstall.log''' to review the log.
  
 +
<!--T:59-->
 
Ctrl-f (right ctrl key only) will toggle the virtual machine window in and out of full-screen mode.
 
Ctrl-f (right ctrl key only) will toggle the virtual machine window in and out of full-screen mode.
  
 +
<!--T:60-->
 
The {{citelink|fbsd|url=VirtualBox|FreeBSD VirtualBox wiki}} contains additional information that may assist you in troubleshooting VirtualBox issues.
 
The {{citelink|fbsd|url=VirtualBox|FreeBSD VirtualBox wiki}} contains additional information that may assist you in troubleshooting VirtualBox issues.
<noinclude>{{refheading}}</noinclude>
+
 
 +
<!--T:61-->
 
<noinclude>
 
<noinclude>
[[category:handbook]]
+
{{refheading}}
[[category:Pre-Installation Tasks]]
+
 
[[category:Using Virtualbox]]
 
[[category:Using Virtualbox]]
 +
[[category:Pre-Installation Tasks]]
 +
[[category:handbook]]
 
[[category:troubleshooting]] <!-- Included in the category for referencing this topic -->
 
[[category:troubleshooting]] <!-- Included in the category for referencing this topic -->
 +
</translate>
 +
<languages />
 
</noinclude>
 
</noinclude>

Revision as of 11:24, 1 July 2013

(Sorry for the inconvenience)

Contents

A virtualized environment allows you to test drive an operating system without overwriting your current operating system. This is an excellent way to practice installation, determine whether all of your hardware is supported, or to try multiple versions of different operating systems. Virtualization software effectively creates windows (known as virtual machines) into which you can install and use an operating system. The only limitation to virtualization is your hardware as each virtual machine uses CPU and RAM.
Figure 2.7a: Initial VirtualBox Screen
Depending upon the amount of CPU and RAM in your computer, you may find that the operating system you install using virtualization software runs slowly. If your computer slows down greatly, try closing other applications running on your computer to free up some RAM.

PC-BSD® provides a PBI for VirtualBox[1], an open source virtualization program. VirtualBox also runs on Windows, Linux, Macintosh, and OpenSolaris and supports a large number of operating systems that can be installed into a virtual machine. If your computer is already running a version of PC-BSD®, you can use AppCafe® to install VirtualBox. If your computer is running another operating system, download the binary for your operating system from the VirtualBox Downloads page[2].

In order to use PC-BSD® within VirtualBox, you will need to either:

  • download the PC-BSD® virtual disk, which contains a virtual machine with a pre-installed version of PC-BSD® or
  • download the PC-BSD® ISO, create your own virtual machine, and use the ISO to install PC-BSD® into it.
NOTE: VirtualBox does not automatically support USB as a boot device. The Oracle VM VirtualBox Extension Pack can be used to convert an .img file to a VMDK. However, there is no BSD Extension Pack at this time. This means that you should not download a PC-BSD® USB image if you plan to use it within VirtualBox on a BSD system.

If you have downloaded the PC-BSD® virtual disk, skip ahead to Using the Downloadable VirtualBox Disk.

If you have downloaded the ISO file, you will need to first create a virtual machine that meets the following minimum requirements:

  • 2048 MB base memory size
  • a virtual disk at least 20 GB in size for a TrueOS® installation or at least 50 GB in size for a PC-BSD® installation
  • a bridged adapter

Creating a Virtual Machine

Figure 2.7b: Type in a Name and Select the Operating System for the New Virtual Machine

Once installed, start VirtualBox to see the screen shown in Figure 2.7a. To create the virtual machine, click the "New" button to start the new virtual machine wizard. Click the "Next" button to see the screen in Figure 2.7b.

Enter a name for your virtual machine, which can be anything that makes sense to you. Click the "Operating System" drop-down menu and select BSD which will automatically change the "Version" menu item to FreeBSD. Click Next to see the screen in Figure 2.7c:

Figure 2.7c: Select the Amount of Memory Reserved for the Virtual Machine

The base memory size must be changed to at least 2048 MB. If your system has a lot of RAM, use more. Any number within the green area is considered a safe value by VirtualBox, meaning it should not slow down your computer too much. When finished, click "Next" to see the screen in Figure 2.7d:

Figure 2.7d: Select Whether to Use an Existing or Create a New Virtual Disk

This screen is used to create the virtual hard disk--in other words, the amount of disk space that will be available to the virtual machine. If this is your first virtual machine, keep the default of "Start-up disk" and click "Next". If you have created a virtual machine in the past and wish to reuse its disk space, select "Use existing hard disk" from the drop-down menu. You can create as many virtual machines as you wish. However, if your computer is getting low on disk space, you should consider reusing existing virtual hard disks to prevent your hard drive from being used up by old virtual machines.

If you choose to create a new hard disk, the "Create New Virtual Disk Wizard", seen in Figure 2.7e, will launch when you click "Next".

Figure 2.7e: Create New Virtual Disk Wizard

The wizard can be used to create the following types of virtual disk formats:

  • VDI: Virtual Disk Image is the format used by VirtualBox. Select this option if you downloaded a PC-BSD® ISO file.
  • VMDK: Virtual Machine Disk is the format used by VMWare[3].

Once you make a selection, click the "Next" button to see the screen in Figure 2.7f:

Figure 2.7f: Select the Storage Type for the Virtual Disk

You can now choose whether you want "Dynamically allocated" or "Fixed size" storage. The first option uses disk space as needed until it reaches the maximum size that you will set in the next screen. The second option creates a disk the same size as that specified amount of disk space, whether it is used or not. Choose the first option if you are worried about disk space; otherwise, choose the second option as it allows VirtualBox to run slightly faster. Once you select "Next", you will see the screen in Figure 2.7g:

Figure 2.7g: Select the File Name and Size of the Virtual Disk

This screen is used to set the size (or upper limit) of the virtual machine. If you plan to install PC-BSD® into the virtual machine, increase the size to at least 20 GB or you will receive an error during the PC-BSD® installation. If you plan to install KDE, GNOME, multiple desktop managers, or PBIs within the virtual machine, you will probably want to choose at least 50 GB. Whatever size you set, make sure that your computer has enough free disk space to support it. Use the folder icon to browse to a directory on disk with sufficient space to hold your virtual machine.

Once you make your selection and press "Next", you will see a summary of your choices. You can use the "Back" button to return to a previous screen if you wish to change any values. Otherwise, click "Create" to finish using the wizard. Your virtual machine should now show up in the left box, as seen in the example in Figure 2.7h:

Figure 2.7h: The New Virtual Machine

Configuring the Network Adapter

If you wish to use your network card, you will need to configure bridging on your virtual machine. To do this, go to SettingsNetwork. In the "Attached to" drop-down menu select "Bridged Adapter" then select the name of the physical interface from the Name drop-down menu. In the example shown in Figure 2.7i, the Intel Pro/1000 Ethernet card is attached to the network and has a device name of re0.

Figure 2.7i: Configuring a Bridged Adapter in VirtualBox

Configuring the Storage Device

Before starting your virtual machine, you will want to configure it to use your installation media. Click the Storage hyperlink in the right frame to access the storage screen seen in Figure 2.7j:

Figure 2.7j: The Storage Settings of the Virtual Machine

Double-click the word Empty, which represents your DVD reader. If you wish to access the PC-BSD® installer from your DVD reader, double-check that the Slot is pointing to the correct location (e.g. IDE Secondary Master) and use the drop-down menu to change it if the location is incorrect. Click the "CD/DVD Device" drop-down menu to change it from empty to the Host Drive value.

If you prefer to use an ISO that is stored on your hard disk, click the DVD icon ➜ Choose a virtual CD/DVD disk file to open a browser menu where you can navigate to the location of the ISO. Highlight the desired ISO and click Open. The name of the ISO will now appear in the Storage Tree section.

You are now ready to install PC-BSD® into your virtual machine. Simply highlight the virtual machine and click on the green "Start" icon. A window will open indicating that the virtual machine is starting. If you have a DVD inserted, you should hear it spin and it should start to boot into the installation program. If it does not or if you are using an ISO stored on the hard disk, press F12 to select the boot device when you see the message to do so, then press "c" to boot from CD-ROM. You can then proceed through the installation as described in the Installation section.

NOTE: The virtual machine will capture your mouse pointer. Use your right Ctrl button if you wish to leave the virtual machine and use your mouse to interact with other applications on your computer. To go back to the virtual machine, simply click anywhere inside the virtual machine and VirtualBox will re-capture your mouse pointer.

Installing VirtualBox Guest Additions

Beginning with PC-BSD® 9.0, you can install the VirtualBox Guest Additions[6] either during installation or afterwards using Control Panel System ManagerSystem PackagesMisc. The guest additions add mouse pointer integration, shared folders between the host and guest, better video support, and a shared clipboard. To use the improved video support, select vboxvideo in Control PanelDisplay.

Using the Downloadable VirtualBox or VMWare Disk

PC-BSD® provides pre-built VirtualBox and VMWare disks which create a a pre-made virtual machine with PC-BSD already installed. The VirtualBox file ends in a .vdi.bz2 extension and the VMWare disk file ends in a .vmdk.bz2 extension. The .bz2 means that either file needs to be unzipped first so that it just ends with a .vdi or .vmdk extension.

On a Linux or BSD system, use the bunzip2 command by giving it the name of the file which you downloaded:

bunzip2 PCBSD9.0-x86-VBOX.vdi.bz2

Since this is a large file, the command will take a few minutes to extract the image. You will receive the prompt back when it has finished.

On a Windows system, you can use a utility such as 7-Zip[7]. On a Mac OS X system, simply double-click the file in "Finder" to extract it.

Once the file is unzipped, open VirtualBox as described in Creating a Virtual Machine. When you get to Figure 2.7d, select "Use existing hard disk".

Use the browse icon to browse to the location of the .vdi or .vmdk file then press "Next". A message will indicate that the virtual machine will be created; click the "Create" button to finish the wizard. You can then configure the network adapter and start the virtual machine.

The virtual machine will boot into the first boot wizard for PC-BSD® so that the system can be configured. Once the display wizard is finished and the login prompt appears, input the username and password that you configured at the login screen.

Troubleshooting VirtualBox

While using a virtual environment allows you to test an operating system without affecting what else is currently installed on the system, there are some things to be aware of when using VirtualBox.

If the installer program fails to load, try increasing the amount of RAM in the virtual machine.

If the installation fails and you would like to review the installation log, right-click the virtual machine window and select xterm from the menu. You can now type more /tmp/pc-sysinstall.log to review the log.

Ctrl-f (right ctrl key only) will toggle the virtual machine window in and out of full-screen mode.

The [1][8] contains additional information that may assist you in troubleshooting VirtualBox issues.


References


  1. http://www.virtualbox.org/
  2. http://www.virtualbox.org/wiki/Downloads
  3. http://vmware.com/
  4. http://en.wikipedia.org/wiki/Microsoft_Virtual_PC
  5. http://www.parallels.com/
  6. http://www.virtualbox.org/manual/ch04.html
  7. http://www.7-zip.org/
  8. http://wiki.freebsd.org/VirtualBox
Other languages:German 12% • ‎English 100% • ‎French 3%
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox