\section{KVM}

\begin{frame}
   {KVM and \textbf{Linux} }

   \begin{itemize}
      \item
      \textbf{K}ernel-based \textbf{V}irtual \textbf{M}achine
      \item
      Requires hardware virtualization extensions
      \item
      Uses kernel for resources in a co-processing
      relationship
      \item
      Kernel emulates guest instructions
      \item
      Avi Kivity submitted, quickly merged in 2007
      \item
      Has paravirtualization extensions and support
   \end{itemize}

\end{frame}

\cprotect\note{

   \textbf{KVM} uses the \textbf{Linux} kernel for computing
   resources including memory management, scheduling,
   synchronization, and more. When running a virtual machine,
   \textbf{KVM} engages in a co-processing relationship with
   the \textbf{Linux} kernel.

   In this format, \textbf{KVM} runs the virtual machine
   monitor within one or more of the CPUs, using \texttt{VMX}
   or \texttt{SVM} instructions. At the same time the
   \textbf{Linux} kernel is executing on the other CPUs.

   The virtual machine monitor runs the guest, which is
   running at full hardware speed, until it executes an
   instruction that causes the virtual machine monitor to
   take over.

   At this point the virtual machine monitor can use any
   \textbf{Linux} resource to emulate a guest instruction,
   restart the guest at the last instruction, or do something
   else.

   By loading the \textbf{KVM} modules and starting a guest,
   you turn \textbf{Linux} into a hypervisor. The
   \textbf{Linux} personality is still there, but you also
   have the hardware virtual machine monitor. You can control
   the Virtual Machine using standard \textbf{Linux} resource
   and process control tools, such as \textbf{cgroups},
   \textbf{nice}, \textbf{numactl}, and so on.

   \textbf{KVM} first appeared (pre-merge) as part of a
   Windows Virtual Desktop product. At the time of its
   upstream merge in 2007, \textbf{KVM} required recent
   \textbf{x86\_64} processors. On \textbf{x86\_64}
   platforms, \textbf{KVM} is primarily (but not always) a
   driver for the processor's virtualization subsystem.

   \textbf{KVM} appeared as a trio of \textbf{Linux} kernel
   modules in 2007. When paired with a modified version of
   \textbf{\textbf{QEMU}} (also provided at the same time) it
   created a hypervisor that used the \textbf{Linux} kernel
   for most of its run-time services.

   Shortly after Avi Kivity, the author of \textbf{KVM},
   submitted the source code to the \textbf{Linux}
   development community, Linus merged \textbf{KVM} into his
   \textbf{Linux} tree. This was surprising to a lot of
   folks.

}

\begin{frame}
   {Managing KVM}

   \begin{itemize}

      \item
      Both Command Line and Graphical Interfaces
      \item
      Command line tools include:
      \begin{itemize}
         \item \textbf{virt-*}
         \item \textbf{qemu-*}
      \end{itemize}
      \item Graphical interfaces include:
      \begin{itemize}
         \item \textbf{virt-manager}
         \item \textbf{kimchi}
         \item \textbf{OpenStack}
         \item \textbf{oVirt}
      \end{itemize}
      \item
      We will concentrate on \textbf{virt-manager}:
      \begin{itemize}
         \item
         Most stable GUI across distributions and versions
      \end{itemize}

   \end{itemize}

\end{frame}

\cprotect\note{

   There are many low level commands for creating, converting,
   manipulating, deploying and maintaining virtual machine
   images.

   As you develop more expertise you will become practiced in using them.
   But for all basic operations, \textbf{virt-manager} will suffice and
   that is what we will use.

   %%   \begin{figure}[H]
   %%      \includegraphics[width=7in]{IMAGES/lsvirtqemu}
   %%      \caption{libvirt-based Utilities}
   %%   \end{figure}


}





