libvirt
.
libvirt
.
virsh
can handle XML configuration files. You may want to use this to your advantage for scripting large deployments with special options. You can add devices defined in an XML file to a running virtualized guest. For example, to add a ISO file as hdc
to a running guest create an XML file:
# cat satelliteiso.xml <disk type="file" device="disk"> <driver name="file"/> <source file="/var/lib/libvirt/images/rhn-satellite-5.0.1-11-redhat-linux-as-i386-4-embedded-oracle.iso"/> <target dev="hdc"/> <readonly/> </disk>
virsh attach-device
to attach the ISO as hdc
to a guest called "satellite" :
# virsh attach-device satellite satelliteiso.xml