The main interface for command and control of both xVM control domains and guest domains is the virsh(1M) utility. Users should use virsh wherever possible to control virtualized operating systems. Some xVM operations are not yet implemented by the virsh utility. In those cases, the legacy utility xm(1M) can be used for detailed control.
The following actions can be performed:
Start Selected Guest
# virsh start sdomu |
Suspend Selected Guest
# virsh suspend sdomu |
You can also use the destroy subcommand to bring the system to the shutoff state, but this can result in damage to data.
Resume Selected Guest
# virsh resume sdomu |
Shutdown Selected Guest
# virsh shutdown sdomu |
Reboot Selected Guest
# virsh reboot sdomu |
Undefine Selected Guest
# virsh undefine sdomu |
Undefine the configuration for an inactive domain which is specified by either its domain name or UUID.
To delete a guest, undefine the guest and then remove any associated disk resources.
Connect Selected Guest to Network
# virsh attach-interface sdomu bridge e1000g0 |
Take Snapshot of Active Domain
# virsh save sdomu /domains/sdomusnap |
The domain will be in the shut down state when the save operation completes. The resources, such as memory, allocated for the domain will be freed for use by other running domains.
To restore:
# virsh restore sdomu /domains/sdomusnap |
Note that network connections present before the save operation might be severed, since TCP timeouts might have expired.
Pin vCPU
# virsh vcpupin domain vcpu cpulist |
Pin domain's virtual CPUs to the host's physical CPUs. The domain parameter is the domain name, ID, or UUID. The vcpu parameter is the VCPU number. The cpulist parameter is a list of host CPU numbers, separated by commas.
Restore Selected Guest
# virsh restore sdomu |
Restore a domain that is in the saved state.
Delete Selected Guest
Deleting the guest will cause its image and snapshot to be deleted from the system.
To view the state of a domain, use the virsh list command.
For example:
# virsh list ID Name State ------------------------- 0 Domain-0 running 2 sxc18 running |
By default, only running domains are displayed. Use virsh list --inactive to display only non-running domains.