See also: WSL API methods
This document is for Landscape beta.
You must have a Windows host machine registered with Landscape before making any Windows Subsystem for Linux (WSL) instances. To register a new WSL host with Landscape, visit how to register WSL hosts to Landscape.
This guide describes how to create and register new WSL instances to Landscape.
Only one instance of each Ubuntu image can be created per Windows host machine using the web portal.
You can register new WSL instances from the Landscape web portal. To do this:
- Navigate to the Computers page in the header
- Click the name of the Windows machine that will host the new WSL instance
- Click Install new above the WSL Instances table
- Select the Ubuntu image that will be installed on the new WSL instance under Instance Type
- Click Submit
Once this process is complete, your new WSL instance will appear in the Select computers list and in the Windows host machine’s Info tab.
You can register new WSL instances via the Landscape API. To register new WSL instances with Landscape, make an API call such as:
parent_id is assigned by Landscape. You assign
computer_name as the name of the child computer you’re creating. If you don’t know the ID of your parent computer, visit how to get computer IDs.
Cloud-init configuration isn’t supported yet by Ubuntu Pro for Windows. This feature is planned in a future beta release.
To register new WSL instances based on cloud-init configurations, make an API call such as:
?action=CreateChildComputer&parent_id=20&computer_name=Ubuntu&cloud_init=<b64 encoded cloud_init file>
If your cloud-init file is not located in a vault, you can specify it in
cloud_init. If it’s located in a vault, you can specify the name of the vault secret in
data_id and the authentication token to be passed to the secrets manager in
Specifying both a cloud-init file and a vault secret will result in an error.