In this recipe, we used the virsh command with various subcommands in one liners. This is particularly useful if we need to run the commands from a script. The virsh command also provides an interactive terminal, which saves some typing, and provides contextual help. To start the virtualization-interactive terminal, run the following code:
root@kvm:~# virshWelcome to virsh, the virtualization interactive terminal.Type: 'help' for help with commands 'quit' to quitvirsh #
Typing help will list all available subcommands with a short description. To obtain more information for a particular subcommand type:
virsh # help vcpucount NAME vcpucount - domain vcpu counts SYNOPSIS vcpucount <domain> [--maximum] [--active] [--live] ...