[libvirt-users] LXCs using Libvirt

Anu Mercian amercian at lbl.gov
Thu Jun 4 23:22:43 UTC 2015


Hi all,

I am trying to bring up lxc's using Libvirt JAVA API. I do the following:

conn = Connect("lxc:\\\")

xml_config = "<domain> .... <\domain>"

dom = conn.domainCreateXML(xml_config, 0)

dom.create()

Using the above code, I am able to start a domain but the domain is not
visible within the "lxc" list, i.e
when I use the command "lxc-ls --fancy", the domain that was created cannot
be viewed, although, when I use the function conn.listDomains(), I can view
the domain.

As a work-around if I use the "lxc-create -t <OS> -n <name>" command
followed by "conn.domainDefineXML(xml_config)", I can view the domain
within "lxc-ls --fancy"

Any one has observed this problem earlier and is there a way I can create
the domain without using "lxc-create ..." command and still list the domain
on the "lxc-ls --fancy" list?

Thank you,
Anu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20150604/67e6e9e0/attachment.htm>


More information about the libvirt-users mailing list