Hi, I need to add , via script , a channel device in .xml guest config file. Is virsh edit useable from a "standard" script or is there any more suitable way to use ? Thanks. J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Puteaux 3 Etage 5 Bureau 4 jpribeauville at axway.com<mailto:jpribeauville at axway.com> http://www.axway.com<http://www.axway.com/> P Pensez ? l'environnement avant d'imprimer. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20151102/70c79b56/attachment.htm>
On Mon, Nov 02, 2015 at 13:37:09 +0000, Jean-Pierre Ribeauville wrote:> Hi, > > I need to add , via script , a channel device in .xml guest config file. > > Is virsh edit useable from a "standard" script or is there any more suitable way to use ?Try virsh attach-device/detach-device Peter
On Mon, Nov 02, 2015 at 01:37:09PM +0000, Jean-Pierre Ribeauville wrote:> Hi, > > I need to add , via script , a channel device in .xml guest config file. > > Is virsh edit useable from a "standard" script or is there any more > suitable way to use ?As well as what Peter already suggested, note that 'virsh edit' is just a shortcut for virsh dumpxml $GUEST > $GUEST.xml emacs $GUEST.xml virsh define $GUEST.xml so from a script you'd really better just use dumpxml+define rather than edit, if you're looking to change XML Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|