On 19. Juni 2014 14:38:06 MESZ, Laine Stump <laine@laine.org> wrote:
On 06/19/2014 02:47 PM, Thomas Stein wrote:
Hello.

I have a strange error with one of my VMs. If i use dumpxml to save a VM
description the source part of the network part is missing. This prevents
redifining the machine from the dumped xml file:

This is how it looks before dumpxml:

<interface type='bridge'>
<mac address='52:54:00:34:a1:56'/>
<source bridge='br406'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>


And afterwards:

<interface type='bridge'>
<mac address='52:54:00:34:a1:56'/>
<target dev='vnet6'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>

Someone has an idea whats causing this? Is there a special option maybe?


1) what is the libvirt version?

2) are you using "virsh dumpxml --inactive"?

The source should anyway be there when you do virsh dumpxml with or
without --inactive, but the proper way to get the config of a domain
that can be fed back into the domain is by using --inactive (otherwise
you get the current status of the interface, which may have some
differences).

(I'm interested to learn the libvirt version because when I look at the
virsh dumpxml of an <interface type='bridge'> on my system running
current upstream libvirt, I *do* see the <source> element. Given the
version you're running, I can possibly t! ake a look at that vintage of
source to see if there was a bug in that version)


Hi.

Thanks for the response. --inactive solves the problem. Didn't even know this switch exits. I'm using 1.2.5 at the moment.

thanks again
t.