3 ms·
I actually _do_ do this quite often. Often w.r.t local changes (attaching network devices or storage devices). If you fire up `virsh edit <resource>` you get a
by dijit 6y ago
I actually _do_ do this quite often.
Often w.r.t local changes (attaching network devices or storage devices).
If you fire up `virsh edit <resource>` you get a live view of the resource which can be updated in place. This is great to comment out some things and uncomment things for quick and dirty modifications. (some require a VM restart though).
- formerly_proven 6y agoThat has to be a recent change, because editing the XML used to cause it to roundtrip through libvirt, which doesn't keep the XML DOM around; anything not in the internal C structs would be removed from the files, including all comments.
- dijit 6y agoI’m not sure fully how it works internally I’m afraid. But I was doing this in 2013-2014 if that’s any indicator of timeframe.
- formerly_proven 6y agoWeird, I've done it quite recently on a Debian system and it reformatted & removed everything it doesn't know from the XML. If you Google this, it's a common issue and apparently the reason why the top-level "metadata" tag was added, because that metadata-tag is carried around as DOM, so doesn't get purged.