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 :
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)
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.
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
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