Results 1 to 10 of 10

Thread: STATIC Network Configuration not loaded on Guest VM startup

  1. #1

    Default STATIC Network Configuration not loaded on Guest VM startup

    Hello all,

    I recently started working with openSUSE.
    Currently I'm having troubles configuring Leap 42.3 VM with static IP on a second network card.

    The setup I need is: 1 card with NAT and 1 card with static IP.
    Therefore I have two network configuration files ( for eth0 and eth1 ).
    The eth0 configuration file was created automatically when I created the VM,
    but the second I did manually, following the instructions described in /etc/sysconfig/network/ifcfg.template :

    template-VM:~ # cat /etc/sysconfig/network/ifcfg-eth1
    BOOTPROTO='static'
    BROADCAST='192.168.0.255'
    ETHTOOL_OPTIONS=''
    IPADDR='192.168.0.112'
    MTU=''
    NAME=''
    NETMASK='255.255.255.0'
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='auto'
    DHCLIENT_SET_DEFAULT_ROUTE='yes'

    After creating the above file, I restarted the VM but the configuration wasn't read at all:

    template:~ # ifconfig eth1
    eth1 Link encap:Ethernet HWaddr 08:00:276:CE:C9
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    What I'm doing wrong ?

  2. #2
    Join Date
    Sep 2012
    Posts
    7,101

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    Are you using wicked or NetworkManager?

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    Quote Originally Posted by davidlubomirov View Post
    Hello all,

    I recently started working with openSUSE.
    Currently I'm having troubles configuring Leap 42.3 VM with static IP on a second network card.

    The setup I need is: 1 card with NAT and 1 card with static IP.
    Therefore I have two network configuration files ( for eth0 and eth1 ).
    The eth0 configuration file was created automatically when I created the VM,
    but the second I did manually, following the instructions described in /etc/sysconfig/network/ifcfg.template :

    template-VM:~ # cat /etc/sysconfig/network/ifcfg-eth1
    BOOTPROTO='static'
    BROADCAST='192.168.0.255'
    ETHTOOL_OPTIONS=''
    IPADDR='192.168.0.112'
    MTU=''
    NAME=''
    NETMASK='255.255.255.0'
    NETWORK=''
    REMOTE_IPADDR=''
    STARTMODE='auto'
    DHCLIENT_SET_DEFAULT_ROUTE='yes'

    After creating the above file, I restarted the VM but the configuration wasn't read at all:

    template:~ # ifconfig eth1
    eth1 Link encap:Ethernet HWaddr 08:00:276:CE:C9
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    What I'm doing wrong ?
    Assume you're using Wicked (not Network Manager)

    Better and easier is to at least start your configuration using YaST > System > Network Settings, then Edit the desired network interface.
    Then, if you want to further modify your interface, perhaps with settings not obvious in YaST, then modify the ifcfg file directly.

    I'm also assuming that your NAT is your primary network interface, so only that should be a full network configuration with DG and DNS.
    Secondary network interfaces <may> have those settings as well, but typically don't.

    Depending on what you are trying to configure, you may also have to add a "network device" in your Guest's virtualization properties(your network devices are connected to different virtual networks).
    How you might do this depends on what virtualization you are running.

    If the above isn't enough to get you working, you need to post
    Virtualization technology
    ip addr
    Guest network devices (connected to type of network (NAT/HostOnly/Bridging),
    Virtual networks configured(Typically found in HostOS virtualization management tool)

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    Quote Originally Posted by tsu2 View Post
    Assume you're using Wicked (not Network Manager)

    Better and easier is to at least start your configuration using YaST > System > Network Settings, then Edit the desired network interface.
    Then, if you want to further modify your interface, perhaps with settings not obvious in YaST, then modify the ifcfg file directly.

    I'm also assuming that your NAT is your primary network interface, so only that should be a full network configuration with DG and DNS.
    Secondary network interfaces <may> have those settings as well, but typically don't.

    Depending on what you are trying to configure, you may also have to add a "network device" in your Guest's virtualization properties(your network devices are connected to different virtual networks).
    How you might do this depends on what virtualization you are running.

    If the above isn't enough to get you working, you need to post
    Virtualization technology
    ip addr
    Guest network devices (connected to type of network (NAT/HostOnly/Bridging),
    Virtual networks configured(Typically found in HostOS virtualization management tool)

    TSU
    Hi,

    I'm using Network Manager.
    What I'm trying is, to receive configuration, without having to touch the GUI ( not a big fan of the mouse ).

  5. #5
    Join Date
    Sep 2012
    Posts
    7,101

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    Quote Originally Posted by davidlubomirov View Post
    I'm using Network Manager.
    And what makes you think NetworkManager is using configuration file you created?
    receive configuration, without having to touch the GUI

    You can use nmcli or nmtui or edit /etc/NetworkManager/system-connections directly.

  6. #6

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    Quote Originally Posted by arvidjaar View Post
    And what makes you think NetworkManager is using configuration file you created?

    You can use nmcli or nmtui or edit /etc/NetworkManager/system-connections directly.[/FONT][/COLOR]
    Still that's in no help at all.
    Ok it looks like I'll have to invest more time on that OS then on any other.
    Thanks a lot .

  7. #7
    Join Date
    Mar 2011
    Location
    Sauerland
    Posts
    6,726

    Default AW: STATIC Network Configuration not loaded on Guest VM startup

    https://developer.gnome.org/NetworkM...s-keyfile.html

    Its the same as arvidjaar said.

    /etc/sysconfig/network is for use with Yast/wicked, not Networkmanager.....

  8. #8
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    If you are not moving between networks, then you should be using Wicked instead of Network Manager. Network Manager is generally recommended whenever you need to move between wireless networks, so you may need to set up(and remember) connections to each network you connect to.

    Otherwise,
    As described, you do have CLI options to create, and manage network connections using Network Manager, and nmtui is likely the easiest path to success.

    But otherwise,
    You didn't say anything about the other important requirement i mentioned, that you also have to set up externally in your Guest's virtualization properties a "network device" that connects your secondary network device to a defined virtual network. Alternatively but I'd consider unlikely, it's probably possible to add a static address to your existing network interface, but I'd want to see evidence you're trying to do that before going down that path.

    If you are unable to figure out what you're not doing correctly, you have to post the information I asked for at the end of my last post.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  9. #9
    Join Date
    Sep 2012
    Posts
    7,101

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    Quote Originally Posted by davidlubomirov View Post
    Still that's in no help at all.
    It answers your exact question - what you are doing wrong. If this is of no help, may be you intended to ask something different, not what you have actually asked
    Ok it looks like I'll have to invest more time on that OS then on any other.
    Previous posts give impression that you are familiar with configuring NetworkManager under other OS without GUI. In this case there should be no difference in openSUSE. If my assumption is wrong, may be you could elaborate on what your actual question is

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,798

    Default Re: STATIC Network Configuration not loaded on Guest VM startup

    While my contribution here might be of no value at all because I have no VM experience (you could have avoided me posting here when you had started this in the Virtualization sub-forum ), my two cents.

    I am with tsu2 in that this seems to me a case for wicked (ifconfig). And I am also with him that using YaST to start with (which then first and for all will see that your system is switch from NM to wicked, so that configuring ifconfig while still using NM is avoided) and then may be fine tune by editing the ifconfig files might be a good way to go.

    You protest because you do not want to use a GUI. That is no argument, because nobody here suggested that you use YaST in a GUI. Just (as root) call
    Code:
    yast
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •