Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Copyright 2016 by Assured Information Security, Inc. Created by Jean-Edouard Lejosne <lejosnej@ainfosec.com>. This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

Development

You can ssh to any running container to work in it (sudo lxc-start -n <container> to start it)

Just run:

  • IP_C=$(( 150 + UID % 100 ))
  • ssh -i ssh-key/openxt build@192.168.${IP_C}.101    # 101 for oe, 102 for debian and 103 for centos

This should let you it without a password.

Note: ssh-ing as root is disabled, but root doesn't have a password. To login as root, either log in with the build user and sudo -i, or lxc-attach -n <container> as root. At this point, you may set a root password using passwd.

Creating new containers

You may want to create a new container, to build OpenXT 5 for example.

If you do so, here's how to attach it to the user-specific network that setup.sh created.

Here's how to do it (as root), assuming the user is "openxt" and the name of the container is "openxt-custom". Also note that <ip_c> is the same value as the variable IP_C defined above, base on the user UID:

  • Edit /etc/libvirt/qemu/networks/openxt.xml and add a line for the new container, like:
    <host mac="00:FF:AA:42:<ip_c-150>:04" name="openxt-custom" ip="192.168.<ip_c>.104" />
  • Contigure the container itself:
    cat >> /home/lxc/openxt-custom/config <<EOF
    lxc.network.type = veth
    lxc.network.flags = up
    lxc.network.link = openxtbr0
    lxc.network.hwaddr = 00:FF:AA:42:<ip_c-150>:04
    lxc.network.ipv4 = 0.0.0.0/24
    EOF

 

TODO MORE TO COME....

  • No labels