Skip to main content
Engineering LibreTexts

10-E.10: Configuring Networks and Virtualization Tools

  • Page ID
    40960
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Networking Virtual Machines

    Networking in virtual machines uses the concept of a virtual network switch. A virtual network switch is constructed in software and runs on the host machine. The VMs connect to the network through the virtual switch. Depending on the configuration of the virtual switch, a VM can use an existing virtual network managed by the hypervisor, or can connect the host system's physical network interface.

    Configuration Description
    Not attached In this mode the hypervisor reports to the guest OS that a network card is present, but that there is no connection. This is as if no Ethernet cable was plugged into the card.
    Network Address Translation (NAT) If all that is needed is to browse the Web, download files, and view email inside the guest, then this default mode should be sufficient.
    Bridged networking This is for more advanced networking needs, such as network simulations and running servers in a guest. When enabled the hypervisor connects to one of the installed network cards and exchanges network packets directly.
    Internal networking This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.

    The virsh Shell

    The virsh program is command line interface for managing virtual guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains. Libvirt is a C toolkit that virsh is built on, and is used to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the GNU Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurrently on a single hardware system where the basic resources are driven by a Linux instance.

    Issuing the virsh command places the user in a shell with its own set of commands, some of which are shown below.

    Sub-Command Meaning
    help Prints basic help information.
    list Lists all guests.
    create Creates a guest from an XML configuration file and starts the new guest.
    start Starts an inactive guest.
    reboot Reboots a guest.
    restore Restores a previously saved guest stored in a file.
    resume Resumes a paused guest.
    save Saves the present state of a guest to a file.
    shutdown Gracefully shuts down a guest.
    suspend Pauses a guest.

    Libvirt

    Libvirt is a collection of software that provides a convenient way to manage virtual machines and other virtualization functionality, such as storage and network interface management. These software pieces include an API library, a daemon (libvirtd), and a command line utility (virsh).

    An primary goal of libvirt is to provide a single way to manage multiple different virtualization providers/hypervisors. For example, the command 'virsh list --all' can be used to list the existing virtual machines for any supported hypervisor (KVM, Xen, VMWare ESX, etc.) No need to learn the hypervisor specific tools!

    Virtual Machine Managers

    Virtual Machine Manager (VMM) is a software program to create Guest virtual machines on the host machine. It’s also known as Hypervisor or Virtual Machine Monitor (VMM). So, basically, the Virtual Machine Manager provides a Graphical user interface. That allows the users to create, delete, manage, allocate different hardware resources from the host machine to guest operating systems also known as virtual OS.

    Virtual Machine Manager (VMM) helps the administrators to provide a unified management interface. And free them from using long commands to create or manage Virtual machines on the server. You will need to do some searching to find which VMMs have the capability to run on your Linux distribution


    10-E.10: Configuring Networks and Virtualization Tools is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?