Installation guide
This file guest.xml can recreate the guest (see Editing a guest's configuration file. You can edit this
XML configuration file to configure additional devices or to deploy additional guests. See
Section 34.1, “ Using XML configuration files with virsh” for more information on modifying files
created with virsh dumpxml.
An example of virsh dumpxml output:
# virsh dumpxml r5b2-mySQL01
<domain type='xen' id='13'>
<name>r5b2-mySQL01</name>
<uuid>4a4c59a7ee3fc78196e4288f2862f011</uuid>
<bootloader>/usr/bin/pygrub</bootloader>
<os>
<type>linux</type>
<kernel>/var/lib/libvirt/vmlinuz.2dgnU_</kernel>
<initrd>/var/lib/libvirt/initrd.UQafMw</initrd>
<cmdline>ro root=/dev/VolGroup00/LogVol00 rhgb quiet</cmdline>
</os>
<memory>512000</memory>
<vcpu>1</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:49:1d:11'/>
<script path='vif-bridge'/>
</interface>
<graphics type='vnc' port='5900'/>
<console tty='/dev/pts/4'/>
</devices>
</domain>
Creat in g a gu est f ro m a co n f ig u rat io n f ile
Guests can be created from XML configuration files. You can copy existing XML from previously
created guests or use the dumpxml option (see Creating a virtual machine XML dump (configuration
file)). To create a guest with virsh from an XML file:
# virsh create configuration_file.xml
Ed it ing a gu est ' s co nf ig u rat io n f ile
Instead of using the dumpxml option (see Creating a virtual machine XML dump (configuration file)),
guests can be edited either while they run or while they are offline. The virsh edit command
provides this functionality. For example, to edit the guest named softwaretesting:
# virsh edit softwaretesting
This opens a text editor. The default text editor is the $EDITOR shell parameter (set to vi by default).
Su spen d in g a gu est
Suspend a guest with virsh:
# virsh suspend {domain-id, domain-name or domain-uuid}
When a guest is in a suspended state, it consumes system RAM but not processor resources. Disk
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
260