Jump to content

Specu

Members
  • Posts

    14
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 GBP 

Wiki Article Comments posted by Specu

  1. Hello @Elmsroth nice tool. What is really confusing is $NOW variable.

    In your script it looks like:

    NOW=$(date +"%s-%d-%m-%Y")
    echo $NOW
    1595580505-24-07-2020

    so if mangos restarts *.log shows

    1595568627-24-07-2020 mangosd stopped, restarting!

    More human readable would be:

    NOW=$(date +"%T-%d-%m-%Y")
    echo $NOW
    10:53:48-24-07-2020

    • Like 1
  2. @razz2u2

    First of all in default configuration LXD is set up with lxdbr interface. Also you cant access your container from network even from LAN.

    If you want to access to your container from LAN you have to assign another profile to your container or change default one. New profile must be set up with network bridge or using macvlan (L2 layer) - both methods are good.

    In other words, by default your container is in 10.x.x.x subnet, if you want to assign subnet from your router DHCP i.e. 192.168.x.x, you MUST change or add bridge or macvlan profile. Then your container will have IP in 192.168.x.x subnet instead 10.x.x.x (lxdbr).

    Here how it should look:

    $~: lxc list
    +----------+---------+-----------------------+
    |   NAME   |  STATE  |         IPV4          |
    +----------+---------+-----------------------+
    | mangos0  | RUNNING | 192.168.x.x (eth1)    |
    +----------+---------+-----------------------+
    | test1    | RUNNING | 10.x.x.x (eth0)       |
    +----------+---------+-----------------------+
    | test2    | RUNNING | 10.x.x.x (eth0)       |
    +----------+---------+-----------------------+
    
    $~: lxc info mangos0
    Name: mangos0
    Remote: unix://
    Architecture: x86_64
    Created: 2019/10/30 17:48 UTC
    Status: Running
    Type: persistent
    Profiles: macvlan
    
    $~: lxc profile show macvlan
    config: {}
    description: macvlan profile
    devices:
      eth0:
        name: eth1
        nictype: macvlan
        parent: enp2s0
        type: nic
      root:
        path: /
        pool: default
        type: disk
    name: macvlan
    used_by:
    - /1.0/containers/mangos0


    Configuration such as this needs intermediate knowledge about LXD and network, so I do not recommend it for newbies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use