(Optional) Installing the bms-network-config Software Package

Scenarios

Install the bms-network-config software package to work with Cloud-Init for the network configuration of the BMSs with centralized BMGW. For the BMSs with distributed BMGW (that is, BMSs with SDI 3.0 cards or SDI 2.2 iNICs), you do not need to perform operations in this section.

Prerequisites

  • You have logged in to the VM.
  • Cloud-Init has been installed.
  • The bms-network-config software package (RPM package of the corresponding OS, which is deb package for Ubuntu) has been downloaded based on Preparing Required Hardware and Software and uploaded to the VM.

Procedure

The procedure for XenServer is different from other OSs. For details, see Procedure (XenServer).

  1. Enter the directory where the bms-network-config installation package is stored and run the following command:

    rpm -ivh bms-network-config-1.0-7.centosRedhat7.x86_64.rpm

    [root@localhost r74]# rpm -ivh bms-network-config-1.0-7.centosRedhat7.x86_64.rpm
    Preparing...                          ############################### [100%]            
    Updating / installing...
       1:bms-network-config-1.0.7.centosRe############################### [100%]

    If the error shown in the following figure is displayed when you install bms-network-config for SUSE 12, run the rpm -ivh bms-network-config-1.0-9.suse12.x86_64.rpm --nodeps --force command.

    Run the dpkg -i xxx command to install Ubuntu or Debian (xxx indicates the name of the deb package).

    root@ubuntu:~/file# dpkg -i bms-network-config-1.0.7.ubuntu1604-918.deb
    Selecting previously unselected package bms-network-config.
    (Reading database ... 97630 files and directories currently installed.)
    Preparing to unpack bms-network-config-1.0.7.ubuntu1604-918.deb ...
    Unpacking bms-network-config (1.0) ...
    Setting up bms-network-config (1.0) ...
    root@ubuntu:~/file# dpkg -s bms-network-config

    Use the name of the rpm package at your site.

  2. After the installation is complete, run the rpm -qa | grep bms-network-config command. The installation is successful if information similar that shown in the following figure is displayed.
    [root@localhost r74]# rpm -qa | grep bms
    bms-network-config-1.0.7.centosRedhat7.x86_64

    For Ubuntu or Debian, run the dpkg -s bms-network-config command to query the installation process.

  3. Query the status of the bms-network-config service.
    • For Oracle Linux 7, Red Hat 7, CentOS 7, Ubuntu 16.04, SUSE 12, and EulerOS, run the service bms-network-config status command to query the status of the service. If the service is not at enabled status, run the systemctl enable bms-network-config command to enable the service.
      [root@localhost r74]# service bms-network-config status
      Redirecting to /bin/systemctl status bms-network-config.service
        bms-network-config.service - Network Config
        Loaded: loaded (/usr/lib/systemd/system/bms-network-config service; enabled vendor preset: disabled)
        Active: inactive (dead)
    • For Red Hat 6, CentOS 6, SUSE 11 SP4, Oracle Linux 6.8 and Oracle Linux 6.9, run the chkconfig --list | grep bms-network-config command to query the status of the service. If the service is not at on status, run the chkconfig bms-network-config on command to enable the service.
      [root@localhost r69]# chkconfig --list | grep bms
      bms-network-config   0:off   1:off   2:on   3:on   4:off   5:on   6:off
    • For Ubuntu 14.04 or Debian, run the initctl status bms-network_config command to query the status of the service.
      root@ubuntu:~# initctl status bms-network_config
      bms-network_config stop/waiting
  4. Check the startup dependencies between bms-network-config and other services.

    Run the systemctl cat bms-network-config command to check the configuration file and ensure that the file content is as follows:

    [Unit]
    Description=NetworkConfig
    DefaultDependencies=no
    After=dbus.service
    Wants=dbus.service
    Before=cloud-init-local.service network-pre.target
    
    [Service]
    Type=oneshot
    ExecStart=/usr/bin/bms-network_config rhel
    RemainAfterExit=yes
    TimeoutSec=0
    
    [Install]
    WantedBy=multi-user.target

    If the startup sequence is incorrect, use the vim /usr/lib/systemd/system/bms-network-config.service command to correct it.

Procedure (XenServer)

  1. Extract xenserver-bms-config.zip from bms-network-config.
  2. Create the /opt/huawei directory and put GetVpcNicMac.sh, unique-uuid-config.sh, and xenserver-bms-network-config.sh in this directory. Run the chmod +x File name command to set execute permissions for the three scripts.
  3. Put the xenserverInit.service file in the /usr/lib/systemd/system/ directory and run the systemctl daemon-reload command to update system services.