Créer une instance sous Windows
This is not a complete article: This is a Draft, a work in progress that is intended to be published into an article, which may or may not be ready for inclusion in the main wiki. It should not necessarily be considered factual or authoritative.
It is possible to create a Windows VM in the Compute Canada cloud, however, Compute Canada does not provide licenses for those Windows VMs. Upon request, a Windows Server 2012 Evaluation image can be made available for evaluations purposes only, for a period of 180 days. When you request access to the Windows image you will also be provided with a username to use when connecting to the VM. The process of creating a Windows VM is very similar to the process for creating a Linux VM with some notable differences. If you have not yet created a VM before I would suggest first learning to create some Linux based VMs and then return to these instructions once you are comfortable with the process of creating VMs.
To create a Windows VM the basic steps are as follows:
- Click Launch Instance as usual
- Select the Instance Boot Source, should be either Boot form image or Boot from image (creates a new volume)
- Select the Windows image you have been given access to. Note there maybe other Windows images available on the clouds which were not provided by CC staff, use with caution.
- If booting from a volume choose a Device size of 30 GB or more
- Select a public key to use for encrypting the password (see notes about key pairs to ensure your key pair will work)
- Set any other usual settings for your VM (e.g. flavor, security group, etc.) and click Launch
- Associate a floating IP with the VM
- Wait for the volume creation to finish and the VM to start running
- On initial boot there are additional localization settings that need to be set through the Console tab
- Wait for reboot to complete, will see a line containing
INFO cloudbaseinit.init [-] Stopping Cloudbase-Init serviceon the log tab once reboot has completed
- Retrieve the password form the VM using your private key
- Open the port for Remote Desktop Connection (RDC, port 3389) allowing only the IP of the machine your connecting from
- Connect to the VM using Remote Desktop Connection with the provided username, and your decrypted password
When creating a Windows VM, as when creating a Linux VM, a key-pair is required. However, this key pair is used to encrypt and decrypt a password used to access the Windows VM rather than directly as a method of authentication. There are a couple different formats for key files and you can also choose to protect your private keys with passphrases or not. In order to be able to decrypt the Windows VM password your private key must be in OpenSSH format and not have a passphrase. If you created your key-pair with OpenStack and downloaded the
.pem key file it will already be in the correct format. If you used the
ssh-keygen command to create your key-pair and didn't specify a passphrase it will also likely be in the correct format. For more general information about key-pairs see the SSH Keys page.
Acceptable private key
OpenSSH format without a passphrase:
-----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEAvMP5ziiOw9b5XMZUphATDZdnbFPCT0TKZwOI9qRNBJmfeLfe ... DrzXjRpzmTb4D1+wTG1u7ucpY04Q3KHmX11YJxXcykq4l5jRZTKj -----END RSA PRIVATE KEY-----
... in the middle indicates multiple lines of characters similar to those above and below it.
Unacceptable private keys
OpenSSH format with a passphrase:
-----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: DES-EDE3-CBC,CA51DBE454ACC89A 0oXD+6j5aiWIwrNMiGYDqoD0OqlURfKeQhy//FwHuyuithOSI8uwjSUqV9BM9vi1 ... 8XaBb/ALqh8zLQOXEUuTstlMWXnhzBWLvu7tob0QN7pI16g3CXuOag== -----END RSA PRIVATE KEY-----
ssh.com format without a passphrase
---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ---- Comment: "rsa-key-20171130" P2/56wAAA+wAAAA3aWYtbW9kbntzaWdue3JzYS1wa2NzMS1zaGExfSxlbmNyeXB0e3JzYS ... QJX/qgGp0= ---- END SSH2 ENCRYPTED PRIVATE KEY ----