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:
-
Set the default connection URI:
# export LIBVIRT_DEFAULT_URI="vz:///system" -
List all the instances:
# virsh list --allVirsh should show all instances, including virtual machines and containers.
-
Start the VM:
# virsh start myvm -
Start the container:
# virsh start myct -
Output container configuration:
# virsh dominfo myct -
Stop the VM:
# virsh destroy myvm -
Stop the container:
# virsh destroy myct -
To check that both
myvmandmyctare deleted, list the instances again:# virsh list --all
For the complete list of supported options, visit https://libvirt.org/hvsupport.html.