Re: Load new profile in Network manager v0.9.4 using cli (without nm-connection-editor) ?



On Tue, 2014-08-12 at 08:46 +0200, Stanislav Bocinec wrote:
Hello,

i'm working on migration of autoprovisioned Ubuntu 12.04 LTS servers
from ifup (/etc/network/interfaces) to NetworkManager
(v0.9.4.0). /etc/network/interfaces is clean (only loopback interface
is configured):

# cat /etc/network/interfaces 
auto lo
iface lo inet loopback

In this scenario, NM list one 'Wired connection 1':

# nmcli c list
NAME                      UUID                                   TYPE              TIMESTAMP-REAL           
         
Wired connection 1        e96b8486-3ea8-4f20-bd5a-2d532c2cf90a   802-3-ethernet    Wed 06 Aug 2014 03:13:29 
PM CEST

This connection is in memory only, and generated automatically
because there was no other connection.


/etc/NetworkManager/system-connections/ is empty:

# ls -la /etc/NetworkManager/system-connections/
total 8
drwxr-xr-x 2 root root 4096 Aug  6 15:11 .
drwxr-xr-x 5 root root 4096 Aug  6 11:37 ..


you certainly should be able to provide "keyfiles"
in /etc/NetworkManager/system-connections/. Make sure they are owned by
root and `chmod 600`.


Maybe, you also have to configure

  [main]
  plugins=ifupdown,keyfile

in /etc/NetworkManager/NetworkManager.conf. See `man
NetworkManager.conf`, but actually I think that "keyfile" is enabled
always (*) and depending on whether you want to use ifupdown, that might
be correct.

(*) at least on recent NM. 0.9.4 is already a bit older, didn't check
there.


... I did not fully understand, would you prefer to
provide /etc/network/interfaces instead of keyfiles? The former has the
advantage that it works together with Ubuntus default network
configuration. However, there might be options that are not available or
not supported. "keyfile" supports everything.



When i generate new profile and store it
in /etc/NetworkManager/system-connections/ i'm not able to persuade NM
to register/load this profile:

# cat /etc/NetworkManager/system-connections/DHCP 
[802-3-ethernet]
duplex=full

[connection]
id=DHCP
uuid=25b9bcf8-1534-411d-8cb6-a3d4fcf33f5a
type=802-3-ethernet
timestamp=1407331036

[ipv6] 
method=auto

[ipv4] 
method=auto

# service network-manager restart
network-manager stop/waiting
network-manager start/running, process 1918


# nmcli c list
NAME                      UUID                                   TYPE              TIMESTAMP-REAL           
         
Wired connection 1        df785c8f-67e6-44c0-8434-2ca2b96d6408   802-3-ethernet    Wed 06 Aug 2014 03:27:16 
PM CEST

I'm able to create new profile only using nm-connection-editor, but we
can't use this method in autodeployments.

you can use nm-connection-editor to help you generating an initial
configuration. Then you can copy the keyfile around (and possibly
adjusting by hand).


Can anyone suggest, how to accomplish import and successful load of
manually created NM profile into the NM? I'm aware NM supports  is
already added in v0.9.9.1, but if there is any way how to succeed with
mine setup, i'll appreciate any help!


I asked already on serverfault but without
success..(http://serverfault.com/questions/618394/how-to-load-new-profile-in-network-manager-v0-9-without-nm-connection-editor-usi)




Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]