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 !

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

Warning

Keypairs must be in RSA format, all others format aren't supported. If you use an other format you can't decode Windows Administrator password. Your private key must also be formated for RSA (BEGIN RSA PRIVATE KEY), OpenSSH or SSH2 key format are not supported (but you can convert them to RSA format).

The private key should look like this:

    -----BEGIN RSA PRIVATE KEY-----
    MIIJKQIBAAKCAgEAoo9YGJvNYLEymtin+SHrzvLTfPkmpX6OWbgPR5JQHcrJax9a
    XhR1qTv3unR/EHMzIaM9joE3muVi6YZWabsHY7+15WqxBGMayEBoaWwhY7ol9/6y
    ...
    eDYxc1NY4xBPuUXUYSCEDCf8D5mz6D9cVI9W0gtFvsTl3vVRMD3bm9xTR9/igbv7
    LKt9BB6FAxMaEzHpV3ZmHJwwhhfmjTnQw9iBmJlVmpeHdx1V3HDLy8M6Msvc
    -----END RSA PRIVATE KEY-----

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

Add your key pair and launch your instance

07-wininst.png

Check your instance

08-wininst.png

Retreive administrator password

With Windows instance you can't login with SSH, you must use RDP client with login and password combinaison. By default the username is Administrator but the password is generated during the first boot sequence of the instance. To retreive it you need the private key you are used during the deployement process and enter these commands:

Install or verify you have nova-client installed:

    pip3 install python-novaclient
Retreive instance password:
    nova get-password  <INSTANCE_ID> <PRIVATE_KEY_FILE>