Installation guide

265
# virsh setvcpus {domain-name, domain-id or domain-uuid} count
The new count value cannot exceed the count above the amount specified when the guest was
created.
Configuring memory allocation
To modify a guest's memory allocation with virsh :
# virsh setmem {domain-id or domain-name} count
You must specify the count in kilobytes. The new count value cannot exceed the amount you specified
when you created the guest. Values lower than 64 MB are unlikely to work with most guest operating
systems. A higher maximum memory value does not affect an active guests. If the new value is lower
the available memory will shrink and the guest may crash.
Displaying guest block device information
Use virsh domblkstat to display block device statistics for a running guest.
# virsh domblkstat GuestName block-device
Displaying guest network device information
Use virsh domifstat to display network interface statistics for a running guest.
# virsh domifstat GuestName interface-device
Migrating guests with virsh
A guest can be migrated to another host with virsh. Migrate domain to another host. Add --live for
live migration. The migrate command accepts parameters in the following format:
# virsh migrate --live GuestName DestinationURL
The --live parameter is optional. Add the --live parameter for live migrations.
The GuestName parameter represents the name of the guest which you want to migrate.
The DestinationURL parameter is the URL or hostname of the destination system. The destination
system requires:
Red Hat Enterprise Linux 5.4 (ASYNC update 4) or newer,
the same hypervisor version, and
the libvirt service must be started.
Once the command is entered you will be prompted for the root password of the destination system.
Managing virtual networks
This section covers managing virtual networks with the virsh command. To list virtual networks: