Re: [libvirt] Can comments be added to libvirt xml files?
On 08/15/2014 12:36 AM, ban...@openmailbox.org wrote: > Hi. Is it possible to preserve comments in libvirt's XML files > without it failing validate-xml checks? > Any comments you add to the XML will be lost when libvirt parses and formats it again, only the elements libvirt knows will be preserved. For domains, we have a few elements where you can store your own data: http://libvirt.org/formatdomain.html#elementsMetadata For secrets and snapshots, only 'description' is available. Jan signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] Can comments be added to libvirt xml files?
Hi. Is it possible to preserve comments in libvirt's XML files without it failing validate-xml checks? -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] XML files
Thanks Richard, It was the libvirt version. Upgraded the package using squeeze-backports in debian and it worked without any changes. Cheers, Derek On 25/08/2011, at 1:41 AM, Richard W.M. Jones wrote: > On Wed, Aug 24, 2011 at 04:02:45PM +1200, Derek wrote: >> Unfortunately the changes I make for smbios and sysinfo (as below) >> while editing don't appear to be accepted when saving with 'virsh >> edit'. After saving I receive "Domain HMC XML configuration >> edited." but the XML file remains unmodified. I wonder if they are >> perhaps not supported with virsh edit yet? > > This is just a general problem with virsh edit: it doesn't validate > the XML, and it doesn't offer to re-edit invalid changes. Thus > whenever you make a mistake in the XML it gets dropped. > > For more info and a proposed fix see this thread: > > https://www.redhat.com/archives/libvir-list/2011-August/thread.html#00660 > > To workaround this, do it the old way: > > virsh dumpxml HMC > hmc.xml > edit hmc.xml > virsh define hmc.xml > iterate edit/virsh define steps until you get it right > > Which version of libvirt? According to the documentation > was added in 0.8.7. > > The fragment below looks reasonable, but there could be an XML error > in the context of the whole XML document. > >> >> >> xxx xxx >> xxx >> >> >> xxx >> xxx >> xxx xxx >> >> >> >>hvm >> >> >> > > Rich. > > -- > Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones > virt-top is 'top' for virtual machines. Tiny program with many > powerful monitoring features, net stats, disk stats, logging, etc. > http://et.redhat.com/~rjones/virt-top -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] XML files
On Wed, Aug 24, 2011 at 04:02:45PM +1200, Derek wrote: > Unfortunately the changes I make for smbios and sysinfo (as below) > while editing don't appear to be accepted when saving with 'virsh > edit'. After saving I receive "Domain HMC XML configuration > edited." but the XML file remains unmodified. I wonder if they are > perhaps not supported with virsh edit yet? This is just a general problem with virsh edit: it doesn't validate the XML, and it doesn't offer to re-edit invalid changes. Thus whenever you make a mistake in the XML it gets dropped. For more info and a proposed fix see this thread: https://www.redhat.com/archives/libvir-list/2011-August/thread.html#00660 To workaround this, do it the old way: virsh dumpxml HMC > hmc.xml edit hmc.xml virsh define hmc.xml iterate edit/virsh define steps until you get it right Which version of libvirt? According to the documentation was added in 0.8.7. The fragment below looks reasonable, but there could be an XML error in the context of the whole XML document. > > > xxx xxx > xxx > > > xxx > xxx > xxx xxx > > > > hvm > > > Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://et.redhat.com/~rjones/virt-top -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] XML files
Hi Folks, I'm running KVM on Debian squeeze. I have some requirements on a new VM to provide customised BIOS vendor/product strings, from my experience so far this is accomplish with the sysinfo/smbios support. So I have added these to the XML file for my VM. I found 'virsh edit' is the recommended way to make changes to a VM configuration, I find the XML file is not referenced at boot, it is only saved to with 'virsh dumpxml'. 'virsh edit' will update both areas - hypervisor and XML file. Unfortunately the changes I make for smbios and sysinfo (as below) while editing don't appear to be accepted when saving with 'virsh edit'. After saving I receive "Domain HMC XML configuration edited." but the XML file remains unmodified. I wonder if they are perhaps not supported with virsh edit yet? xxx xxx xxx xxx xxx xxx xxx hvm Thanks in advance, Derek -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list