Installation guide

Chapter 30. Managing guests with virsh
264
2 Domain010 inactive
3 Domain9600 crashed
The output from virsh list is categorized as one of the six states (listed below).
The running state refers to guests which are currently active on a CPU.
Guests listed as blocked are blocked, and are not running or runnable. This is caused by a guest
waiting on I/O (a traditional wait state) or guests in a sleep mode.
The paused state lists domains that are paused. This occurs if an administrator uses the pause
button in virt-manager, xm pause or virsh suspend. When a guest is paused it consumes
memory and other resources but it is ineligible for scheduling and CPU resources from the
hypervisor.
The shutdown state is for guests in the process of shutting down. The guest is sent a shutdown
signal and should be in the process of stopping its operations gracefully. This may not work with all
guest operating systems; some operating systems do not respond to these signals.
Domains in the dying state are in is in process of dying, which is a state where the domain has not
completely shut-down or crashed.
crashed guests have failed while running and are no longer running. This state can only occur if
the guest has been configured not to restart on crash.
Displaying virtual CPU information
To display virtual CPU information from a guest with virsh:
# virsh vcpuinfo {domain-id, domain-name or domain-uuid}
An example of virsh vcpuinfo output:
# virsh vcpuinfo r5b2-mySQL01
VCPU: 0
CPU: 0
State: blocked
CPU time: 0.0s
CPU Affinity: yy
Configuring virtual CPU affinity
To configure the affinity of virtual CPUs with physical CPUs:
# virsh vcpupin domain-id vcpu cpulist
The domain-id parameter is the guest's ID number or name.
The vcpu parameter denotes the number of virtualized CPUs allocated to the guest.The vcpu
parameter must be provided.
The cpulist parameter is a list of physical CPU identifier numbers separated by commas. The
cpulist parameter determines which physical CPUs the VCPUs can run on.
Configuring virtual CPU count
To modify the number of CPUs assigned to a guest with virsh: