[libvirt-users] lxc--sshd

Brandon Foster brandon.foster at liferay.com
Thu Feb 28 23:08:29 UTC 2013


Hey all,
I am new to libvirt lxc and am trying to get a container that i can
ssh to. So far i've booted up a container and gave it an Ip address,
it can ping out and I can ping it but I cannot get ssh to work.
When i try to run an ssh command inside the container I get a command
not found error. here is my xml file

<domain type='lxc'>
  <name>helloworld</name>
  <memory>102400</memory>
  <os>
    <type>exe</type>
    <init>/bin/sh</init>
  </os>
<devices>
<console type='pty'/>
<filesystem type='mount'>
   <source dir='/export/helloworld/config'/>
   <target dir='/etc/httpd'/>
</filesystem>
<filesystem type='mount'>
   <source dir='/export/helloworld/data'/>
   <target dir='/var/www'/>
</filesystem>
<interface type='bridge'>
      <mac address='52:54:00:5e:02:45'/>
      <source bridge='br0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
       <model type='virtio' />
</interface>
</devices>
</domain>

I havent restricted it with busybox for simplicity thinking it was
because I wasn't allowing it access to necessary ssh files, but Im not
sure what I am missing now.

surely someone has done this before.

thanks
--
Brandon Foster
Infrastructure Administrator

Liferay, Inc.
Enterprise. Open Source. For life.




More information about the libvirt-users mailing list