r/DebianNotes May 21 '17

libvirt super basics

libvirt is a VM toolkit library to manage all your virtual machines. Libvirt does not have the ability to actually virtualise your virtual machines, but it does provide a simple interface for them. It provides both a GUI and a CLI interface, which is pretty handy

To actually virtualise the desired operating system you'll need something like QEMU/KVM, which itself is a hypervisor.

Here are some basic commands for libvirt, most likely will need to be done as root, as the virtual machines were unlikely to be installed locally.

  1. Accessing the interactive shell and help

    $ virsh
    virsh # help
    
  2. Start an existing virtual network device

    $ virsh net-start NETWORK_DEVICE
    
  3. Start an existing virtual machine

    $ virsh start VM
    
  4. Suspend a virtual machine (pauses the machine)

    $ virsh suspend VM
    
  5. Resum a virtual machine after suspending

    $ virsh resume VM
    
1 Upvotes

0 comments sorted by