Installation guide

# virsh dumpxml rhel5FV > rhel5FV.xml
This saves the configuration settings as an XML file which can be edited to customize the
operations and devices used by the guest. For more information on using the virsh XML
configuration files, see Chapter 34, Creating custom libvirt scripts.
2. Create a floppy disk image for the guest.
# dd if=/dev/zero of=/var/lib/libvirt/images/rhel5FV-floppy.img bs=512
count=2880
3. Add the content below, changing where appropriate, to your guest's configuration XML file.
This example is an emulated floppy device using a file-based image.
<disk type='file' device='floppy'>
<source file='/var/lib/libvirt/images/rhel5FV-floppy.img'/>
<target dev='fda'/>
</disk>
4. Force the guest to stop. To shut down the guest gracefully, use the virsh shutdown
command instead.
# virsh destroy rhel5FV
5. Restart the guest using the XML configuration file.
# virsh create rhel5FV.xml
The floppy device is now available in the guest and stored as an image file on the host.
9.2. Adding st orage devices t o guest s
This section covers adding storage devices to virtual machines. Additional storage can only be
added after guests are created. The supported storage devices and protocol include:
local hard drive partitions,
logical volumes,
Fibre Channel or iSCSI directly connected to the host.
File containers residing in a file system on the host.
NFS file systems mounted directly by the virtual machine.
iSCSI storage directly accessed by the guest.
Cluster File Systems (G FS).
Ad d in g f ile- based st o rag e t o a gu est
File-based storage or file-based containers are files on the hosts file system which act as virtualized
hard drives for virtual machines. To add a file-based container perform the following steps:
1. Create an empty container file or using an existing file container (such as an ISO file).
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
130