Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


How can I find out how the network is being configured on a Jammy VM?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

How can I find out how the network is being configured on a Jammy VM?

k9bangerk9banger Barred
edited October 30 in Help

I have configured a Jammy Proxmox VM system which generally comes up OK but the address is different from whats in /etc/network/interfaces.

It seems the settings I used during the installation can not be overridden by the contents of what I have put in /etc/network/interfaces.

Where else in the Jammy system has the network been configured?

It must be what the installation system uses.

This is the configuration I want which I have set in /etc/network/interfaces.

auto lo
iface lo inet loopback

auto ens18
iface ens18 inet static
address 10.0.0.20/24
gateway 10.0.0.254

This the only file in the /etc/netplan directory are the files I see in /etc/netplan/50-cloud-init.yaml

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    ethernets:
        ens18:
            addresses:
            - 10.0.0.21/24
            nameservers:
                addresses:
                - 1.1.1.1
                - 8.8.8.8
                search: []
            routes:
            -   to: default
                via: 10.0.0.254
    version: 2

Comments

  • After further investigation I found /etc/cloud/cloud.cfg.d/90-installer-network.cfg which this content.

    # This is the network config written by 'subiquity'
    network:
      ethernets:
        ens18:
          addresses:
          - 10.0.0.21/24
          nameservers:
            addresses:
            - 1.1.1.1
            - 8.8.8.8
            search: []
          routes:
          - to: default
            via: 10.0.0.254
      version: 2
    

    So I suspect this is what is used at start up.

    Is there some actual other I can use to override this, such as create a similar file with my preference and make it a higher priority?

  • echo 'network: {config: disabled}' | sudo tee /etc/cloud/cloud.cfg.d/99-custom-networking.cfg

Sign In or Register to comment.