diff --git a/documentation/content/en/books/handbook/virtualization/_index.adoc b/documentation/content/en/books/handbook/virtualization/_index.adoc --- a/documentation/content/en/books/handbook/virtualization/_index.adoc +++ b/documentation/content/en/books/handbook/virtualization/_index.adoc @@ -51,9 +51,11 @@ After reading this chapter, you will know: * The difference between a host operating system and a guest operating system. -* How to install FreeBSD on an Intel(R)-based Apple(R) Mac(R) computer. -* How to install FreeBSD on Microsoft(R) Windows(R) with Virtual PC. -* How to install FreeBSD as a guest in bhyve. +* How to install FreeBSD on the following virtualization platforms: +** Parallels Desktop(Intel(R)-based Apple(R) macOS(R)) +** VMware Fusion(Intel(R)-based Apple(R) macOS(R)) +** VirtualBox(TM)(Microsoft(R) Windows(R), Intel(R)-based Apple(R) macOS(R), Linux) +** bhyve(FreeBSD) * How to tune a FreeBSD system for best performance under virtualization. Before reading this chapter, you should: @@ -63,13 +65,13 @@ * Know how to crossref:advanced-networking[advanced-networking,set up a network connection]. * Know how to crossref:ports[ports,install additional third-party software]. -[[virtualization-guest-parallels]] -== FreeBSD as a Guest on Parallels for Mac OS(R) X +[[virtualization-guest-parallelsdesktop]] +== FreeBSD as a Guest on Parallels Desktop for macOS(R) -Parallels Desktop for Mac(R) is a commercial software product available for Intel(R) based Apple(R) Mac(R) computers running Mac OS(R) 10.4.6 or higher. FreeBSD is a fully supported guest operating system. Once Parallels has been installed on Mac OS(R) X, the user must configure a virtual machine and then install the desired guest operating system. +Parallels Desktop for Mac(R) is a commercial software product available for Intel(R) based Apple(R) Mac(R) computers running macOS(R) 10.4.6 or higher. FreeBSD is a fully supported guest operating system. Once Parallels has been installed on macOS(R), the user must configure a virtual machine and then install the desired guest operating system. -[[virtualization-guest-parallels-install]] -=== Installing FreeBSD on Parallels/Mac OS(R) X +[[virtualization-guest-parallelsdesktop-install]] +=== Installing FreeBSD on Parallels Desktop on Mac(R) The first step in installing FreeBSD on Parallels is to create a new virtual machine for installing FreeBSD. Select [.guimenuitem]#FreeBSD# as the menu:Guest OS Type[] when prompted: @@ -116,7 +118,7 @@ [[virtualization-guest-parallels-configure]] === Configuring FreeBSD on Parallels -After FreeBSD has been successfully installed on Mac OS(R) X with Parallels, there are a number of configuration steps that can be taken to optimize the system for virtualized operation. +After FreeBSD has been successfully installed on macOS(R) X with Parallels, there are a number of configuration steps that can be taken to optimize the system for virtualized operation. [.procedure] . Set Boot Loader Variables @@ -136,148 +138,81 @@ + The most basic networking setup uses DHCP to connect the virtual machine to the same local area network as the host Mac(R). This can be accomplished by adding `ifconfig_ed0="DHCP"` to [.filename]#/etc/rc.conf#. More advanced networking setups are described in crossref:advanced-networking[advanced-networking,Advanced Networking]. -[[virtualization-guest-virtualpc]] -== FreeBSD as a Guest on Virtual PC for Windows(R) - -Virtual PC for Windows(R) is a Microsoft(R) software product available for free download. See this website for the http://www.microsoft.com/windows/downloads/virtualpc/sysreq.mspx[system requirements]. Once Virtual PC has been installed on Microsoft(R) Windows(R), the user can configure a virtual machine and then install the desired guest operating system. - -[[virtualization-guest-virtualpc-install]] -=== Installing FreeBSD on Virtual PC - -The first step in installing FreeBSD on Virtual PC is to create a new virtual machine for installing FreeBSD. Select [.guimenuitem]#Create a virtual machine# when prompted: - -image::virtualpc-freebsd1.png[] - -image::virtualpc-freebsd2.png[] - -Select [.guimenuitem]#Other# as the [.guimenuitem]#Operating system# when prompted: - -image::virtualpc-freebsd3.png[] - -Then, choose a reasonable amount of disk and memory depending on the plans for this virtual FreeBSD instance. 4GB of disk space and 512MB of RAM work well for most uses of FreeBSD under Virtual PC: - -image::virtualpc-freebsd4.png[] - -image::virtualpc-freebsd5.png[] - -Save and finish the configuration: - -image::virtualpc-freebsd6.png[] - -Select the FreeBSD virtual machine and click menu:Settings[], then set the type of networking and a network interface: - -image::virtualpc-freebsd7.png[] - -image::virtualpc-freebsd8.png[] - -After the FreeBSD virtual machine has been created, FreeBSD can be installed on it. This is best done with an official FreeBSD CD/DVD or with an ISO image downloaded from an official FTP site. Copy the appropriate ISO image to the local Windows(R) filesystem or insert a CD/DVD in the CD drive, then double click on the FreeBSD virtual machine to boot. Then, click menu:CD[] and choose menu:Capture ISO Image...[] on the Virtual PC window. This will bring up a window where the CD-ROM drive in the virtual machine can be associated with an ISO file on disk or with the real CD-ROM drive. - -image::virtualpc-freebsd9.png[] - -image::virtualpc-freebsd10.png[] - -Once this association with the CD-ROM source has been made, reboot the FreeBSD virtual machine by clicking menu:Action[] and menu:Reset[]. Virtual PC will reboot with a special BIOS that first checks for a CD-ROM. - -image::virtualpc-freebsd11.png[] - -In this case it will find the FreeBSD installation media and begin a normal FreeBSD installation. Continue with the installation, but do not attempt to configure Xorg at this time. - -image::virtualpc-freebsd12.png[] +[[virtualization-guest-vmware]] +== FreeBSD as a Guest on VMware Fusion for macOS(R) -When the installation is finished, remember to eject the CD/DVD or release the ISO image. Finally, reboot into the newly installed FreeBSD virtual machine. +VMware Fusion for Mac(R) is a commercial software product available for Intel(R) based Apple(R) Mac(R) computers running macOS(R) 10.11 or higher. FreeBSD is a fully supported guest operating system. Once VMware Fusion has been installed on macOS(R), the user can configure a virtual machine and then install the desired guest operating system. -image::virtualpc-freebsd13.png[] +[[virtualization-guest-vmware-install]] +=== Installing FreeBSD on VMware Fusion -[[virtualization-guest-virtualpc-configure]] -=== Configuring FreeBSD on Virtual PC +The first step is to start VMware Fusion which will load the Virtual Machine Library. Click [.guimenuitem]#+->New# to create the virtual machine: -After FreeBSD has been successfully installed on Microsoft(R) Windows(R) with Virtual PC, there are a number of configuration steps that can be taken to optimize the system for virtualized operation. +image::vmware-freebsd01.png[width=35%] -[.procedure] -. Set Boot Loader Variables -+ -The most important step is to reduce the `kern.hz` tunable to reduce the CPU utilization of FreeBSD under the Virtual PC environment. This is accomplished by adding the following line to [.filename]#/boot/loader.conf#: -+ -[.programlisting] -.... -kern.hz=100 -.... -+ -Without this setting, an idle FreeBSD Virtual PC guest OS will use roughly 40% of the CPU of a single processor computer. After this change, the usage will be closer to 3%. -. Create a New Kernel Configuration File -+ -All of the SCSI, FireWire, and USB device drivers can be removed from a custom kernel configuration file. Virtual PC provides a virtual network adapter used by the man:de[4] driver, so all network devices except for man:de[4] and man:miibus[4] can be removed from the kernel. -. Configure Networking -+ -The most basic networking setup uses DHCP to connect the virtual machine to the same local area network as the Microsoft(R) Windows(R) host. This can be accomplished by adding `ifconfig_de0="DHCP"` to [.filename]#/etc/rc.conf#. More advanced networking setups are described in crossref:advanced-networking[advanced-networking,Advanced Networking]. +This will load the New Virtual Machine Assistant. Choose [.guimenuitem]#Create a custom virtual machine# and click [.guimenuitem]#Continue# to proceed: -[[virtualization-guest-vmware]] -== FreeBSD as a Guest on VMware Fusion for Mac OS(R) +image::vmware-freebsd02.png[width=45%] -VMware Fusion for Mac(R) is a commercial software product available for Intel(R) based Apple(R) Mac(R) computers running Mac OS(R) 10.4.9 or higher. FreeBSD is a fully supported guest operating system. Once VMware Fusion has been installed on Mac OS(R) X, the user can configure a virtual machine and then install the desired guest operating system. +Select [.guimenuitem]#Other# as the [.guimenuitem]#Operating System# and either [.guimenuitem]#FreeBSD X# or [.guimenuitem]#FreeBSD X 64-bit#, as the menu:Version[] when prompted: -[[virtualization-guest-vmware-install]] -=== Installing FreeBSD on VMware Fusion +image::vmware-freebsd03.png[width=45%] -The first step is to start VMware Fusion which will load the Virtual Machine Library. Click [.guimenuitem]#New# to create the virtual machine: +Choose the firmware(UEFI is recommended): -image::vmware-freebsd01.png[] +image::vmware-freebsd04.png[width=45%] -This will load the New Virtual Machine Assistant. Click [.guimenuitem]#Continue# to proceed: +Choose [.guimenuitem]#Create a new virtual disk# and click [.guimenuitem]#Continue#: -image::vmware-freebsd02.png[] +image::vmware-freebsd05.png[width=45%] -Select [.guimenuitem]#Other# as the [.guimenuitem]#Operating System# and either [.guimenuitem]#FreeBSD# or [.guimenuitem]#FreeBSD 64-bit#, as the menu:Version[] when prompted: +Check the configuration and click [.guimenuitem]#Finish#: -image::vmware-freebsd03.png[] +image::vmware-freebsd06.png[width=45%] Choose the name of the virtual machine and the directory where it should be saved: -image::vmware-freebsd04.png[] +image::vmware-freebsd07.png[width=45%] -Choose the size of the Virtual Hard Disk for the virtual machine: +Press command+E to open virtual machine settings and click [.guimenuitem]#CD/DVD#: -image::vmware-freebsd05.png[] +image::vmware-freebsd08.png[width=45%] -Choose the method to install the virtual machine, either from an ISO image or from a CD/DVD: +Choose FreeBSD ISO image or from a CD/DVD: -image::vmware-freebsd06.png[] +image::vmware-freebsd09.png[width=45%] -Click [.guimenuitem]#Finish# and the virtual machine will boot: +Start the virtual machine: -image::vmware-freebsd07.png[] +image::vmware-freebsd10.png[width=25%] Install FreeBSD as usual: -image::vmware-freebsd08.png[] +image::vmware-freebsd11.png[width=25%] -Once the install is complete, the settings of the virtual machine can be modified, such as memory usage: +Once the install is complete, the settings of the virtual machine can be modified, such as memory usage and the number of CPUs the virtual machine will have access to: [NOTE] ==== The System Hardware settings of the virtual machine cannot be modified while the virtual machine is running. ==== -image::vmware-freebsd09.png[] - -The number of CPUs the virtual machine will have access to: - -image::vmware-freebsd10.png[] +image::vmware-freebsd12.png[width=45%] The status of the CD-ROM device. Normally the CD/DVD/ISO is disconnected from the virtual machine when it is no longer needed. -image::vmware-freebsd11.png[] +image::vmware-freebsd09.png[width=45%] The last thing to change is how the virtual machine will connect to the network. To allow connections to the virtual machine from other machines besides the host, choose [.guimenuitem]#Connect directly to the physical network (Bridged)#. Otherwise, [.guimenuitem]#Share the host's internet connection (NAT)# is preferred so that the virtual machine can have access to the Internet, but the network cannot access the virtual machine. -image::vmware-freebsd12.png[] +image::vmware-freebsd13.png[width=45%] After modifying the settings, boot the newly installed FreeBSD virtual machine. [[virtualization-guest-vmware-configure]] === Configuring FreeBSD on VMware Fusion -After FreeBSD has been successfully installed on Mac OS(R) X with VMware Fusion, there are a number of configuration steps that can be taken to optimize the system for virtualized operation. +After FreeBSD has been successfully installed on macOS(R) X with VMware Fusion, there are a number of configuration steps that can be taken to optimize the system for virtualized operation. [.procedure] . Set Boot Loader Variables @@ -296,6 +231,14 @@ . Configure Networking + The most basic networking setup uses DHCP to connect the virtual machine to the same local area network as the host Mac(R). This can be accomplished by adding `ifconfig_em0="DHCP"` to [.filename]#/etc/rc.conf#. More advanced networking setups are described in crossref:advanced-networking[advanced-networking,Advanced Networking]. +. Install drivers and open-vm-tools ++ +To run FreeBSD smoothly on VMWare, drivers should be installed: ++ +[source,shell] +.... +# pkg install xf86-video-vmware xf86-input-vmmouse open-vm-tools +.... [[virtualization-guest-virtualbox]] == FreeBSD as a Guest on VirtualBox(TM) @@ -414,7 +357,7 @@ [[virtualization-host-virtualbox]] == FreeBSD as a Host with VirtualBox(TM) -VirtualBox(TM) is an actively developed, complete virtualization package, that is available for most operating systems including Windows(R), Mac OS(R), Linux(R) and FreeBSD. It is equally capable of running Windows(R) or UNIX(R)-like guests. It is released as open source software, but with closed-source components available in a separate extension pack. These components include support for USB 2.0 devices. More information may be found on the http://www.virtualbox.org/wiki/Downloads[Downloads page of the VirtualBox(TM) wiki]. Currently, these extensions are not available for FreeBSD. +VirtualBox(TM) is an actively developed, complete virtualization package, that is available for most operating systems including Windows(R), macOS(R), Linux(R) and FreeBSD. It is equally capable of running Windows(R) or UNIX(R)-like guests. It is released as open source software, but with closed-source components available in a separate extension pack. These components include support for USB 2.0 devices. More information may be found on the http://www.virtualbox.org/wiki/Downloads[Downloads page of the VirtualBox(TM) wiki]. Currently, these extensions are not available for FreeBSD. [[virtualization-virtualbox-install]] === Installing VirtualBox(TM) diff --git a/documentation/static/images/books/handbook/virtualization/virtualpc-freebsd1.png b/documentation/static/images/books/handbook/virtualization/virtualpc-freebsd1.png deleted file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@