\begin{exe} {Making Sure \textbf{KVM} is Properly Set up}

   \input{virtlabsintro}

   \begin{enumerate}

      \item
      First check that you have hardware virtualization
      available and enabled:
      \begin{cmd}
$ grep -e vmx -e svm /proc/cpuinfo
      \end{cmd}
      where \verb?vmx? is for \textbf{INTEL} CPUs and
      \verb?svm? for \textbf{AMD}.  If you do not see either
      one of these:
      \begin{itemize}
         \item
         If you are on a physical machine, maybe you can fix
         this.  Reboot your machine and see if you can turn
         on virtualization in the BIOS settings.  Note that
         some IT personnel may make this impossible for
         ``security'' reasons, so try to get that policy
         changed.
         \item
         You are on a virtual machine running under a
         hypervisor, and you do not have nested
         virtualization operable.
      \end{itemize}

      \item
      If for either of these reasons, you do not have
      hardware virtualization, you \textbf{may} be able to
      run \textbf{virt-manager}, but with weak performance.

      \item

      You need all relevant packages installed on your
      system.  One can work hard to construct an exact list.
      However, exact names and requirements change with
      time, and most enterprise distributions ship with all
      (or almost all) of the software you need.

      \item
      The easiest and best procedure is to run the script we
      have already supplied to you:
      \begin{alltt}
$ ./ready-for.sh --install \course      \end{alltt}
      where we have done the hard work.

      Alternatively, on \textbf{RPM} systems you can do some overkill with:

      \begin{cmd}
$ sudo dnf|zypper install kvm* qemu* libvirt*
      \end{cmd}

      It is not a large amount of storage space to do it
      this way.

      On \textbf{Debian} package based systems including
      \textbf{Ubuntu} you will have to do the equivalent
      with your favorite package installing procedure.
   \end{enumerate}

   \begin{important}
      \begin{itemize}
         \item
         Do not run \textbf{libvirtd} at the same time as
         another hypervisor as dire consequences are likely
         to arise.  This can easily include crashing your
         system and doing damage to any virtual machines
         being used.
         \item
         We recommend both \textbf{stopping} and
         \textbf{disabling} your other hypervisor as in:
         \begin{cmd}
$ sudo systemctl stop vmware
$ sudo systemctl disable vmware
            \end{cmd}
         or
         \begin{cmd}
$ sudo systemctl stop vboxdrv
$ sudo systemctl disable vboxdrv
            \end{cmd}
      \end{itemize}
   \end{important}

\end{exe}

