How-To Create Custom User in Windows Using Cloudbase-init

Problem

You want to create a custom user when creating a Windows-based VM that has Cloudbase-Init.

Environment

  • Platform9 Managed OpenStack - All versions.

  • Nova

  • Cloudbase-Init

Procedure

  1. Create a user data file as follows:

# cat /root/user_datarem cmdnet user chinmay Platf0rm9! /addnet localgroup administrators chinmay /add
  1. Create the instance using the CLI or GUI.

- If using GUI, paste the contents of the user_data file in the cloud-config section of the Instance creation wizard.

- If using CLI, run the following command.

# openstack server create --image [Image_UUID] --net [Network_UUID] --flavor [Flavor_UUID] --user-data [path to user_data file] [instance_name]

Last updated