<commit_before>// Module included in the following assemblies:
//
// * windows_containers/creating_windows_machinesets/byoh-windows-instance.adoc

[id="configuring-byoh-windows-instance"]
= Configuring BYOH Windows instance

Creating a BYOH Windows instance requires creating a config map in the WMCO namespace.

.Prerequisites
Any Windows instances that are to be attached to the cluster as a node must fulfill the following requirements:

* The Docker container runtime must be installed on the instance.
* The instance must be on the same network as the Linux worker nodes in the cluster.
* Port 22 must be open and running an SSH server.
* The default shell for the SSH server must be the link:https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration#configuring-the-default-shell-for-openssh-in-windows[Windows Command shell], or `cmd.exe`.
* Port 10250 must be open for log collection.
* An administrator user is present with the private key used in the secret set as an authorized SSH key.
* The hostname of the instance must follow the link:https://datatracker.ietf.org/doc/html/rfc1123[RFC 1123] DNS label requirements, which include the following standards:
** Contains only lowercase alphanumeric characters or '-'.
** Starts with an alphanumeric character.
** Ends with an alphanumeric character.

.Procedure
. Create a ConfigMap named `windows-instances` in the WMCO namespace that describes the Windows instances to be added.
+
[NOTE]
====
Format each entry in the config map's data section by using the address as the key while formatting the value as `username=<username>`.
====
+
.Example config map
[source,yaml]
----
kind: ConfigMap
apiVersion: v1<commit_msg>Add prereq for BYOH Windows nodes on vSphere<commit_after>// Module included in the following assemblies:
//
// * windows_containers/creating_windows_machinesets/byoh-windows-instance.adoc

[id="configuring-byoh-windows-instance"]
= Configuring BYOH Windows instance

Creating a BYOH Windows instance requires creating a config map in the WMCO namespace.

.Prerequisites
Any Windows instances that are to be attached to the cluster as a node must fulfill the following requirements:

* The Docker container runtime must be installed on the instance.
* The instance must be on the same network as the Linux worker nodes in the cluster.
* Port 22 must be open and running an SSH server.
* The default shell for the SSH server must be the link:https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration#configuring-the-default-shell-for-openssh-in-windows[Windows Command shell], or `cmd.exe`.
* Port 10250 must be open for log collection.
* An administrator user is present with the private key used in the secret set as an authorized SSH key.
* If you are creating a BYOH Windows instance on vSphere, communication with the internal API server must be enabled.
* The hostname of the instance must follow the link:https://datatracker.ietf.org/doc/html/rfc1123[RFC 1123] DNS label requirements, which include the following standards:
** Contains only lowercase alphanumeric characters or '-'.
** Starts with an alphanumeric character.
** Ends with an alphanumeric character.

.Procedure
. Create a ConfigMap named `windows-instances` in the WMCO namespace that describes the Windows instances to be added.
+
[NOTE]
====
Format each entry in the config map's data section by using the address as the key while formatting the value as `username=<username>`.
====
+
.Example config map
[source,yaml]
----
kind: ConfigMap
apiVersion: v1
{'fraction_non_alphanumeric': 0.07212475633528265, 'fraction_numerical': 0.008911166805903648, 'mean_word_length': 4.802907915993538, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4306619', 'n_tokens_mistral': 991, 'n_tokens_neox': 933, 'n_words': 441}