Creating a Virtual Machine
Please read the GUIDELINES before creating your first VM.
1. Generate an SSH key
You only need to create an SSH key once. This key is used to authenticate to your virtual machine.
It is very important that your private key remains confidential and is never shared with anyone. We strongly recommend protecting your private key with a strong passphrase to prevent unauthorized access.
Open a terminal on your local machine.
macOS / Linux:
ssh-keygen -t ed25519 -C "your-email@example.com"
Press Enter to accept the default location (~/.ssh/id_ed25519). Set a passphrase.
Windows (PowerShell):
ssh-keygen -t ed25519 -C "your-email@example.com"
The public key file is:
- macOS / Linux:
~/.ssh/id_ed25519.pub - Windows:
C:\Users\YourName\.ssh\id_ed25519.pub
Display it (you'll paste it into the cloud-init config in step 3):
cat ~/.ssh/id_ed25519.pub # macOS / Linux
or
Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub" # PowerShell
The output is one line beginning with ssh-ed25519.
2. Create the VM in Xen Orchestra
Click New → VM in the sidebar.
Create a new VM on DACS-Students
Fill in the form:
- Template: template-debian13-student-vm-202608
- Name: your VM's hostname. Please follow the structure:
studentID-nameOfYourVM. The name of your vm must be globally unique. Please do not create virtual machines with the exact same name. - CPU: 2 vCPUs.
- RAM: 2 GB.
- Network: leave the default selection (50-cslab-student-vm). The VM gets an IP automatically.
- Disk size: leave the default selection unless otherwise told.
Do not launch the VM yet, fill in the cloud init configuration.
3. Cloud-init configuration
In the Install settings section of the VM form.
- Select the Custom Config.
- Select Student Cloud Init in the drop down menu.
- Fill in the two placeholders: "USERNAME", "PUB_KEY".
#cloud-config
preserve_hostname: false
hostname: "{name}"
create_hostname_file: true
manage_etc_hosts: true
users:
- default
- name: "USERNAME" # Remove the placeholder USERNAME and change this to your wanted username
gecos: Student
groups: sudo
shell: /bin/bash
sudo: "ALL=(ALL) NOPASSWD:ALL"
lock_passwd: true
ssh_authorized_keys:
- "PUB_KEY" #Remove the PUB_KEY placeholder and replace it with your own public key see step 1.
# DO NOT TOUCH anything below this line
runcmd:
- systemctl enable --now wazuh-agent
Uncheck the box Fast Clone
Click Create.
4. Wait for the VM to finish booting
The VM takes about 1–2 minutes for first boot. During this time:
- Your hostname is set.
- Your user account is created with your SSH key.
You can watch progress in XO under the VM's Console tab.
5. Find your VM's IP address
In XO, open your VM and look at the Network tab. In the IP Addresses field you will find the IPv4 and IPv6 Addresses.
- IPv4 Address will follow this pattern: 145.98.XXX.YYY
- IPv6 Address will follow this pattern: 2001:617:0:50::XXXX:YYYY:XXXX:YYYY
If it's empty, refresh the page or wait another minute.
6. SSH into your VM
From your local terminal - when you only have one ssh key:
ssh your-username@your-vm-ip
otherwise you have to specify your key
ssh -i /path/to/your/private_key your-username@your-vm-ip
The first time, SSH will ask you to verify the host's fingerprint. Type yes.
You will be prompted to enter a passphrase for your key.
Instead using the IP you can also use the FQDN of your vm: studentID-nameOfYourVM.dynamic.fse-cslab.nl, this record is set after the second boot of your VM.
Please note that you can only log in from the eduroam or UMnet network. If you want to connect from outside the UM network, you must first establish a VPN connection.
7. Troubleshooting
| Symptom | Likely cause |
|---|---|
ssh: connect to host … port 22: Connection refused | The VM hasn't finished booting. Wait another minute and try again. |
Permission denied (publickey) | Your public key was malformed in the cloud-init config (often a line break got inserted), or the username doesn't match what you put in cloud-init. |
REMOTE HOST IDENTIFICATION HAS CHANGED! | You re-created a VM at the same IP. Run ssh-keygen -R your-vm-ip to forget the old host key, then try again. |
8. Need help?
If there are any issues get in touch with us and open a ticket trough the ticket system, see ticket info for more information.
Please make sure to include as much information as possible, but at least:
- Your VM's name (from XO).
- Your studentID.
- The exact error you're seeing.
- If you can log in: the output of
hostnameandjournalctl -xe | tail -50.
In order to be able to help you in a timely manner.