From 533b421eb29cbd4ab4b3236ba3f7a81ca17b0bc1 Mon Sep 17 00:00:00 2001 From: Jan Kuparinen Date: Sat, 28 Nov 2020 21:07:22 +0200 Subject: [PATCH] Technical review on getting started with virtualization completed. --- .../proc_creating-virtual-machines.adoc | 14 +++---- ...oc_installing-virtualization-software.adoc | 39 ++++++++----------- .../ref_managing-virtual-machines.adoc | 12 +++--- .../ref_other-virtualization-options.adoc | 2 +- .../getting-started-with-virtualization.adoc | 2 - 5 files changed, 31 insertions(+), 38 deletions(-) diff --git a/modules/ROOT/pages/_partials/proc_creating-virtual-machines.adoc b/modules/ROOT/pages/_partials/proc_creating-virtual-machines.adoc index a4c0bdf..8bfe32e 100644 --- a/modules/ROOT/pages/_partials/proc_creating-virtual-machines.adoc +++ b/modules/ROOT/pages/_partials/proc_creating-virtual-machines.adoc @@ -53,14 +53,14 @@ To create a fully allocated (non-sparse) raw file: [source,shell,subs="attributes"] ---- -dd if=/dev/zero of=/var/lib/libvirt/images/guest.img bs=1M count=20480 +# sudo dd if=/dev/zero of=/var/lib/libvirt/images/guest.img bs=1M count=20480 ---- you can also use fallocate(1): [source,shell,subs="attributes"] ---- -fallocate -l 20480M /var/lib/libvirt/images/guest.img +# sudo fallocate -l 20480M /var/lib/libvirt/images/guest.img ---- ===== Raw File (Sparse) @@ -69,8 +69,8 @@ To create a dynamically allocated (sparse) raw file: [source,shell,subs="attributes"] ---- -rm -f /var/lib/libvirt/images/guest.img -truncate --size=20480M /var/lib/libvirt/images/guest.img +# sudo rm -f /var/lib/libvirt/images/guest.img +# sudo truncate --size=20480M /var/lib/libvirt/images/guest.img ---- @@ -79,7 +79,7 @@ To create a new qcow2-formatted disk separately, you can use qemu-img (the examp [source,shell,subs="attributes"] ---- -# qemu-img create -f qcow2 /var/lib/libvirt/images/guest.qcow2 20480 +# sudo qemu-img create -f qcow2 /var/lib/libvirt/images/guest.qcow2 20480 ---- More information about libvirt storage options can be found at https://libvirt.org/storage.html. @@ -88,7 +88,7 @@ Finally, run the virt-install command using the following format (adjusting para [source,shell,subs="attributes"] ---- -# virt-install --name Fedora{MAJOROSVER} \ +# sudo virt-install --name Fedora{MAJOROSVER} \ --description 'Fedora {MAJOROSVER} Workstation' \ --ram 4096 \ --vcpus 2 \ @@ -117,7 +117,7 @@ If graphics were enabled, a VNC window will open and present the graphical insta + [source,shell,subs="attributes"] ---- -# virt-manager +# sudo virt-manager ---- + . Open a connection to a hypervisor by navigating to menu:File[Add connection]. diff --git a/modules/ROOT/pages/_partials/proc_installing-virtualization-software.adoc b/modules/ROOT/pages/_partials/proc_installing-virtualization-software.adoc index 4d7b361..882a219 100644 --- a/modules/ROOT/pages/_partials/proc_installing-virtualization-software.adoc +++ b/modules/ROOT/pages/_partials/proc_installing-virtualization-software.adoc @@ -13,23 +13,18 @@ For existing Fedora installations, you can install the virtualization tools via $ dnf groupinfo virtualization Group: Virtualization -Group-Id: virtualization -Description: These packages provide a virtualization environment. - -Mandatory Packages: - =virt-install - -Default Packages: - =libvirt-daemon-config-network - =libvirt-daemon-kvm - =qemu-kvm - =virt-manager - =virt-viewer - -Optional Packages: - guestfs-browser + Description: These packages provide a graphical virtualization environment. + Mandatory Packages: + virt-install + Default Packages: + libvirt-daemon-config-network + libvirt-daemon-kvm + qemu-kvm + virt-manager + virt-viewer + Optional Packages: libguestfs-tools - python-libguestfs + python3-libguestfs virt-top ---- @@ -37,28 +32,28 @@ Optional Packages: + [source,shell,subs="attributes"] ---- -# dnf install @virtualization +# sudo dnf install @virtualization ---- + Alternatively, to install the mandatory, default, and optional packages, run: + [source,shell,subs="attributes"] ---- -# dnf group install --with-optional virtualization +# sudo dnf group install --with-optional virtualization ---- + . After the packages install, start the `libvirtd` service: + [source,shell,subs="attributes"] ---- -# systemctl start libvirtd +# sudo systemctl start libvirtd ---- + To start the service on boot, run: + [source,shell,subs="attributes"] ---- -# systemctl enable libvirtd +# sudo systemctl enable libvirtd ---- + . To verify that the KVM kernel modules are properly loaded: @@ -66,8 +61,8 @@ To start the service on boot, run: [source,shell,subs="attributes"] ---- $ lsmod | grep kvm -kvm_amd 55563 0 -kvm 419458 1 kvm_amd +kvm_amd 114688 0 +kvm 831488 1 kvm_amd ---- + If this command lists `kvm_intel` or `kvm_amd`, KVM is properly configured. diff --git a/modules/ROOT/pages/_partials/ref_managing-virtual-machines.adoc b/modules/ROOT/pages/_partials/ref_managing-virtual-machines.adoc index c7b01b7..ddd2e8b 100644 --- a/modules/ROOT/pages/_partials/ref_managing-virtual-machines.adoc +++ b/modules/ROOT/pages/_partials/ref_managing-virtual-machines.adoc @@ -13,15 +13,15 @@ When the installation of the guest operating system is complete, it can be manag # virt-manager ---- + -If you are not root, you will be prompted to enter the root password. Choose *Run unprivileged* to operate in read-only non-root mode. +If you are not root, you will be prompted to enter the root password. . Choose the host you wish to manage and click *Connect* in the *Open Connection* dialog window. . The list of virtual machines is displayed in the main window. Guests that are running will display a ">" icon. Guests that are not running will be greyed out. . To manage a particular guest, double click on it, or right click and select *Open*. . A new window for the guest will open that will allow you to use its console, see information about its virtual hardware and start, stop, and pause it. -For further information about `virt-manager`, see http://virt-manager.et.redhat.com/. +For further information about `virt-manager`, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-creating_guests_with_virt_manager[RedHat virt-manager guide]. -Bugs in the `virt-manager` tool should be reported in http://bugzilla.redhat.com[Bugzilla] against the `virt-manager` +Bugs in the `virt-manager` tool should be reported in https://bugzilla.redhat.com[Bugzilla] against the `virt-manager` component. @@ -90,7 +90,7 @@ For a complete list of commands available for use with `virsh`: Or consult the manual page: `man virsh`. -Bugs in the `virsh` tool should be reported in http://bugzilla.redhat.com[Bugzilla] against the *libvirt* component. +Bugs in the `virsh` tool should be reported in https://bugzilla.redhat.com[Bugzilla] against the *libvirt* component. [[remote-management]] @@ -98,6 +98,6 @@ Bugs in the `virsh` tool should be reported in http://bugzilla.redhat.com[Bugzil The following remote management options are available: -* If using non-root users via SSH, see the setup instructions in http://wiki.libvirt.org/page/SSHSetup +* If using non-root users via SSH, see the setup instructions in https://wiki.libvirt.org/page/SSHSetup * If using root for access via SSH, then create SSH keys for root, and use `ssh-agent` and `ssh-add` before launching `virt-manager`. -* To use TLS, set up a local certificate authority and issue x509 certs to all servers and clients. For information on configuring this option, see http://wiki.libvirt.org/page/TLSSetup. +* To use TLS, set up a local certificate authority and issue x509 certs to all servers and clients. For information on configuring this option, see https://wiki.libvirt.org/page/TLSSetup. diff --git a/modules/ROOT/pages/_partials/ref_other-virtualization-options.adoc b/modules/ROOT/pages/_partials/ref_other-virtualization-options.adoc index 50e7a48..bc8da5c 100644 --- a/modules/ROOT/pages/_partials/ref_other-virtualization-options.adoc +++ b/modules/ROOT/pages/_partials/ref_other-virtualization-options.adoc @@ -9,7 +9,7 @@ QEMU/KVM can be invoked directly without libvirt, however you cannot to use tool [[xen]] == Xen -Fedora can run as a Xen guest operating system and also be used as a Xen host (with the latter being true from Fedora 16; for using an earlier version of Fedora as a Xen host, check out the experimental repo available at http://myoung.fedorapeople.org/dom0). For a guide on how to install and setup a Fedora Xen host, see http://wiki.xen.org/wiki/Fedora_Host_Installation[Fedora Host Installation] page on the Xen Project wiki. +Fedora can run as a Xen guest operating system and also be used as a Xen host (with the latter being true from Fedora 16; for using an earlier version of Fedora as a Xen host, check out the experimental repo available at https://myoung.fedorapeople.org/dom0). For a guide on how to install and setup a Fedora Xen host, see https://wiki.xen.org/wiki/Fedora_Host_Installation[Fedora Host Installation] page on the Xen Project wiki. [[openstack]] == OpenStack diff --git a/modules/ROOT/pages/getting-started-with-virtualization.adoc b/modules/ROOT/pages/getting-started-with-virtualization.adoc index 84fce8b..29f3816 100644 --- a/modules/ROOT/pages/getting-started-with-virtualization.adoc +++ b/modules/ROOT/pages/getting-started-with-virtualization.adoc @@ -3,8 +3,6 @@ ifdef::context[:parent-context: {context}] [id='getting-started-with-virtualization'] = Getting started with virtualization -include::{partialsdir}/unreviewed-message.adoc[] - Fedora uses the libvirt family of tools as its virtualization solution. include::{partialsdir}/proc_enabling-hardware-virtualization-support.adoc[leveloffset=+1]