[libvirt-users] virsh edit from script ??

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@axway.com<mailto:jpribeauville@axway.com> http://www.axway.com<http://www.axway.com/> P Pensez à l'environnement avant d'imprimer.

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 :|
participants (3)
-
Daniel P. Berrange
-
Jean-Pierre Ribeauville
-
Peter Krempa