Chapter 9. Virtualized storage devices
/dev/xvd[a to z][1 to 15]Example:
/dev/xvd[a to i][a to z][1 to 15]Example:
/dev/sd[a to p][1 to 15]Example:
/dev/hd[a to t][1 to 63]Example:
9.1. Creating a virtualized floppy disk controller
/dev/fd0with the name of a floppy device and name the disk image appropriately.
# dd if=/dev/fd0 of=/tmp/legacydrivers.img
virt-managerrunning a fully virtualized Red Hat Enterprise Linux installation with an image located in
/var/lib/libvirt/images/rhel5FV.img. The Xen hypervisor is used in the example.
- Create the XML configuration file for your guest image using the
virshcommand on a running guest.
# virsh dumpxml rhel5FV > rhel5FV.xmlThis 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.
- Create a floppy disk image for the guest.
# dd if=/dev/zero of=/var/lib/libvirt/images/rhel5FV-floppy.img bs=512 count=2880
- 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>
- Force the guest to stop. To shut down the guest gracefully, use the
virsh shutdowncommand instead.
# virsh destroy rhel5FV
- Restart the guest using the XML configuration file.
# virsh create rhel5FV.xml