4.8. Managing Virtuozzo 7 Virtual Machines with virsh

Virsh is a default utility for managing KVM-based virtual machines. As both containers and virtual machines in Virtuozzo 7 are managed via the libvirt API, virsh works too.

Here is how you use virsh to perform basic tasks with Virtuozzo 7 virtual machines:

  1. Set the default connection URI:

    # export LIBVIRT_DEFAULT_URI="vz:///system"
  2. List all the instances:

    # virsh list --all

    Virsh should show all instances, including virtual machines and containers.

  3. Start the VM:

    # virsh start myvm
  4. Start the container:

    # virsh start myct
  5. Output container configuration:

    # virsh dominfo myct
  6. Stop the VM:

    # virsh destroy myvm
  7. Stop the container:

    # virsh destroy myct
  8. To check that both myvm and myct are deleted, list the instances again:

    # virsh list --all

For the complete list of supported options, visit https://libvirt.org/hvsupport.html.