tencent cloud

Feedback

Installing Cloudbase-Init on Windows

Last updated: 2024-01-08 09:37:01

    Overview

    This document describes how to install Cloudbase-Init on the Windows Server 2012 R2 64-bit operating system.

    Required Software

    The following table describes the software required for installing Cloudbase-Init.
    Software
    Download Link
    Description
    CloudbaseInitSetup_X_X_XX_xXX.msi
    Download the Cloudbase-Init installation package based on the operating system used.
    Stable version (recommended)
    Windows 64-bit operating system: Click here to download the installation package.
    Windows 32-bit operating system: Click here to download the installation package.
    Beta version
    For details, see the Cloudbase-Init official website.
    Used to install Cloudbase-Init
    TencentCloudRun.ps1
    Click here to download the installation package.
    -
    localscripts.py
    Click here to download the installation package.
    Used to ensure that Cloudbase-Init starts properly

    Directions

    Installing Cloudbase-Init

    1. On the desktop, double-click the Cloudbase-Init installation package.
    2. In the dialog box, click Run to enter the Cloudbase-Init setup wizard, as shown below:
    
    
    3. Click Next.
    4. Check “I accept the terms in the License Agreement” and click Next for the following two operations.
    5. On the Configuration options page, set Serial port for logging to COM1, select Run Cloudbase-Init service as LocalSystem and click Next, as shown below:
    
    
    6. Click Install.
    7. When the installation is completed, click Finish to close the Cloudbase-Init setup wizard, as shown below:
    Note:
    When closing the Cloudbase-Init setup wizard, do not check any checkbox or run Sysprep.
    
    
    

    Modifying the Cloudbase-Init configuration file

    1. Open the cloudbase-init.conf configuration file. The cloudbase-init.conf configuration file is saved in C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\conf by default.
    2. Replace content in the cloudbase-init.conf configuration file with the following:
    [DEFAULT]
    username=Administrator
    groups=Administrators
    inject_user_password=true
    config_drive_raw_hhd=true
    config_drive_cdrom=true
    config_drive_vfat=true
    bsdtar_path=C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\bin\\bsdtar.exe
    mtools_path=C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\bin\\
    san_policy=OnlineAll
    metadata_services=cloudbaseinit.metadata.services.configdrive.ConfigDriveService,cloudbaseinit.metadata.services.ec2service.EC2Service
    #,cloudbaseinit.metadata.services.httpservice.HttpService
    #,cloudbaseinit.metadata.services.maasservice.MaaSHttpService
    metadata_base_url=http://169.254.0.23/
    ec2_metadata_base_url=http://169.254.0.23/
    retry_count=2
    retry_count_interval=5
    plugins=cloudbaseinit.plugins.windows.extendvolumes.ExtendVolumesPlugin,cloudbaseinit.plugins.common.networkconfig.NetworkConfigPlugin,cloudbaseinit.plugins.common.sethostname.SetHostNamePlugin,cloudbaseinit.plugins.common.setuserpassword.SetUserPasswordPlugin,cloudbaseinit.plugins.common.localscripts.LocalScriptsPlugin,cloudbaseinit.plugins.common.userdata.UserDataPlugin
    verbose=true
    debug=true
    logdir=C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\log\\
    logfile=cloudbase-init.log
    default_log_levels=comtypes=INFO,suds=INFO,iso8601=WARN,requests=WARN
    #logging_serial_port_settings=COM1,115200,N,8
    mtu_use_dhcp_config=true
    ntp_use_dhcp_config=true
    first_logon_behaviour=no
    netbios_host_name_compatibility=false
    allow_reboot=true
    activate_windows=true
    kms_host="kms.tencentyun.com"
    local_scripts_path=C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\LocalScripts\\
    C:\\powershell
    PS C:\\Set-ExecutionPolicy Unrestricted
    volumes_to_extend=1,2
    3. Copy the TencentCloudRun.ps1 script to C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\LocalScripts.
    4. Right-click the TencentCloudRun.ps1 script, select Properties, and check for its executable permission in the pop-up window, as shown below:
    
    
    Check Unblock and click OK.
    Skip this step if the Unblock option does not exist.
    5. Replace localscripts.py in C:\\Program Files\\Cloudbase Solutions\\Cloudbase-Init\\Python\\Lib\\site-packages\\cloudbaseinit\\plugins\\common with the localscripts.py file in Required Software.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support