LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-07-2022, 05:27 AM   #1
rdahal
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Rep: Reputation: Disabled
Migration tool to Netplan


Hi

Currently, I have around 100 machines running in ubuntu-20.04 each with a different networking modes (networking bond, single to multiple interfaces etc.). Networking on these machines is being managed from /etc/network/interface file and service networking. Now I am planning to migrate all these to Netplan.
Is there any tool that can help me to migrate network interface details (IP,GW,DNS, Bonding, etc) to yaml format for Netplan.

Thanks,
 
Old 09-08-2022, 03:04 AM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,878
Blog Entries: 1

Rep: Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078Reputation: 2078
OT: another alternative

I don't know the answer, as I don't know what makes netplan or yaml attractive for static IP configuration. I just purged all related packages of both from another Jammy installation, with systemd-networkd taking over, as now on most of my installations regardless of distro.
 
Old 09-29-2022, 03:49 AM   #3
rdahal
LQ Newbie
 
Registered: Jan 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
I found a migration script on the system located under /usr/share/netplan/netplan/cli/commands/migrate.py (Also available under https://github.com/canonical/netplan...nds/migrate.py). This script, when executed, runs smoothly for the network interface (/etc/network/interfaces) with the non-bond interface, for interfaces with network bonding, it terminates with the following error.

root@myserver:~# ENABLE_TEST_COMMANDS=1 netplan migrate
Unsupported method manual


root@myserver:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
# The loopback network interface
auto lo
iface lo inet loopback


# The primary network interface
# Interfaces bonding
auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
address 10.0.0.132
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8 4.2.2.2
bond-mode 802.3ad
bond-miimon 100
bond-lacp-rate 1
bond-slaves none
 
  


Reply

Tags
interfaces, migrate, netplan, network interface, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Netplan auth block unrecognised lolmc Linux - Wireless Networking 1 02-22-2019 10:44 PM
LXer: Have a Plan for Netplan LXer Syndicated Linux News 0 10-17-2018 12:32 AM
LXer: How to Use the Netplan Network Configuration Tool on Linux LXer Syndicated Linux News 0 09-09-2018 04:51 AM
Ubuntu 17.04, netplan, bring up interface without ip da1 Ubuntu 3 01-24-2018 10:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration