Configuring the ECS and Creating a Windows Private Image

Scenarios

This section describes how to configure and install drivers on the Windows ECS and create a Windows BMS image.

Procedure

  1. Configure the Windows ECS.

    For details, see Configuring the VM Environment.

  2. Install Cloudbase-Init

    For details, see Installing and Configuring Cloudbase-Init. You can download the installation package from https://bms-image-package.obs.cn-north-1.myhuaweicloud.com/windows/cloudbase_init/CloudbaseInitSetup_x64.msi.

    After the installation is successful, perform the following steps to edit the Cloudbase-Init configuration file:

    Use a text editor (such as Notepad) to open the C:\Program Files\Cloudbase Solutions\Cloudbase-Init\conf file and edit the file as follows:

    1. Create user administrator and add it to a group. Modify the following parameters:
      username=Administrator
      groups=Administrators
    2. Configure hostname and modify the following parameter (if it does not exist, add it):
      netbios_host_name_compatibility=false
    3. Locate and modify logging_serial_port_settings as follows:
      logging_serial_port_settings=COM1,115200,N,8
    4. Add parameter metadata_services and configure the loaded services as follows:
      metadata_services=cloudbaseinit.metadata.services.httpservice.HttpService,cloudbaseinit.metadata.services.configdrive.ConfigDriveService
    5. Add parameter plugins and configure the modules to be loaded. Separate different modules with commas (,). The information in bold is the keyword of each module.
      The following is an example of the Cloudbase-Init file content:
      plugins=cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin,cloudbaseinit.plugins.common.mtu.MTUPlugin,cloudbaseinit.plugins.windows.createuser.CreateUserPlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.common.sshpublickeys.SetUserSSHPublicKeysPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin,cloudbaseinit.plugins.windows.winrmlistener.ConfigWinRMListenerPlugin,cloudbaseinit.plugins.windows.winrmcertificateauth.ConfigWinRMCertificateAuthPlugin,cloudbaseinit.plugins.windows.licensing.WindowsLicensingPlugin

      Functions of the modules are as follows:

      • LocalScriptsPlugin: sets the scripts.
      • MTUPlugin: sets the MTU network ports.
      • CreateUserPlugin: creates a user.
      • SetUserPasswordPlugin: sets the password.
      • SetUserSSHPublicKeysPlugin: sets the private key.
      • SetHostNamePlugin: sets the hostname.
      • ExtendVolumesPlugin: partitions the disks.
      • UserDataPlugin: injects user data.
      • ConfigWinRMListenerPlugin: sets listening to remote login.
      • ConfigWinRMCertificateAuthPlugin: sets remote login without the password authentication.
      • WindowsLicensingPlugin: activates window instances.
  3. Install the bms-network-config software package, SDI iNIC driver, and one-click password reset plug-in, and configure the Windows time zone and virtual memory.

    For details about the drivers to be installed, see Mappings Between BMS Flavors and Drivers. For details about how to download the drivers, see Preparing Required Hardware and Software.

  4. Create a Windows ECS system disk image.

    For details, see Creating a System Disk Image from a Windows ECS.

  5. Export the system disk image created in 4 in ZVHD2 format to an OBS bucket.

    For details, see Exporting Images.

  6. Use the image file exported in 5 to create a BMS private image.

    For details, see Creating a Private Image from an External Image File.

You can use the created Windows private image to create BMSs.