Chapter 34. Creating custom libvirt scripts
This section provides some information which may be useful to programmers and system administrators intending to write custom scripts to make their lives easier by using
libvirt
.
Chapter 33, Tips and tricks is recommended reading for programmers thinking of writing new applications which use
libvirt
.
34.1. Using XML configuration files with virsh 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
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 para-virtualized guest. For example, to add a ISO file as hdc
to a running guest create an XML file:
virsh attach-device
to attach the ISO as hdc
to a guest called "satellite" :
virsh attach-device satellite satelliteiso.xml
# virsh attach-device satellite satelliteiso.xml