Configure Networking for LXD Virtual Machines on Ubuntu Linux | Open Source | DevOps | Software

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024

Комментарии • 36

  • @TrevorSullivan
    @TrevorSullivan  Год назад +3

    Here's a playlist dedicated to LXD! ruclips.net/p/PLDbRgZ0OOEpX_uqK_hAq98ltdc4DP-D34

    • @pipi_delina
      @pipi_delina Год назад +1

      Thanks

    • @ndevadas
      @ndevadas 7 месяцев назад

      when I list lxc list I don't get a ip4 hence I cannot connect to internet from windows 11. I have ip6 address though. Do you know there reason or a work around. My lxd/lxc version is 5.20. Thank you.

    • @TrevorSullivan
      @TrevorSullivan  7 месяцев назад

      @@ndevadas Are you using the default network configuration in LXD? I have seen a number of cases where virtual machines do not get IPv4 addresses. In particular, I noticed this when using LXD on a Hyper-V virtual machine. Are you running LXD under a VM, or is it on bare metal?

    • @ndevadas
      @ndevadas 7 месяцев назад

      @@TrevorSullivan yes, I ran lxd init and accepted default answers. I then created an Ubuntu 22.04 container. Lxc list does not get a ipv4 private IP. Lxc network list has a range assigned correctly.

    • @ndevadas
      @ndevadas 7 месяцев назад

      yes bare metal.

  • @sanjayidpuganti
    @sanjayidpuganti 6 месяцев назад

    Thanks Trevor. Helped me a lot.

  • @capcata
    @capcata 5 месяцев назад

    Secondaty ip on host for bridge fwd!!!! I spent days until found your video.

  • @erikzulu
    @erikzulu Год назад +2

    Nice! informative, thank you.

  • @bitferret-rx5rn
    @bitferret-rx5rn 8 месяцев назад

    Hello @trevor... by chance have you gotten this error before... I am trying to create a centos7 container on an LXD host that is running ubuntu 22.04.
    Error: Failed instance creation: Failed getting remote image info: Failed getting image: The requested image couldn't be found

    • @TrevorSullivan
      @TrevorSullivan  8 месяцев назад

      Hey there, you can't use Docker Hub images to launch LXC containers. Check the Linux containers server to see which images are available.

    • @bitferret-rx5rn
      @bitferret-rx5rn 8 месяцев назад

      @@TrevorSullivan this is the command... I am sure its a lxd command.. "lxc launch images:centos/7/amd64 cenots-db"

    • @TrevorSullivan
      @TrevorSullivan  8 месяцев назад

      @@bitferret-rx5rn That command worked fine for me, except I got a new error saying "Error: The image used by this instance requires a CGroupV1 host system" .. I am not sure what that means.

    • @bitferret-rx5rn
      @bitferret-rx5rn 8 месяцев назад

      @@TrevorSullivan before I placed the firewall rule to allow traffic in and out, it worked only I could not get ip... After the change I got the error

    • @TrevorSullivan
      @TrevorSullivan  8 месяцев назад

      @@bitferret-rx5rn well it sounds like you've identified the root cause of your issue 😊 I'm sorry, I can't help with your firewall configuration most likely. I'd recommend looking at any proxy settings that could interfere with requests to the image retrieval service.

  • @henryschroer3813
    @henryschroer3813 9 месяцев назад

    how can a LXC VM or container talk to another container on the same LXD cluster?

    • @TrevorSullivan
      @TrevorSullivan  9 месяцев назад

      I have another video that talks about clustering with LXD

  • @adahaj
    @adahaj 11 месяцев назад

    How can I access the VM created using LXD via SSH ?

    • @TrevorSullivan
      @TrevorSullivan  11 месяцев назад +1

      You'll have to set up SSH authentication inside the VM. This guide doesn't cover that specific topic, but I'm sure there are hundreds, if not thousands, of guides on setting up SSH authentication! You might have to install the "openssh-server" package with "apt-get" as well.

  • @barma1309
    @barma1309 10 месяцев назад

    Can you show command for add nic to profile bridge ?

    • @barma1309
      @barma1309 10 месяцев назад

      i try to use "lxc profile device add bridge enp0s8 nic" and i got
      Error: Device validation failed for "enp0s8": Failed loading device "enp0s8": Unsupported device type

    • @barma1309
      @barma1309 10 месяцев назад

      it seems right to use that "lxc profile device add bridge enp0s8 nic nictype=bridged parent=br0 name=eth0"

    • @TrevorSullivan
      @TrevorSullivan  5 месяцев назад

      Sorry for the delay in responding. I always refer to this tutorial for the commands I need to use to set up the bridge adapter. blog.simos.info/how-to-make-your-lxd-containers-get-ip-addresses-from-your-lan-using-a-bridge/

  • @ewenchan1239
    @ewenchan1239 5 месяцев назад

    I'm running LXD on Proxmox 7.4-17 (Debian 11) directly itself.
    Given that, Proxmox has already taken over my physical network interfaces with the network bridge.
    So...how do I connect the CTs/VMs that are managed by LXD to the network such that it would still be able to see the host? Is this a scenario where I would need to add an additional network card because I won't be able to piggy-back off of my existing network?
    Your help is greatly appreciated.
    Thank you.

  • @CQ123
    @CQ123 4 месяца назад

    I really would like to see a video explaining the real benefit of using LXD instead pure-LXC. All those networking options are pretty simple to do on pure-LXC side, without pushing extra lines of code to the system. I easy use pure bash scripts to automate most of what LXD does... but.. the LXD project probably is much more - and very bad communicated to the community. My 2 cents.

  • @u07t17
    @u07t17 Год назад

    Thanks Trevor! Working an internal cloud POC and will use this information. Thank you.

  • @madhusudanbv7056
    @madhusudanbv7056 5 месяцев назад

    Hi Trevor - Great tutorial! Thanks. I have a question. Why can't we just add a route to the bridged network from our physical host?. I tried this and it works.

    • @TrevorSullivan
      @TrevorSullivan  5 месяцев назад

      That's a great idea! Sometimes the simplest solution is the best! 😊 Thanks for joining my channel! I'm glad this has been helpful for you.

    • @TrevorSullivan
      @TrevorSullivan  5 месяцев назад

      Keep in mind that you'll have to add a route for any other systems, to route through the physical host, in order to access the VM. The way you did it, will only allow the physical host to access the VM. You could probably add the route at your router, and make sure you enable routing in the host's kernel also.

    • @madhusudanbv7056
      @madhusudanbv7056 5 месяцев назад +1

      @@TrevorSullivan : Thank you. Yes. As I am connected to a Wi-Fi network currently and the router's static route doesn't pass through. I will implement this once am in wired network :) I am not sure if the routes can be passed using wifi network.

    • @TrevorSullivan
      @TrevorSullivan  5 месяцев назад

      @@madhusudanbv7056 if you add a route to your Internet router, it will apply to your client device regardless of if it's Wi-Fi or wired.

  • @oldsmar_chaos
    @oldsmar_chaos 11 месяцев назад +1

    trevor skipped the last two parts and they are needed for his other videos.. he deleted my comment. why.. trevor.. i believed in you