[libvirt] [PATCH] virsh edit command

Richard W.M. Jones rjones at redhat.com
Tue Jul 29 16:17:55 UTC 2008


On Tue, Jul 29, 2008 at 05:09:37PM +0100, John Levon wrote:
> Right. But to my mind you're fixing the symptom not the problem. *Why*
> do they need to edit the XML? I ask this of everybody who complains at
> me about having to edit XML: 99% of the time it's wanting to change boot
> flags, but it's also stuff like turning off ACPI, setting on_crash, etc.
> 
> Editing XML is absolutely not user friendly, and adding 'edit' just
> papers over the real problems IMHO.

I actually started at one point on a graphical libvirt XML editor,
although I fairly quickly realised it would be a Sisyphean task
because the format isn't tremendously well defined[1] and it keeps
changing.  Also because there's a lot of overlap between virt-install
and (potential) virt-config-editor.

I do genuinely think that having 'virsh edit' is better than the
current situation.  Currently the advice that everyone gives is to do:

  virsh dumpxml foo > foo.xml
  vi foo.xml
  virsh define foo.xml

which is of course precisely the same as what 'virsh edit' does :-)

Rich.

[1] Although it's a great deal better since Dan Berrange started
to formalize the way drivers generate and parse the XML.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v




More information about the libvir-list mailing list