virt-install does not appear to support multiple CD ROMs natively. Fortunately, there is a fairly direct way to get it to do so:
Use virt-install to create the virtual machine with the first CD-ROM, in your case named
xpsp1
. Behind the scenes, libvirt will create an XML configuration file. Turn off the machine now (virsh destroy xpsp1
); you were only interested in the XML file.Open the XML file, which is located in
/etc/libvirt/qemu/
(e.g./etc/libvirt/qemu/xpsp1.xml
). Probably.Search for the string
cdrom
. This should lead you to a chunk with these values:<disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/path/to/vm/winxp_sp1.iso'/> <target dev='hdc' bus='ide'/> <readonly/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk>
Copy paste this block and change the settings for your second CD-ROM. Namely, you will need to change
<source file=...>
(path of your other file),<target dev=...>
(to, e.g.,hdd
) and<address unit=...
(to, e.g., 1)Restart the machine (
virsh create /etc/libvirt/qemu/xpsp1.xml
) and the two CDs should be recognized.