View | Details | Raw Unified | Return to bug 249976
Collapse All | Expand All

(-)b/documentation/content/en/books/handbook/virtualization/_index.adoc (-104 / +68 lines)
Lines 50-57 Virtualization software allows multiple operating systems to run simultaneously Link Here
50
After reading this chapter, you will know:
50
After reading this chapter, you will know:
51
51
52
* The difference between a host operating system and a guest operating system.
52
* The difference between a host operating system and a guest operating system.
53
* How to install FreeBSD on an Intel(R)-based Apple(R) Mac(R) computer.
53
* How to install FreeBSD as on follwing operating systems and virtualization programs.
54
* How to install FreeBSD on Microsoft(R) Windows(R) with Virtual PC.
54
** Intel(R)-based Apple(R) Mac(R) computer.
55
*** Parallels Desktop
56
*** VMware Fusion
57
*** VirtualBox(TM)
58
** Microsoft(R) Windows(R)
59
*** Hyper-V
60
*** VirtualBox(TM)
61
*** VMware Workstation
62
** Linux
63
*** VMware Workstation
55
* How to install FreeBSD as a guest in bhyve.
64
* How to install FreeBSD as a guest in bhyve.
56
* How to tune a FreeBSD system for best performance under virtualization.
65
* How to tune a FreeBSD system for best performance under virtualization.
57
66
Lines 62-74 Before reading this chapter, you should: Link Here
62
* Know how to crossref:advanced-networking[advanced-networking,set up a network connection].
71
* Know how to crossref:advanced-networking[advanced-networking,set up a network connection].
63
* Know how to crossref:ports[ports,install additional third-party software].
72
* Know how to crossref:ports[ports,install additional third-party software].
64
73
65
[[virtualization-guest-parallels]]
74
[[virtualization-guest-parallelsdesktop]]
66
== FreeBSD as a Guest on Parallels for Mac OS(R) X
75
== FreeBSD as a Guest on Parallels Desktop for macOS(R)
67
76
68
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.
77
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.
69
78
70
[[virtualization-guest-parallels-install]]
79
[[virtualization-guest-parallelsdesktop-install]]
71
=== Installing FreeBSD on Parallels/Mac OS(R) X
80
=== Installing FreeBSD on Parallels Desktop on Mac(R)
72
81
73
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:
82
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:
74
83
Lines 115-121 image::parallels-freebsd13.png[] Link Here
115
[[virtualization-guest-parallels-configure]]
124
[[virtualization-guest-parallels-configure]]
116
=== Configuring FreeBSD on Parallels
125
=== Configuring FreeBSD on Parallels
117
126
118
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.
127
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.
119
128
120
[.procedure]
129
[.procedure]
121
. Set Boot Loader Variables
130
. Set Boot Loader Variables
Lines 135-282 All of the SCSI, FireWire, and USB device drivers can be removed from a custom k Link Here
135
+ 
144
+ 
136
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].
145
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].
137
146
138
[[virtualization-guest-virtualpc]]
147
[[virtualization-guest-hyper-v]]
139
== FreeBSD as a Guest on Virtual PC for Windows(R)
148
== FreeBSD as a Guest on Hpyer-V for Windows(R)
140
149
[NOTE]
141
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.
150
====
142
151
this section is a work in progress...
143
[[virtualization-guest-virtualpc-install]]
152
====
144
=== Installing FreeBSD on Virtual PC
145
146
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:
147
148
image::virtualpc-freebsd1.png[]
149
150
image::virtualpc-freebsd2.png[]
151
152
Select [.guimenuitem]#Other# as the [.guimenuitem]#Operating system# when prompted:
153
154
image::virtualpc-freebsd3.png[]
155
156
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:
157
158
image::virtualpc-freebsd4.png[]
159
160
image::virtualpc-freebsd5.png[]
161
162
Save and finish the configuration:
163
164
image::virtualpc-freebsd6.png[]
165
166
Select the FreeBSD virtual machine and click menu:Settings[], then set the type of networking and a network interface:
167
168
image::virtualpc-freebsd7.png[]
169
170
image::virtualpc-freebsd8.png[]
171
172
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.
173
174
image::virtualpc-freebsd9.png[]
175
176
image::virtualpc-freebsd10.png[]
177
178
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.
179
180
image::virtualpc-freebsd11.png[]
181
153
182
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.
154
[[virtualization-guest-vmware-workstation]]
155
== FreeBSD as a Guest on VMware Workstation for Windows(R) and Linux
156
[NOTE]
157
====
158
this section is a work in progress...
159
====
183
160
184
image::virtualpc-freebsd12.png[]
161
[[virtualization-guest-vmware]]
162
== FreeBSD as a Guest on VMware Fusion for macOS(R)
185
163
186
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.
164
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.
187
165
188
image::virtualpc-freebsd13.png[]
166
[[virtualization-guest-vmware-install]]
167
=== Installing FreeBSD on VMware Fusion
189
168
190
[[virtualization-guest-virtualpc-configure]]
169
The first step is to start VMware Fusion which will load the Virtual Machine Library. Click [.guimenuitem]#+->New# to create the virtual machine:
191
=== Configuring FreeBSD on Virtual PC
192
170
193
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.
171
image::vmware-freebsd01.png[width=35%]
194
172
195
[.procedure]
173
This will load the New Virtual Machine Assistant. Choose [.guimenuitem]#Create a custom virtual machine# and click [.guimenuitem]#Continue# to proceed:
196
. Set Boot Loader Variables
197
+ 
198
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#:
199
+
200
[.programlisting]
201
....
202
kern.hz=100
203
....
204
+ 
205
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%.
206
. Create a New Kernel Configuration File
207
+ 
208
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.
209
. Configure Networking
210
+ 
211
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].
212
174
213
[[virtualization-guest-vmware]]
175
image::vmware-freebsd02.png[width=45%]
214
== FreeBSD as a Guest on VMware Fusion for Mac OS(R)
215
176
216
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.
177
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:
217
178
218
[[virtualization-guest-vmware-install]]
179
image::vmware-freebsd03.png[width=45%]
219
=== Installing FreeBSD on VMware Fusion
220
180
221
The first step is to start VMware Fusion which will load the Virtual Machine Library. Click [.guimenuitem]#New# to create the virtual machine:
181
Choose the firmware(UEFI is recommended)
222
182
223
image::vmware-freebsd01.png[]
183
image::vmware-freebsd04.png[width=45%]
224
184
225
This will load the New Virtual Machine Assistant. Click [.guimenuitem]#Continue# to proceed:
185
Choose [.guimenuitem]#Create a new virtual disk# and click [.guimenuitem]#Continue#
226
186
227
image::vmware-freebsd02.png[]
187
image::vmware-freebsd05.png[width=45%]
228
188
229
Select [.guimenuitem]#Other# as the [.guimenuitem]#Operating System# and either [.guimenuitem]#FreeBSD# or [.guimenuitem]#FreeBSD 64-bit#, as the menu:Version[] when prompted:
189
Check the configuration and click [.guimenuitem]#Finish#
230
190
231
image::vmware-freebsd03.png[]
191
image::vmware-freebsd06.png[width=45%]
232
192
233
Choose the name of the virtual machine and the directory where it should be saved:
193
Choose the name of the virtual machine and the directory where it should be saved:
234
194
235
image::vmware-freebsd04.png[]
195
image::vmware-freebsd07.png[width=45%]
236
196
237
Choose the size of the Virtual Hard Disk for the virtual machine:
197
Press command+E to open virtual machine settings and click [.guimenuitem]#CD/DVD#
238
198
239
image::vmware-freebsd05.png[]
199
image::vmware-freebsd08.png[width=45%]
240
200
241
Choose the method to install the virtual machine, either from an ISO image or from a CD/DVD:
201
Choose FreeBSD ISO image or from a CD/DVD:
242
202
243
image::vmware-freebsd06.png[]
203
image::vmware-freebsd09.png[width=45%]
244
204
245
Click [.guimenuitem]#Finish# and the virtual machine will boot:
205
Start the virtual machine:
246
206
247
image::vmware-freebsd07.png[]
207
image::vmware-freebsd10.png[width=25%]
248
208
249
Install FreeBSD as usual:
209
Install FreeBSD as usual:
250
210
251
image::vmware-freebsd08.png[]
211
image::vmware-freebsd11.png[width=25%]
252
212
253
Once the install is complete, the settings of the virtual machine can be modified, such as memory usage:
213
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:
254
214
255
[NOTE]
215
[NOTE]
256
====
216
====
257
The System Hardware settings of the virtual machine cannot be modified while the virtual machine is running.
217
The System Hardware settings of the virtual machine cannot be modified while the virtual machine is running.
258
====
218
====
259
219
260
image::vmware-freebsd09.png[]
220
image::vmware-freebsd12.png[width=45%]
261
262
The number of CPUs the virtual machine will have access to:
263
264
image::vmware-freebsd10.png[]
265
221
266
The status of the CD-ROM device. Normally the CD/DVD/ISO is disconnected from the virtual machine when it is no longer needed.
222
The status of the CD-ROM device. Normally the CD/DVD/ISO is disconnected from the virtual machine when it is no longer needed.
267
223
268
image::vmware-freebsd11.png[]
224
image::vmware-freebsd09.png[width=45%]
269
225
270
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.
226
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.
271
227
272
image::vmware-freebsd12.png[]
228
image::vmware-freebsd13.png[width=45%]
273
229
274
After modifying the settings, boot the newly installed FreeBSD virtual machine.
230
After modifying the settings, boot the newly installed FreeBSD virtual machine.
275
231
276
[[virtualization-guest-vmware-configure]]
232
[[virtualization-guest-vmware-configure]]
277
=== Configuring FreeBSD on VMware Fusion
233
=== Configuring FreeBSD on VMware Fusion
278
234
279
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.
235
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.
280
236
281
[.procedure]
237
[.procedure]
282
. Set Boot Loader Variables
238
. Set Boot Loader Variables
Lines 295-300 All of the FireWire, and USB device drivers can be removed from a custom kernel Link Here
295
. Configure Networking
251
. Configure Networking
296
+ 
252
+ 
297
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].
253
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].
254
. Install drivers and open-vm-tools
255
+
256
To run FreeBSD smoothly on VMWare, drivers should be installed:
257
+
258
[source,shell]
259
....
260
# pkg install xf86-video-vmware xf86-input-vmmouse open-vm-tools
261
....
298
262
299
[[virtualization-guest-virtualbox]]
263
[[virtualization-guest-virtualbox]]
300
== FreeBSD as a Guest on VirtualBox(TM)
264
== FreeBSD as a Guest on VirtualBox(TM)
Lines 413-419 Note that the shared folder name must not contain spaces. Mount the shared folde Link Here
413
[[virtualization-host-virtualbox]]
377
[[virtualization-host-virtualbox]]
414
== FreeBSD as a Host with VirtualBox(TM)
378
== FreeBSD as a Host with VirtualBox(TM)
415
379
416
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.
380
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.
417
381
418
[[virtualization-virtualbox-install]]
382
[[virtualization-virtualbox-install]]
419
=== Installing VirtualBox(TM)
383
=== Installing VirtualBox(TM)

Return to bug 249976