Re: [libvirt-users] Problem attaching device

Thanks, but problem still persists. I actually fat fingered entering it the first time The xmlfile really is: <?xml version="1.0"?> <interface type="network"> <mac address="52:54:00:5c:fe:a8"/> <source network="default"/> <target dev="vnet1"/> </interface> I ran xmllint and it just says no DTD specified, however this works perfectly if i use the attach-device command in virsh. I tired it both with and without the first line version=1.0 I try running it through python and boom, is there something else I'm missing? I can't find any documentation about the overall libvirt xml schema. Thanks again, Steve --- On Thu, 3/25/10, Daniel Veillard <veillard@redhat.com> wrote:
From: Daniel Veillard <veillard@redhat.com> Subject: Re: [libvirt-users] Problem attaching device To: steven765@yahoo.com Cc: "Matthias Bolte" <matthias.bolte@googlemail.com>, libvirt-users@redhat.com Date: Thursday, March 25, 2010, 9:18 AM On Wed, Mar 24, 2010 at 11:18:10PM +0100, Matthias Bolte wrote:
2010/3/24 <steven765@yahoo.com>: Your XML is really not well formed. This
<source network-'default'/>
should be
<source network='default'/>
target dev='vnet1'/>
And you miss a < before the word target:
target dev='vnet1'/>
should be
<target dev='vnet1'/>
</interface>
I've tired giving it the full path still no luck. Thanks in advance,
use xmllint to check XML instances if you're not sure
xmllint net.xml
Daniel
-- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Thu, Mar 25, 2010 at 12:41:21PM -0700, steven765@yahoo.com wrote:
Thanks, but problem still persists. I actually fat fingered entering it the first time
The xmlfile really is:
<?xml version="1.0"?> <interface type="network"> <mac address="52:54:00:5c:fe:a8"/> <source network="default"/> <target dev="vnet1"/> </interface>
I ran xmllint and it just says no DTD specified,
not normal,
xmllint net.xml
as I suggested should never ask for a DTD !
however this works perfectly if i use the attach-device command in virsh.
then this proves it's well formed and libvirt finds the informations it looks after.
I tired it both with and without the first line version=1.0
yup that's XML metadata, does not need to be present
I try running it through python and boom, is there something else I'm missing?
You probably failed to load it into python one way or another.
I can't find any documentation about the overall libvirt xml schema.
Using Relax-NG syntax, usually stored in: /usr/share/libvirt/schemas/ xmllint --noout --relaxng foo.rng foo.xml outputs the result of the validation of foo.xml against foo.rng schemas, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/
participants (2)
-
Daniel Veillard
-
steven765@yahoo.com