
Hi, I'm running libvirt from CVS. I'm unable to get xmldump to work: o virsh dumpxml <domain-id> doesn't work. Neither does <domain-name> instead of domain-id. (Aside: the documentation at http://libvirt.org/format.html needs fixing -- virsh reports a dumpxml command, but no xmldump command) o I can't get an XML dump from the Python bindings either. Looking at the code, it seems the XML description is built using the sexpr output from xend. On my machine, "xm list -l <domain-id>" prints out the correct sexpr, so it seems Xend is working fine. Am I missing something? Thanks, Diwaker -- Web/Blog/Gallery: http://floatingsun.net/blog

On Thu, Feb 23, 2006 at 10:39:41PM -0800, Diwaker Gupta wrote:
Hi,
I'm running libvirt from CVS. I'm unable to get xmldump to work:
o virsh dumpxml <domain-id> doesn't work. Neither does <domain-name> instead of domain-id. (Aside: the documentation at http://libvirt.org/format.html needs fixing -- virsh reports a dumpxml command, but no xmldump command)
o I can't get an XML dump from the Python bindings either.
Looking at the code, it seems the XML description is built using the sexpr output from xend. On my machine, "xm list -l <domain-id>" prints out the correct sexpr, so it seems Xend is working fine.
Are you running a recent version of xen ? My guess is that you don't have http enabled in /etc/xen/xend-config.sxp localhost:~/libvirt/src -> grep http /etc/xen/xend-config.sxp # utilizes a bridged network configuration. Access to xend via http (xend-http-server yes) # Port xend should use for the HTTP interface, if xend-http-server is set. # Address xend should listen on for HTTP connections, if xend-http-server is localhost:~/libvirt/src -> Most of the operations are now carried though Xend HTTP interface. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Are you running a recent version of xen ? My guess is that you don't have http enabled in /etc/xen/xend-config.sxp
Yep, I track unstable. The HTTP server was off. Thanks, it works now! You might want to add this to the documentation (if its already there, I might have missed it).
Most of the operations are now carried though Xend HTTP interface.
Just out of curiosity, why is the HTTP server a requirement? From xen-devel, it seems people are trying to move away from running a HTTP server. Its possible to get all the information directly from xenstore anyways right? Also, since libvirt is going to track Xen development, I hope its safe to assume that libvirt will move to XML-RPC when Xend does? Diwaker -- Web/Blog/Gallery: http://floatingsun.net/blog

On Fri, Feb 24, 2006 at 01:43:23AM -0800, Diwaker Gupta wrote:
Are you running a recent version of xen ? My guess is that you don't have http enabled in /etc/xen/xend-config.sxp
Yep, I track unstable. The HTTP server was off. Thanks, it works now! You might want to add this to the documentation (if its already there, I might have missed it).
I checked, it's there in point #3 of the Installation part of the FAQ http://libvirt.org/FAQ.html#Installati
Most of the operations are now carried though Xend HTTP interface.
Just out of curiosity, why is the HTTP server a requirement? From xen-devel, it seems people are trying to move away from running a HTTP server. Its possible to get all the information directly from xenstore anyways right?
Well, the problem is if you're running as a user. If running as root I think the connection to xend goes though a local socket not an IP HTTP server, and should work even if the server is off. If you run as an user accessing to the xen store need to tweak the permissions on the read only socket anyway. More generally most of the operation from libvirt are safer being carried over the xend control I was told, if I access directly the hypervisor (and this mandates root permissions on Dom 0) then I will confuse xend internal state about the running domains. There is also some APIs like Create/Save/Restore that can't be done easilly within libvirt even with xen store access, and get close to trivial if you go though xend. Basically at the moment Xend sits on the domain management, and it's nearly unavoidable to go though it.
Also, since libvirt is going to track Xen development, I hope its safe to assume that libvirt will move to XML-RPC when Xend does?
Yes Anthony is leading this, as as far as I understand he already has patches which could be added to libvirt once the upstream version of xend will have XML-RPC included. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

Diwaker Gupta wrote:
Also, since libvirt is going to track Xen development, I hope its safe to assume that libvirt will move to XML-RPC when Xend does?
Yes, I've been busy recently. The XML-RPC code is working with no regressions. Once I submit to xen-devel, I'll send some patches to this list adding XML-RPC support. Regards, Anthony Liguori
Diwaker -- Web/Blog/Gallery: http://floatingsun.net/blog
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Daniel Veillard wrote:
On Thu, Feb 23, 2006 at 10:39:41PM -0800, Diwaker Gupta wrote:
Hi,
I'm running libvirt from CVS. I'm unable to get xmldump to work:
o virsh dumpxml <domain-id> doesn't work. Neither does <domain-name> instead of domain-id. (Aside: the documentation at http://libvirt.org/format.html needs fixing -- virsh reports a dumpxml command, but no xmldump command)
o I can't get an XML dump from the Python bindings either.
Looking at the code, it seems the XML description is built using the sexpr output from xend. On my machine, "xm list -l <domain-id>" prints out the correct sexpr, so it seems Xend is working fine.
Are you running a recent version of xen ? My guess is that you don't have http enabled in /etc/xen/xend-config.sxp
The libxend code works with the domain socket as well. Perhaps we should fall back to the domain socket if the host is "localhost" and the HTTP server cannot be reached? Regards, Anthony Liguori
localhost:~/libvirt/src -> grep http /etc/xen/xend-config.sxp # utilizes a bridged network configuration. Access to xend via http (xend-http-server yes) # Port xend should use for the HTTP interface, if xend-http-server is set. # Address xend should listen on for HTTP connections, if xend-http-server is localhost:~/libvirt/src ->
Most of the operations are now carried though Xend HTTP interface.
Daniel

On Fri, Feb 24, 2006 at 12:41:41PM -0600, Anthony Liguori wrote:
Are you running a recent version of xen ? My guess is that you don't have http enabled in /etc/xen/xend-config.sxp
The libxend code works with the domain socket as well. Perhaps we should fall back to the domain socket if the host is "localhost" and the HTTP server cannot be reached?
yeah but it requires root access, I need to check the various combinations. Daniel -- Daniel Veillard | Red Hat http://redhat.com/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Anthony Liguori
-
Daniel Veillard
-
Diwaker Gupta