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,