[libvirt-users] SSH into LXC and install files via JAVA API

Anu Mercian amercian at lbl.gov
Wed Jun 10 21:40:53 UTC 2015


Hello everyone,

I am trying to use libvirt's JAVA API to ssh into a domain and install some
files, for example, dhcpd. Using virsh, its pretty straight forward using
the command line:

virsh -c lxc:/// create myguest.xml

virsh -c lxc:/// console myguest

virsh -c lxc:/// lxc-enter-namespace myguest -- sudo yum install dhcpd

But in order to incorporate the above functionality in a JAVA API, I am not
really sure what to do. The following command helps me ssh into a system,
but I am not sure how to send remote commands.

conn = Connect("lxc+ssh:///")

Please can someone help me out with this?

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


More information about the libvirt-users mailing list