Instances (VMs): Difference between revisions

From bwCloud-OS
Jump to navigation Jump to search
No edit summary
 
(89 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{InANutshell|<li>Instances can be '''created''' via the [https://dashboard.bw-cloud.org '''Dashboard'''] wizard, <strong>select: name  → image → flavor → network → SSH key → launch</strong>.</li>
<span id="In-a-Nutshell"></span>
<li>To '''access''' your bwCloud-OS virtual machines, you must register an '''SSH key pair'''  and assign it when creating instances.</li>
{{InANutshell|
<li>Existing instances can be <strong>resized </strong>to larger flavors. Always back up important data beforehand, as the VM will reboot during the process.</li>}}
<li>Instances can be '''created''' via the [https://portal.bw-cloud.org/ '''Dashboard'''] wizard, select: <strong>name  →source → flavor → network → SSH key → launch</strong>.</li>
 
<li>The '''source''' defines the base disk for the instance, usually a pre-configured '''image''' containing the operating system (Rocky, Ubuntu, etc.) and initial software optimized for cloud environments.<li>
<li>The available resources of a virtual machine (vCPU, memory, etc.) are pre-defined by [[Instances_(VMs)#What_are_instance_flavors,_and_which_flavors_are_available?|flavors]]. Choose a '''flavor''' that fits your workload and available [[Projects and Quota#Project Quota|quota]] when launching your instance.</li>
 
<li>To '''access''' your bwCloud-OS virtual machines, you must register an '''SSH key pair'''  and assign it when creating instances. ''If you lose your private SSH key, you will '''lose access''' to your instance!''</li>}}




Line 11: Line 11:
= Creating Instances =
= Creating Instances =


== Create an Instance (via Dashboard GUI) ==
== How do I create a virtual machine using Dashboard (GUI)? ==
In the [https://dashboard.bw-cloud.org '''Dashboard'''], click '''Instances''' in the left-hand menu. On the new page, click the '''Launch Instance.''' A dialog will open, guiding you through the configuration step by step.
<span id="Create-GUI"></span>
 
In the [https://portal.bw-cloud.org/ '''Dashboard'''], click '''Instances''' in the left-hand menu. On the new page, click '''Launch Instance.''' A dialog will open, guiding you through the configuration step by step:


* '''Details''': Enter a meaningful name for your instance.
* '''Details''': Enter a descriptive name for your instance.


* '''Source''': Select a source for the instance (image, snapshot, volume, etc.) — typically a preconfigured image (e.g., ''Debian X''). Use the ↑ arrow to move the image into the ''Allocated'' list.  To remove a selection, click the ↓ arrow.
* '''Source''': Select a source for the instance (image, snapshot, volume, etc.) — typically a [[Images|preconfigured image]] (e.g., ''Debian x''). Use the ↑ arrow to move the source into the ''Allocated'' list.  
* '''Flavor''': Choose a flavor based on your required vCPU, RAM, etc. If your project [[Projects & Quota#Quota|quota]] is insufficient, a yellow warning icon will appear.
* '''Flavor''': Choose a [[Flavors|flavor]] based on your required vCPU, RAM, etc. If your [[Projects and Quota#Project Quota|quota]] is insufficient, a yellow warning icon will appear.
* '''Networks''': Choose a network. Default settings are usually appropriate.
* '''Networks''': Choose a network. Default settings are usually appropriate.
* '''Security Groups''': No changes are required at this point. You can [[Security#Security Groups - Open a port for access|adjust rules]] later if necessary.
* '''Security Groups''': No changes are mandatory at this point. You can [[Security#Security Groups - Open a port for access|adjust rules]] later if necessary.
* '''Key Pair''': Select a registered public SSH key to be injected into the instance. This step is mandatory. Without a valid SSH key, remote access to the instance will not be possible.
* '''Key Pair''': Select a [[Instances (VMs)#SSH-Key|registered public SSH key]] to be injected into the instance. This step is mandatory. Without a valid SSH key, remote access to the instance will not be possible.
 
After completing the required selections, click '''Launch Instance''' in the dialog. Once the instance has finished building and reaches the '''Running''' state, its IP address(es) will be shown in the '''Instances''' overview. You can then [[Instances (VMs)#SSH-Access|access]] the instance via its [[Networks#Will my instance receive a public IP?|''public'' IP address]].
 
If you need further assistance, check out the illustrated guide below.
 
[[Guide: Instance Creation|➡️ Illustrated Instance Creation Guide]]
 
== Can I also create instances automatically? ==
<span id="Create-Auto"></span>


After completing the required selections, click '''Launch Instance''' in the dialog. Once the instance has finished building and reaches the '''Running''' state, its IP address(es) will be shown in the '''Instances''' overview. You can then access the instance via its ''public'' IP address.
Instances can also be deployed automatically using tools like Ansible. Further details are available [[Programmatic Access and Automation#Auto-Deployment|here]].


== Configure an Instance with Ansible ==
It is also possible to create an instance automatically. Details can be found [[Automation & Tools#Prepare an Instance via Ansible|here]].
= Connecting to Instances =
= Connecting to Instances =
== SSH Keys ==
__TOC__
To connect to your virtual machines, you need an SSH key pair. You can either use your own keys or generate new ones via bwCloud-OS. Detailed instructions can be found [[Quickstart: Store SSH key pair|here]].
== SSH Access ==
After your instance is running, you can connect via SSH from Windows, macOS, or Linux using the following command:


<code>ssh -i /path/to/private-key <username>@<ip-address></code>
== Why do I need an SSH key, and how can I get one? ==
<span id="SSH-Key"></span>
 
SSH keys provide secure, passwordless access to your virtual machines. You can either use your existing keys or generate a new SSH key pair through the bwCloud-OS Dashboard.
 
For detailed instructions, see the following guide.
 
➡️ [[Guide: SSH#Key-Pair-Creation|SSH Guide]]
 
== How do I access my instance via SSH? ==
<span id="SSH-Access"></span>
 
Once your instance is running, you can connect to it via SSH from '''Linux''', '''macOS''', or '''Windows''' using the following command:
 
<code>ssh -i /path/to/private-key <user>@<address></code>
 
* <code><user></code> is the default username, e.g. <code>ubuntu</code> for Ubuntu images. For other images, see the [[Images|Image Overview]].
* <code><address></code> is the DNS name ([[Networks#FQDN|FQDN]]) or the public IP address of your running instance. Both can be found in the [https://portal.bw-cloud.org/ Dashboard], on the '''Instances''' page.
 
For (advanced) SSH connection methods, see the following guide.
 
➡️ [[Guide: SSH|SSH Guide]]
 
== Can I replace a lost SSH key for my instance? ==
<span id="Lost-Access"></span>
 
If you lose your private SSH key, it '''cannot be replaced''' — not even by the Support team. Access to the instance is only possible if you previously enabled password login via the virtual console.


The corresponding SSH usernames are listed in this [[Images|reference list]].
== I no longer have access to my instance, what can I do? ==
<span id="Lost-Access-Workaround"></span>


== Lost Access ==
A possible (but tedious) workaround is described in the guide below.  
If you lose your SSH key, it '''cannot be replaced''' — not even by the Support. Access is only possible if you previously enabled password login via the virtual console.


A (tedious) workaround is described ''[[Lost Access|here]]''.
➡️ [[Guide: Rescue and Recovery|Rescue and Recovery Guide]]


= Resources of Instances =
= Resources of Instances =


Various resource packages (flavors) are available in bwCloud-OS. If you need more quota to use them, you can request it, as explained [[(Group-)Projects & Quota|here]].
== What are instance flavors, and which flavors are available? ==
{{:bwCloud-OS Provided-Flavors}}
<span id="Flavors"></span>
 
bwCloud-OS offers various predefined resource packages, called '''flavors''', which define the vCPU, RAM, and disk size of an instance.
 
For currently available flavors, see our [[flavors|Flavor Table]].
 
If your current quota does not allow the use of certain flavors, you can [[Projects and Quota#Project Quota|request a quota increase]].
 
== How can I assign more resources to a running instance? ==
<span id="Resize"></span>
 
If your project has sufficient [[Projects and Quota#Project Quota|quota]] (vCPU, RAM, etc.), you can resize an existing VM to a '''larger flavor'''. This process '''restarts the VM''' and updates its allocated resources.


== Resizing of an instance ==
''While it is also possible to resize an instance to a '''smaller flavor''' (i.e. reduce its resources), this is '''not recommended''', as it can lead to unpredictable behavior or system instability.''


If your project has been allocated enough quota (vCPU, RAM, etc.), you can upgrade an existing VM to a larger  '''flavor'''. This will restart the VM and change the flavor (vCPU/RAM).


'''Important:'''
* Data on '''attached volumes''' (Cinder) will remain unchanged.
* Back up important data before performing the resize.


=== Prerequisites ===
'''Important Notes:'''
* Sufficient quota in the selected region.
* Appropriate larger flavor available (see [[BwCloud-OS Bereitgestellete-Flavors|Hardware Flavors]]).
* Schedule a maintenance window (short restart / brief downtime).


=== Step-by-Step (Dashboard) ===
* Data on attached volumes remains unchanged.
# Log in to the [https://dashboard.bw-cloud.org bwCloud-OS Dashboard] and select the desired '''region''' in the top left.
* The IP addresses remain unchanged.
# Navigate to Project → Compute → Instances.
* ''Back up important data before resizing''.
# Open the dropdown menu for the desired instance and select '''''Resize Instance'''''.
# Select a larger '''flavor''' (e.g., from <code>m1.small</code> to <code>m1.medium</code>) and confirm with ''Resize''.
# Wait until the status shows '''VERIFY_RESIZE''' and the VM is reachable again.


=== After Resizing: Verify & Confirm ===
'''Prerequisites:'''
# Check that the resources match:
## RAM/CPU: <code>free -h</code>, <code>nproc</code>
## Disk layout: <code>lsblk</code>, <code>df -h</code>
# If everything is working: select '''''Confirm Resize''''' in the instance dropdown.
# If problems occur: select '''''Revert Resize''''' (restores the previous flavor).


=== Notes ===
* Enough quota is available in the selected region.
* The VM will be restarted during the resize; the IP address remains unchanged.
* A larger, compatible flavor is available (see [[Flavors]]).
* You can resize an instance to a '''smaller flavor''' to reduce allocated resources. However, this is '''not recommended''', as it may lead to unpredictable behavior or system instability.
* A short maintenance window must be scheduled (brief downtime expected).
* Attached data volumes must be resized separately via ''Volumes → Extend Volume'' and then extended within the guest system (e.g., <code>sudo resize2fs</code> or <code>sudo xfs_growfs</code>)
'''Step-by-Step Procedure:'''
# Log in to the [https://portal.bw-cloud.org/ Dashboard] and select the appropriate '''region''' in the top-left menu.
# Navigate to '''Project → Compute → Instances'''.
# Open the dropdown menu next to the instance you want to resize and select '''Resize Instance'''.
# Select a larger '''flavor''' (e.g., from <code>m1.small</code> to <code>m1.medium</code>) and confirm with '''Resize'''.
# Wait until the instance status changes to <code>VERIFY_RESIZE</code> and the VM becomes reachable again.
'''Verify & Confirm:'''
# Check that the resources match the new flavor  '''('''inside the instance):
#* RAM/CPU: <code>free -h</code>, <code>nproc</code>
#* Disk layout: <code>lsblk</code>, <code>df -h</code>
# If everything works as expected, select '''Confirm Resize''' in the instance dropdown.
# If issues occur, select '''Revert Resize''' to roll back to the previous flavor.
'''Further Notes:'''
* Attached data volumes are not resized automatically. To expand a volume:
# Go to the [https://portal.bw-cloud.org/ Dashboard] and use '''Volumes → Volume → Extend Volume'''.
# After resizing the volume, resize the filesystem '''inside the instance''' using a command such as:
#* <code>sudo resize2fs</code> (for ext4)
#* <code>sudo xfs_growfs</code> (for XFS)

Latest revision as of 18:44, 10 November 2025

In a Nutshell
  • Instances can be created via the Dashboard wizard, select: name →source → flavor → network → SSH key → launch.
  • The source defines the base disk for the instance, usually a pre-configured image containing the operating system (Rocky, Ubuntu, etc.) and initial software optimized for cloud environments.
  • The available resources of a virtual machine (vCPU, memory, etc.) are pre-defined by flavors. Choose a flavor that fits your workload and available quota when launching your instance.
  • To access your bwCloud-OS virtual machines, you must register an SSH key pair and assign it when creating instances. If you lose your private SSH key, you will lose access to your instance!


Creating Instances

How do I create a virtual machine using Dashboard (GUI)?

In the Dashboard, click Instances in the left-hand menu. On the new page, click Launch Instance. A dialog will open, guiding you through the configuration step by step:

  • Details: Enter a descriptive name for your instance.
  • Source: Select a source for the instance (image, snapshot, volume, etc.) — typically a preconfigured image (e.g., Debian x). Use the ↑ arrow to move the source into the Allocated list.
  • Flavor: Choose a flavor based on your required vCPU, RAM, etc. If your quota is insufficient, a yellow warning icon will appear.
  • Networks: Choose a network. Default settings are usually appropriate.
  • Security Groups: No changes are mandatory at this point. You can adjust rules later if necessary.
  • Key Pair: Select a registered public SSH key to be injected into the instance. This step is mandatory. Without a valid SSH key, remote access to the instance will not be possible.

After completing the required selections, click Launch Instance in the dialog. Once the instance has finished building and reaches the Running state, its IP address(es) will be shown in the Instances overview. You can then access the instance via its public IP address.

If you need further assistance, check out the illustrated guide below.

➡️ Illustrated Instance Creation Guide

Can I also create instances automatically?

Instances can also be deployed automatically using tools like Ansible. Further details are available here.

Connecting to Instances

Why do I need an SSH key, and how can I get one?

SSH keys provide secure, passwordless access to your virtual machines. You can either use your existing keys or generate a new SSH key pair through the bwCloud-OS Dashboard.

For detailed instructions, see the following guide.

➡️ SSH Guide

How do I access my instance via SSH?

Once your instance is running, you can connect to it via SSH from Linux, macOS, or Windows using the following command:

ssh -i /path/to/private-key <user>@<address>

  • <user> is the default username, e.g. ubuntu for Ubuntu images. For other images, see the Image Overview.
  • <address> is the DNS name (FQDN) or the public IP address of your running instance. Both can be found in the Dashboard, on the Instances page.

For (advanced) SSH connection methods, see the following guide.

➡️ SSH Guide

Can I replace a lost SSH key for my instance?

If you lose your private SSH key, it cannot be replaced — not even by the Support team. Access to the instance is only possible if you previously enabled password login via the virtual console.

I no longer have access to my instance, what can I do?

A possible (but tedious) workaround is described in the guide below.

➡️ Rescue and Recovery Guide

Resources of Instances

What are instance flavors, and which flavors are available?

bwCloud-OS offers various predefined resource packages, called flavors, which define the vCPU, RAM, and disk size of an instance.

For currently available flavors, see our Flavor Table.

If your current quota does not allow the use of certain flavors, you can request a quota increase.

How can I assign more resources to a running instance?

If your project has sufficient quota (vCPU, RAM, etc.), you can resize an existing VM to a larger flavor. This process restarts the VM and updates its allocated resources.

While it is also possible to resize an instance to a smaller flavor (i.e. reduce its resources), this is not recommended, as it can lead to unpredictable behavior or system instability.


Important Notes:

  • Data on attached volumes remains unchanged.
  • The IP addresses remain unchanged.
  • Back up important data before resizing.

Prerequisites:

  • Enough quota is available in the selected region.
  • A larger, compatible flavor is available (see Flavors).
  • A short maintenance window must be scheduled (brief downtime expected).

Step-by-Step Procedure:

  1. Log in to the Dashboard and select the appropriate region in the top-left menu.
  2. Navigate to Project → Compute → Instances.
  3. Open the dropdown menu next to the instance you want to resize and select Resize Instance.
  4. Select a larger flavor (e.g., from m1.small to m1.medium) and confirm with Resize.
  5. Wait until the instance status changes to VERIFY_RESIZE and the VM becomes reachable again.

Verify & Confirm:

  1. Check that the resources match the new flavor (inside the instance):
    • RAM/CPU: free -h, nproc
    • Disk layout: lsblk, df -h
  2. If everything works as expected, select Confirm Resize in the instance dropdown.
  3. If issues occur, select Revert Resize to roll back to the previous flavor.

Further Notes:

  • Attached data volumes are not resized automatically. To expand a volume:
  1. Go to the Dashboard and use Volumes → Volume → Extend Volume.
  2. After resizing the volume, resize the filesystem inside the instance using a command such as:
    • sudo resize2fs (for ext4)
    • sudo xfs_growfs (for XFS)