Install Native Xen and KVM Drivers
Ubuntu 20.04 is used as an example to illustrate the driver installation. For other OS types, see Installing Native Xen and KVM Drivers on a Xen ECS.
- Open the modules file.
vi /etc/initramfs-tools/modules
- Press i to enter the editing mode and add native Xen (xen-pv) and KVM (VirtIO) drivers to the /etc/initramfs-tools/modules file (the format depends on the OS requirements).
[root@CTU10000xxxxx ~]#vi /etc/initramfs-tools/modules
...
# Examples:
#
# raid1
# sd_mOd
xen-blkfront
xen-netfront
virtio_blk
virtio_scsi
virtio_net
virtio_pci
virtio_ring
virtio
- Press Esc, enter :wq, and press Enter to save the settings and exit the vi editor.
- Generate initramfs or initrd again.
update-initramfs -u
- Check whether native Xen and KVM drivers are installed.
lsinitramfs /boot/initrd.img-`uname -r` |grep xen
lsinitramfs /boot/initrd.img-`uname -r` |grep virtio
[root@ CTU10000xxxxx home]# lsinitramfs /boot/initrd.img-`uname -r` |grep xen
lib/modules/3.5.0-23-generic/kernel/drivers/net/ethernet/qlogic/netxen
lib/modules/3.5.0-23-generic/kernel/drivers/net/ethernet/qlogic/netxen/netxen_nic.ko
lib/modules/3.5.0-23-generic/kernel/drivers/net/xen-netback
lib/modules/3.5.0-23-generic/kernel/drivers/net/xen-netback/xen-netback.ko
lib/modules/3.5.0-23-generic/kernel/drivers/block/xen-blkback
lib/modules/3.5.0-23-generic/kernel/drivers/block/xen-blkback/xen-blkback.ko
[root@ CTU10000xxxxx home]# lsinitramfs /boot/initrd.img-`uname -r` |grep virtio
lib/modules/3.5.0-23-generic/kernel/drivers/scsi/virtio_scsi.ko
If you add built-in drivers to the initrd or initramfs file, the VM will not be affected but such drivers cannot be shown by running the lsinitrd command. You can run the following commands to check whether there are built-in drivers in the kernel:
[root@ CTU10000xxxxx home]# cat /boot/config-`uname -r` | grep CONFIG_VIRTIO | grep y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
[root@ CTU10000xxxxx home]# cat /boot/config-`uname -r` | grep CONFIG_XEN | grep y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_NETDEV_FRONTEND=y
Change Disk Identifiers in the GRUB Configuration File to the UUID Format
Take Ubuntu 20.04 as an example. Run
blkid to obtain the UUID of the root partition. Modify the
/boot/grub/grub.cfg file and use this UUID to configure the boot item. If the root partition is already using UUID, no modification is required. The procedure is as follows:
- Log in to the VM as root.
- List all types of mounted file systems and their device UUIDs:
blkid
The following information is displayed:
/dev/xvda1: UUID="ec51d860-34bf-4374-ad46-a0c3e337fd34" TYPE="ext3"
/dev/xvda5: UUID="7a44a9ce-9281-4740-b95f-c8de33ae5c11" TYPE="swap"
- Display the grub.cfg file content.
cat /boot/grub/grub.cfg
The following information is displayed:
......menuentry 'Ubuntu Linux, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-ec51d860-34bf-4374-ad46-a0c3e337fd34' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ec51d860-34bf-4374-ad46-a0c3e337fd34
else
search --no-floppy --fs-uuid --set=root ec51d860-34bf-4374-ad46-a0c3e337fd34
fi
echo 'Loading Linux 3.13.0-24-generic ...'
linux /boot/vmlinuz-3.13.0-24-generic root=/dev/xvda1 ro
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-24-generic
}
- Check whether the /boot/grub/grub.cfg configuration file contains root=/dev/xvda1 or root=UUID=ec51d860-34bf-4374-ad46-a0c3e337fd34.
- If root=UUID=ec51d860-34bf-4374-ad46-a0c3e337fd34 is contained, the root partition is in UUID format and no further action is required.
- If root=/dev/xvda1 is contained, the root partition is represented by a device name. Go to 5.
- Obtain the UUID of the root partition based on root=/dev/xvda1 and information obtained by running the blkid command.
- Open the grub.cfg file.
vi /boot/grub/grub.cfg
- Press i to enter the editing mode. Change the identifier of the root partition to the UUID format. For example, change root=/dev/xvda1 to root=UUID=ec51d860-34bf-4374-ad46-a0c3e337fd34.
- Press Esc, enter :wq, and press Enter to save the settings and exit the vi editor.
- Verify the change.
cat /boot/grub/grub.cfg
The change is successful if information similar to the following is displayed:
......menuentry 'Ubuntu Linux, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-ec51d860-34bf-4374-ad46-a0c3e337fd34' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root ec51d860-34bf-4374-ad46-a0c3e337fd34
else
search --no-floppy --fs-uuid --set=root ec51d860-34bf-4374-ad46-a0c3e337fd34
fi
echo 'Loading Linux 3.13.0-24-generic ...'
linux /boot/vmlinuz-3.13.0-24-generic root=UUID=ec51d860-34bf-4374-ad46-a0c3e337fd34 ro
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.13.0-24-generic
}
Change Disk Identifiers in the fstab File to the UUID Format
Take Ubuntu 20.04 as an example. Run blkid to obtain the UUIDs of all partitions. Modify the /etc/fstab file and use the partition UUIDs to configure automatic partition mounting.
- List all types of mounted file systems and their device UUIDs:
blkid
The following information is displayed:
/dev/xvda2: UUID="4eb40294-4c6f-4384-bbb6-b8795bbb1130" TYPE="xfs"
/dev/xvda1: UUID="2de37c6b-2648-43b4-a4f5-40162154e135" TYPE="swap"
- Display the fstab file content.
cat /etc/fstab
The following information is displayed:
[root@CTU1000028010 ~]# cat /etc/fstab
/dev/xvda2 / xfs defaults 0 0
/dev/xvda1 swap swap defaults 0 0
- Check whether disk identifiers in the fstab file are device names or UUIDs.
- If they are UUIDs, no further action is required.
- If they are device names, go to 4.
- Open the fstab file.
vi /etc/fstab
- Press i to enter the editing mode and change disk identifiers to the UUID format.
- Press Esc, enter :wq, and press Enter to save the settings and exit the vi editor.
(Optional) Install and Configuring Cloud-Init
To ensure that you can inject custom information (for example, the login password) into ECSs created from the image, you are advised to install Cloud-Init on the VM that is used as the image source.
Check Whether Cloud-Init Has Been Installed
The method of checking whether Cloud-Init is installed varies depending on the OS.
- If you are in a Python 3 environment, run the following command to check whether Cloud-Init is installed (Ubuntu 22.0.4 is used as an example):
which cloud-init
- If you are in a Python 2 environment, run the following command to check whether Cloud-Init is installed (CentOS 6 is used as an example):
which cloud-init
After Cloud-Init is installed, perform the following operations:
After the operations are complete, do not restart the VM. Otherwise, you need to perform these operations again.
(Recommended) Install Cloud-Init Using the Official Installation Package
The method of installing Cloud-init varies depending on the OS. Perform the installation as root.
The following describes how to install Cloud-Init in SUSE Linux, CentOS, Fedora, Debian, and Ubuntu. For other OS types, install the required type of Cloud-Init. For example, you need to install coreos-cloudinit for CoreOS.
- SUSE Linux
URLs for obtaining a Cloud-Init installation package for SUSE Linux
https://ftp5.gwdg.de/pub/opensuse/repositories/Cloud:/Tools/
http://download.opensuse.org/repositories/Cloud:/Tools/
Select a repo installation package matching your OS.
Take SUSE Enterprise Linux Server 12 as an example.
- Log in to the VM.
- Add a network installation source.
zypper ar https://ftp5.gwdg.de/pub/opensuse/repositories/Cloud:/Tools/SLE_12_SP3/Cloud:Tools.repo
- Update the network installation source.
zypper refresh
- Install Cloud-Init.
zypper install cloud-init
- Enable Cloud-Init to automatically start upon system boot.
- SUSE 11
chkconfig cloud-init-local on; chkconfig cloud-init on; chkconfig cloud-config on; chkconfig cloud-final on
service cloud-init-local status; service cloud-init status; service cloud-config status; service cloud-final status
- SUSE 12 and openSUSE 12/13/42
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
For SUSE and openSUSE, prevent DHCP from changing the hostname.
- Open the dhcp file using the vi editor.
vi etc/sysconfig/network/dhcp
- Change the value of DHCLIENT_SET_HOSTNAME in the dhcp file to no.
- CentOS
Table 1 lists the URLs for obtaining a Cloud-Init installation package for CentOS. Select an epel-release installation package matching your OS.
- Install Cloud-Init.
yum install network-installation-source/epel-release-x-y.noarch.rpm
yum install cloud-init
network-installation-source indicates the address of the Cloud-Init epel-release installation package, and x-y indicates the version of the Cloud-Init epel-release matching your OS. Replace them with the actual values based on Table 1.
- Take CentOS 6 64-bit as an example. If the version is 6.8, the command is as follows:
yum install https://archives.fedoraproject.org/pub/archive/epel/6/x86_64/epel-release-6-8.noarch.rpm
- Take CentOS 7 64-bit as an example. If the version is 7.14, the command is as follows:
yum install https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm
- Enable Cloud-Init to automatically start upon system boot.
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
- Fedora
Before installing Cloud-Init, ensure that the network installation source address has been configured for the OS by checking whether the /etc/yum.repo.d/fedora.repo file contains that address. If the file does not contain the address, configure the address by following the instructions on the Fedora official website.
- Install Cloud-Init.
yum install cloud-init
- Enable Cloud-Init to automatically start upon system boot.
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
- Debian and Ubuntu
Before installing Cloud-Init, ensure that the network installation source address has been configured for the OS by checking whether the /etc/apt/sources.list file contains that address. If the file does not contain the address, configure the address by following the instructions on the Debian or Ubuntu official website.
- Install Cloud-Init.
apt-get update
apt-get install cloud-init
- Enable Cloud-Init to automatically start upon system boot.
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
Cloud-Init-23.2.2 is used as an example to describe how to install Cloud-Init in CentOS, Fedora, Ubuntu, Debian, and SUSE.
Download the cloud-init-23.2.2.tar.gz source code package from https://launchpad.net/cloud-init/trunk/23.2.2/+download/cloud-init-23.2.2.tar.gz.
- CentOS 7/Fedora Server 36
Ensure that Python 3 has been installed.
- Check whether Cloud-Init has been installed. If any command output is displayed, Cloud-Init has been installed.
cloud-init -v
- Delete the cache directory of Cloud-Init.
rm -rf /var/lib/cloud/*
- Install dependency packages of Cloud-Init.
yum install python3-pip -y
yum install python3-devel
- Download the Cloud-Init package.
wget https://launchpad.net/cloud-init/trunk/23.2.2/+download/cloud-init-23.2.2.tar.gz
- Decompress the Cloud-Init package.
tar -zxvf cloud-init-23.2.2.tar.gz
- Go to the cloud-init-23.2.2 directory and install dependent libraries:
cd cloud-init-23.2.2
pip3 install -r requirements.txt
- Install Cloud-Init.
python3 setup.py build
python3 setup.py install --init-system systemd
- (Optional) Disable Cloud-Init's network configuration capability by modifying the /etc/cloud/cloud.cfg file.
vi /etc/cloud/cloud.cfg
Add the following content to the file:
network:
config: disabled
- Restart Cloud-Init and check its status.
systemctl restart cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

- Enable Cloud-Init related services to automatically start upon system boot.
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
- Check the Cloud-Init version and whether Cloud-Init is running properly.
cloud-init -v
cloud-init init --local

- Ubuntu 22.0.4/Debian 11
Ensure that Python 3 has been installed.
- Check and delete redundant Cloud-Init configuration files.
rm -rf /var/lib/cloud/*
rm -f /var/log/cloud-init*
Delete all files except log-related configuration files from the /etc/cloud/cloud.cfg.d/ directory.
- Update your package list and check whether Wget is installed. If it is not, install it.
sudo apt update
sudo apt install wget
- Install dependency packages.
apt-get install cloud-guest-utils -y
apt-get install python3-pip -y
apt-get install python3-devel
- Download the Cloud-Init package.
wget https://launchpad.net/cloud-init/trunk/23.2.2/+download/cloud-init-23.2.2.tar.gz
- Decompress the Cloud-Init package.
tar -zxvf cloud-init-23.2.2.tar.gz
- Go to the cloud-init directory.
cd cloud-init-23.2.2
- Install dependent libraries.
pip3 install -r requirements.txt
- Install Cloud-Init.
python3 setup.py install
- (Optional) Disable Cloud-Init's network configuration capability. You need to do so when the Cloud-Init version is 0.7.9 or later and you want to configure the network.
1. Open the /etc/cloud/cloud.cfg file.
vi /etc/cloud/cloud.cfg
2. Enter i and configure network. (If there is no such a configuration item, add it.)
network:
config: disabled
- Restart Cloud-Init and check its status.
systemctl restart cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
- Enable Cloud-Init related services to automatically start upon system boot.
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
- Check the Cloud-Init version and whether Cloud-Init is running properly.
cloud-init -v
cloud-init init --local
- SUSE Enterprise Linux Server 15
Ensure that Python 3 has been installed.
- View existing SUSE repositories.
zypper lr
- Delete the SUSE repositories.
zypper rr repositories listed in 1
- Configure a SUSE repository.
zypper ar https://ftp5.gwdg.de/pub/opensuse/repositories/Cloud:/Tools/SLE_15_SP4/Cloud:Tools.repo
- Refresh the SUSE repository.
zypper refresh
- Install Cloud-Init.
zypper install cloud-init
- Run cloud-init -v. If error messages similar to the following are displayed, install the dependency packages.

pip install requests pyyaml oauthlib jsonschema jsonpatch jinja2 configobj
- Check whether Cloud-Init is successfully installed. If the following error message is displayed, configure datasource_list in /etc/cloud/cloud.cfg.
datasource_list: [ OpenStack ]
datasource:
OpenStack:
metadata_urls: ['http://169.254.169.254']
max_wait: 120
timeout: 5
apply_network_config: false
- Modify the configuration file, restart Cloud-Init, and check the Cloud-Init status.
systemctl restart cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
systemctl status cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service
- Enable Cloud-Init related services to automatically start upon system boot.
systemctl enable cloud-init-local.service cloud-init.service cloud-config.service cloud-final.service

- Check the Cloud-Init version and whether Cloud-Init is running properly.
cloud-init -v
cloud-init init --local
Configure Cloud-Init
- Enable SSH authentication and remote password login for user root.
Take CentOS 6.7 as an example. If
disable_root in the
/etc/cloud/cloud.cfg file is
0,
root login is enabled. (In some OSs,
true indicates disabled and
false indicates enabled). Set
ssh_pwauth to
1 (indicating remote password login is enabled) and
lock_passwd to
False (indicating that user passwords are not locked).
users:
- name: root
lock_passwd: False
disable_root: 0
ssh_pwauth: 1
- If you inject a password, use it for remote login through SSH or noVNC.
- If you inject a key, use it for remote login through SSH.
- Modify the /etc/cloud/cloud.cfg file to disable Cloud-Init's network configuration capability.
If the Cloud-Init version is 0.7.9 or later, add the following content to /etc/cloud/cloud.cfg:
Figure 1 Disabling Cloud-Init's network configuration capability
The added content must be in YAML format.
- Enable the agent to access the IaaS OpenStack data source.
Add the following content to the last line of
/etc/cloud/cloud.cfg:
datasource_list: [ OpenStack ]
datasource:
OpenStack:
metadata_urls: ['http://169.254.169.254']
max_wait: 120
timeout: 5
apply_network_config: false
- Add the following content to /etc/cloud/cloud.cfg:
manage_etc_hosts: localhost
This prevents the system from staying in the Waiting for cloudResetPwdAgent state for a long time during VM startup.
Figure 2 Adding manage_etc_hosts: localhost
- Run vi /etc/ssh/sshd_config to open the /etc/ssh/sshd_config file using the vi editor.
Change the value of
PasswordAuthentication in the
sshd_config file to
yes.
For SUSE and openSUSE, change the values of the following parameters in the sshd_config file to yes:
- PasswordAuthentication
- ChallengeResponseAuthentication
- Modify cloud_init_modules in the cloud.cfg configuration file.
- Modify the configuration so that the hostname of the ECSs created from the image does not contain the .novalocal suffix and can contain a dot (.).
- Modify the __init__.py file.
vi /usr/lib/python*.*/site-packages/cloudinit/sources/__init__.py
The Python version varies depending on the OS.
Press i to enter editing mode. Modify the file content as follows based on the keyword toks:
if toks:
toks = str(toks).split('.')
else:
#toks = ["ip-%s" % lhost.replace(".", "-")] # Comment out this line.
toks = lhost.split(".novalocal") # Add this line.
if len(toks) > 1:
hostname = toks[0]
#domain = '.'.join(toks[1:]) # Comment out this line.
else:
hostname = toks[0]
if fqdn and domain != defdomain:
return hostname
#return "%s.%s" % (hostname, domain) # Comment out this line.
else:
return hostname
After the modification is complete, press Esc to exit the editing mode and enter :wq! to save the settings and exit.
- Go to the cloudinit/sources directory.
cd /usr/lib/python*.*/site-packages/cloudinit/sources/
The Python version varies depending on the OS.
- Delete the __init__.pyc file and the optimized and compiled __init__.pyo file.
rm -rf __init__.pyc
rm -rf __init__.pyo
- Clear logs.
rm -rf /var/lib/cloud/*
rm -rf /var/log/cloud-init*
Delete all files except log-related configuration files from the /etc/cloud/cloud.cfg.d/ directory.
- Modify the /etc/cloud/cloud.cfg.d/05_logging.cfg file to use cloudLogHandler to process logs.
vim /etc/cloud/cloud.cfg.d/05_logging.cfg
[logger_cloudinit]
level=DEBUG
qualname=cloudinit
handlers=cloudLogHandler
propagate=1
- Delete user linux and the /home/linux directory from the image template.
userdel linux
rm -fr /home/linux
- Ensure that Cloud-Init is enabled.
If the /etc/cloud/cloud-init.disabled file exists, run cloud-init clean --machine-id. If there is no such a file, skip this step.
Check the Cloud-Init Configuration
Check whether Cloud-Init has been properly configured.
cloud-init init --local
If Cloud-Init has been properly installed, the version information is displayed and no error occurs. For example, messages indicating lack of files will not be displayed.
(Optional) Set the password validity period of a system user to the maximum.
chage -M 99999 $user_name
user_name is a system user, for example root.
You are advised to set the password validity period to 99999.
(Optional) Install the One-Click Password Reset Plug-In
To ensure that you can reset the password of each ECS created from the image with a few clicks, you are advised to install the one-click password reset plug-in (CloudResetPwdAgent) on the VM that is used as the image source.
- Download the CloudResetPwdAgent (one-click password reset plug-in) package.
The one-click password reset plug-in can be automatically updated only if an EIP is bound to the VM.
You can download the CloudResetPwdAgent.zip package from:
For 32-bit OSs: http://ap-southeast-1-cloud-reset-pwd.obs.ap-southeast-1.myhuaweicloud.com/linux/32/reset_pwd_agent/CloudResetPwdAgent.zip
For 64-bit OSs: http://ap-southeast-1-cloud-reset-pwd.obs.ap-southeast-1.myhuaweicloud.com/linux/64/reset_pwd_agent/CloudResetPwdAgent.zip
- Decompress CloudResetPwdAgent.zip.
unzip -o -d output-directory CloudResetPwdAgent.zip
There is no special requirement for the directory that stores the decompressed CloudResetPwdAgent.zip. You can choose a directory as you need. If the directory is /home/PwdAgent/test, the command is as follows:
unzip -o -d /home/PwdAgent/test CloudResetPwdAgent.zip
- Install the one-click password reset plug-in.
- Open the CloudResetPwdAgent.Linux file.
cd CloudResetPwdAgent/CloudResetPwdAgent.Linux
- Add the execute permission for the setup.sh file.
chmod +x setup.sh
- Install the plug-in.
sudo sh setup.sh
If "cloudResetPwdAgent install successfully" is displayed and "Failed to start service cloudResetPwdAgent" is not displayed, the installation is successful.
If the installation failed, check whether the installation environment meets the requirements and install the plug-in again.
Configure NetworkManager
Linux allows you to use NetworkManager to automatically configure the VM network. You are advised to use NetworkManager for new OS versions. Alternatively, you can use the native network service of the OS.
Red Hat, Oracle, CentOS 6.x, CentOS 7.x, EulerOS 2.x, Fedora 22, or Later
Install NetworkManager and use it for automatic network configuration.
- Install NetworkManager.
yum install NetworkManager
- Delete ifcfg-eth1 to ifcfg-eth11 from the /etc/sysconfig/network-scripts/ directory and retain only ifcfg-eth0.
- Disable the network service.
service network stop
- Disable automatic startup of the network service.
chkconfig network off
- Restart MessageBus and NetworkManager and enable NetworkManager to start automatically at system startup.
service messagebus restart
service NetworkManager restart
chkconfig NetworkManager on
Debian 9.0 or Later
Install NetworkManager and use it for automatic network configuration.
- Install NetworkManager.
apt-get install network-manager
- In the /etc/NetworkManager/NetworkManager.conf file, change the value of managed to true.
- Modify /etc/network/interfaces and retain only eth0.
- Disable the network service, restart MessageBus and NetworkManager, and enable NetworkManager to start automatically at system startup.
service network-manager restart
chkconfig network-manager on
service networking stop
service messagebus restart
service network-manager restart
Ubuntu 14 or Later
Install NetworkManager and use it for automatic network configuration.
- Install NetworkManager.
apt-get install network-manager
- In the /etc/NetworkManager/NetworkManager.conf file, change the value of managed to true.
- Modify /etc/network/interfaces and retain only eth0.
- Disable the network service.
service networking stop
- Disable automatic startup of the network service.
chkconfig network off
- Restart D-Bus and NetworkManager.
service dbus restart
service network-manager restart
SUSE 11 SP3 and openSUSE 13 or Later
Install NetworkManager and use it for automatic network configuration.
- Delete ifcfg-eth1 to ifcfg-eth11 from the /etc/sysconfig/network-scripts/ directory and retain only ifcfg-eth0.
- Install NetworkManager.
zypper install NetworkManager
- Start YaST, choose Network Devices in the navigation pane on the left, and select Network Settings in the right pane. In the Network Setup Method area of the Global Options page, change Traditional Method with ifup to User Controlled with NetworkManager.