Skip to content

Create your first Windows instance

You have created an Infomaniak Public Cloud project and sourced your credentials ? Then you are ready to create your first Windows instance !

Before you start

Warning

Keypair for Windows must be in OPENSSL RSA format. Any other formats are not supported and will not be able to encode/decode the Windows Administrator password.

You can generate a keypair by following this tutorial.

Warning

If you want to use fixed IP addresses on your Windows instances in a private subnet, you must leave the DHCP function enabled in the subnet. Without DHCP in the subnet, the route to the metadata server is not provided to the instance. As a result, the instance cannot store the password generated at first boot in the metadata server, and the instance will be unusable.

To configure fixed IP addresses, you must first declare a network port with a fixed IP address, then assign it to your instance.

Create a keypair

A keypair is basically a ssh key allowing you to login to your instance.

You can either import your existing ssh key or create a new one. You can refer to this guide

Create an instance

Choose a flavor

openstack flavor list
+--------------------------------------+----------------------------+------+------+-----------+-------+-----------+
| ID                                   | Name                       |  RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+----------------------------+------+------+-----------+-------+-----------+
| 21aad244-a330-4e79-ba80-4c057cf742f9 | a1-ram2-disk20-perf1       |  2048 |   20 |         0 |     1 | True     |
| 7918af3e-aa2a-4aa4-976d-9056490a4654 | a4-ram8-disk20-perf1       |  8192 |   20 |         0 |     4 | True     |
| a1d6e394-e4db-486b-8091-5d95cfbf3952 | a12-ram24-disk20-perf1     | 24576 |   20 |         0 |    12 | True     |
| a35c6646-0f3c-464b-b50d-2a76cad0bd7b | a16-ram32-disk20-perf1     | 32768 |   20 |         0 |    16 | True     |
...
| b6b7baeb-2328-48c9-8543-88cccec8ec4b | a2-ram4-disk20-perf1       |  4096 |   20 |         0 |     2 | True     |
| cd0483a8-ca2a-466b-89b2-f8d0d005408a | a8-ram16-disk20-perf1      | 16384 |   20 |         0 |     8 | True     |
+--------------------------------------+----------------------------+------+------+-----------+-------+-----------+

Choose an image (Operating System)

openstack image list
+--------------------------------------+----------------------------------+--------+
| ID                                   | Name                             | Status |
+--------------------------------------+----------------------------------+--------+
| 35b2590b-a152-40da-b977-1049b8cfcb97 | Alpine Linux 3                   | active |
| c25fa783-8d27-496e-a133-026b428a3a4e | Amazon Linux 2                   | active |
| 74202036-aa64-45e9-ae91-1a17ef488e81 | Arch Linux                       | active |
| d423d0b0-f730-457f-9159-be88ce60e943 | CentOS 7                         | active |
...
| ff2e2c2f-20d1-49f8-990b-c18e5ccdded5 | Ubuntu 22.04 LTS Jammy Jellyfish | active |
| d5d7324d-885f-4d0c-b51c-69a005188ede | Windows Server 2019 Datacenter   | active |
| d56eaf8b-bde4-461d-95c8-7a17e71c8d77 | Windows Server 2019 Standard     | active |
| 12d9952b-b656-402d-b012-20b16fee193d | Windows Server 2022 Datacenter   | active |
| 824aac1f-a860-4ba1-b7d2-e0307217f5c0 | Windows Server 2022 Standard     | active |
| 508db510-1c22-4fd2-af36-538ca2ca5d5f | openSUSE Leap 15 JeOS            | active |
+--------------------------------------+----------------------------------+--------

Create your instance

openstack server create --image "Windows Server 2022 Datacenter" --flavor a4-ram8-disk20-perf1 --key-name windows-keypair --network ext-net1 windows-server-vm-1
+-----------------------------+-----------------------------------------------------------------------+
| Field                       | Value                                                                 |
+-----------------------------+-----------------------------------------------------------------------+
| OS-DCF:diskConfig           | MANUAL                                                                |
| OS-EXT-AZ:availability_zone |                                                                       |
| OS-EXT-STS:power_state      | NOSTATE                                                               |
| OS-EXT-STS:task_state       | scheduling                                                            |
| OS-EXT-STS:vm_state         | building                                                              |
| OS-SRV-USG:launched_at      | None                                                                  |
| OS-SRV-USG:terminated_at    | None                                                                  |
| accessIPv4                  |                                                                       |
| accessIPv6                  |                                                                       |
| addresses                   |                                                                       |
| config_drive                |                                                                       |
| created                     | 2023-05-25T08:12:34Z                                                  |
| flavor                      | a4-ram8-disk20-perf1 (7918af3e-aa2a-4aa4-976d-9056490a4654)           |
| hostId                      |                                                                       |
| id                          | a440ef37-006e-4f0d-8f51-d2f0cf3cddb5                                  |
| image                       | Windows Server 2022 Datacenter (12d9952b-b656-402d-b012-20b16fee193d) |
| key_name                    | windows-keypair                                                       |
| name                        | windows-server-vm-1                                                   |
| progress                    | 0                                                                     |
| project_id                  |                                                                       |
| properties                  |                                                                       |
| security_groups             | name='default'                                                        |
| status                      | BUILD                                                                 |
| updated                     | 2023-05-25T08:12:35Z                                                  |
| user_id                     |                                                                       |
| volumes_attached            |                                                                       |
+-----------------------------+-----------------------------------------------------------------------+

Check your instance is active

openstack server show windows-server-vm-1
+-------------------------------------+-----------------------------------------------------------------------+
| Field                               | Value                                                                 |
+-------------------------------------+-----------------------------------------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                                                |
| OS-EXT-AZ:availability_zone         | dc3-a-10                                                              |
| OS-EXT-SRV-ATTR:instance_name       | instance-000b129f                                                     |
| OS-EXT-STS:power_state              | Running                                                               |
| OS-EXT-STS:task_state               | None                                                                  |
| OS-EXT-STS:vm_state                 | active                                                                |
| OS-SRV-USG:launched_at              | 2023-05-25T08:14:31.000000                                            |
| OS-SRV-USG:terminated_at            | None                                                                  |
| accessIPv4                          |                                                                       |
| accessIPv6                          |                                                                       |
| addresses                           | ext-net1=195.15.255.141, 2001:1600:10:100::87e                        |
| config_drive                        | True                                                                  |
| created                             | 2023-05-25T08:12:34Z                                                  |
| flavor                              | a4-ram8-disk20-perf1 (7918af3e-aa2a-4aa4-976d-9056490a4654)           |
| hostId                              |                                                                       |
| id                                  | a440ef37-006e-4f0d-8f51-d2f0cf3cddb5                                  |
| image                               | Windows Server 2022 Datacenter (12d9952b-b656-402d-b012-20b16fee193d) |
| key_name                            | windows-keypair                                                       |
| name                                | windows-server-vm-1                                                   |
| progress                            | 0                                                                     |
| project_id                          |                                                                       |
| properties                          |                                                                       |
| security_groups                     | name='default'                                                        |
| status                              | ACTIVE                                                                |
| updated                             | 2023-05-25T08:15:57Z                                                  |
| user_id                             |                                                                       |
| volumes_attached                    |                                                                       |
+-------------------------------------+-----------------------------------------------------------------------+

Firewall

By default, no incoming traffic is allowed to your instance but the outgoing traffic is allowed.

To allow the RDP connection you have to add a rule to the default security group this way :

openstack security group rule create --ingress --protocol tcp --dst-port 3389 --ethertype IPv4 default

More information is available here

01-wininst.png

Name your instance

02-wininst.png

Choose an image (Operating System)

03-wininst.png

Choose a flavor

04-wininst.png

Select a network

05-wininst.png

Add a security group

06-wininst.png

Retrieve administrator password

With Windows instances, you can not log in with SSH. You must use RDP client with login and password combination.

The default username is Administrator.
The password is generated during the first boot sequence of the instance.

To retrieve it, get the private key you have used during the deployment process and follow these instructions :

Install or verify you have nova-client installed:

pip install python-novaclient
Retrieve instance password:
nova get-password  <INSTANCE_ID> <PRIVATE_KEY_FILE>
If you do not want to install the nova client, you may use the OpenStack Dashboard or check this convenient tool.

Select your instance and click on Retrieve Password :

07-wininst.png

Select your private key and copy the password :

08-wininst.png

Info

The private key is not uploaded to any servers. The decryption is done by your browser only.