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 @@ -4,7 +4,7 @@ prev: books/handbook/filesystems next: books/handbook/l10n description: Virtualization software allows multiple operating systems to run simultaneously on the same computer -tags: ["virtualization", "Parallels", "VMware", "VirtualBox", "bhyve", "XEN"] +tags: ["virtualization", "Parallels", "VMware", "VirtualBox", "QEMU", "bhyve", "XEN"] showBookMenu: true weight: 28 path: "/books/handbook/virtualization/" @@ -61,6 +61,7 @@ ** Parallels Desktop(Apple(R) macOS(R)) ** VMware Fusion(Apple(R) macOS(R)) ** VirtualBox(TM)(Microsoft(R) Windows(R), Intel(R)-based Apple(R) macOS(R), Linux) +** QEMU(FreeBSD) ** bhyve(FreeBSD) * How to tune a FreeBSD system for best performance under virtualization. @@ -511,7 +512,7 @@ * The second supported way to use QEMU is User Mode Emulation, where QEMU can launch processes compiled for one CPU on another CPU. In this mode the CPU is always emulated. -* QEMU also provides a number of standalone command line utilities, such as the man:qemu-img[1] disk image utility that allows you to create, convert, and modify disk images. +* QEMU also provides a number of standalone command line utilities, such as the man:qemu-img[1] disk image utility that allows one to create, convert, and modify disk images. QEMU can emulate a wide number of architectures including `Arm(TM)`, `i386`, `x86_64`, `MIPS(TM)`, `s390X`, `SPARC(TM)` (Sparc(TM) and Sparc64(TM)), and others. The list of link:https://www.qemu.org/docs/master/system/targets.html#system-targets-ref[QEMU System Emulator Targets] is regularly kept up to date. @@ -701,7 +702,7 @@ During the installation there are several points to note: * Select to use UFS as the filesystem. -zfs does not perform well with small memory sizes. +ZFS does not perform well with small memory sizes. * For networking use DHCP. If desired, configure IPv6 if supported by the local LAN. * When adding the default user, ensure they are a member of the *wheel* group. @@ -729,7 +730,7 @@ ==== Login as `root` again and add any packages desired. -To utilize the X Window system in the guest, see the section "Setting Up the X Window System" below. +To utilize the X Window system in the guest, see the section "Using the X Window System" below. This completes the setup of the "left" VM. @@ -759,24 +760,14 @@ [[qemu-usage-tips]] === Usage Tips [[qemu-setting-up-x-windows]] -==== Setting up the X Window System +==== Using the X Window System -To set up the `X Window` system, a window manager such as `XFCE`, and a browser such as `Firefox` or `Chromium`, log in as `root` and install the required packages. -They will bring in a lot of dependencies and it will take some time: +crossref:x11[x11,Installing Xorg] describes how to set up the `X Window` system. +Refer to that guide for initial `X Window` setup then consult crossref:desktop[desktop,Desktop Environments] on how to set up a complete desktop. -[source, shell] -.... -# pkg install sudo xorg xfce firefox chromium -# reboot -.... +This section demonstrates use of the XFCE desktop. -Once the installation is complete, login as a regular user. -In the user's home directory, create or edit the [.filename]#.xinitrc# file as follows: -[.programlisting] -.... -startxfce4 -.... -then type: +Once the installation is complete, login as a regular user, then type: [source,shell] .... @@ -784,7 +775,7 @@ .... The XFCE4 window manager should start up and present a functioning graphical desktop as in Figure xref:qemu-two-qemu[{counter:figure}]. -On initial startup, it may take up to a minute to display the XFCE desktop. +On initial startup, it may take up to a minute to display the desktop. See the documentation at the link:https://www.xfce.org[XFCE website] for usage details. [[qemu-two-qemu]] .Both QEMU VMs @@ -885,8 +876,8 @@ image::qemu-freebsd07.png[] In Figure xref:qemu-left-serial-port[{counter:figure}], the serial port is redirected to a TCP port on the host system at VM startup and the QEMU monitor waits (`wait=on`) to activate the guest VM until a man:telnet[1] connection occurs on the indicated localhost port. -After receiving a connection from a separate session, the FreeBSD system starts booting and recognizes the console directive in [.filename]#/boot/loader.conf#. -It then starts up a serial console. +After receiving a connection from a separate session, the FreeBSD system starts booting and looks for a console directive in [.filename]#/boot/loader.conf#. +With the directive "console=comconsole", FreeBSD starts up a console session on a serial port. The QEMU monitor detects this and directs the necessary character I/O on that serial port to the telnet session on the host. The system boots and once finished, login prompts are enabled on the serial port (`ttyu0`) and on the console (`ttyv0`). @@ -989,8 +980,7 @@ There is no graphical interface. * Networking is not set up through the man:tap[4] / man:if_bridge[4] combination. This example uses a separate method of QEMU networking known as "Serial Line Internet Protocol" (SLIRP), sometimes referred to as "User Mode Networking". -Documentation on this and other QEMU networking methods is here: -link:https://wiki.qemu.org/Documentation/Networking[QEMU Networking Documentation] +Documentation on this and other QEMU networking methods is here: link:https://wiki.qemu.org/Documentation/Networking[QEMU Networking Documentation] If everything is set correctly, the system will boot as shown in Figure xref:qemu-sparc64-boot-cdrom-installation[{counter:figure}]. [[qemu-sparc64-boot-cdrom-installation]] @@ -1025,7 +1015,8 @@ * Gather information about the state of the VM and devices * Change device settings on the fly -and many other operations. +As well as many other operations. + The most common uses of the monitor are to examine the state of the VM, and to add, delete, or change devices. Some operations such as migrations are only available under hypervisor accelerators such as KVM, Xen, etc. and are not supported on FreeBSD hosts. @@ -1393,7 +1384,7 @@ [[virtualization-bhyve-linux]] === Creating a Linux(R) Guest -Linux guests can be booted either like any other regular crossref:virtualization[virtualization-bhyve-uefi,"UEFI-based guest"] virtual machine, or alternatively, you can make use of the package:sysutils/grub2-bhyve[] port. +Linux guests can be booted either like any other regular crossref:virtualization[virtualization-bhyve-uefi,"UEFI-based guest"] virtual machine, or alternatively, you can make use of the package:sysutils/grub2-bhyve[] port. To do this, first ensure that the port is installed, then create a file to use as the virtual disk for the guest machine: @@ -2537,3 +2528,4 @@ Note that the name of the domain is appended to the log name, so if the domain is named `freebsd` you should find a [.filename]#/var/log/xen/xl-freebsd.log# and likely a [.filename]#/var/log/xen/qemu-dm-freebsd.log#. Both log files can contain useful information for debugging. If none of this helps solve the issue, please send the description of the issue you are facing and as much information as possible to mailto:freebsd-xen@FreeBSD.org[freebsd-xen@FreeBSD.org] and mailto:xen-devel@lists.xenproject.org[xen-devel@lists.xenproject.org] in order to get help. +