Instances (VMs): Difference between revisions

From bwCloud-OS
Jump to navigation Jump to search
No edit summary
No edit summary
Line 52: Line 52:
If your current quota does not allow the use of certain flavors, you can [[Projects & Quota#Quota|request a quota increase]].
If your current quota does not allow the use of certain flavors, you can [[Projects & Quota#Quota|request a quota increase]].


== Resizing of an instance ==
== Resizing an instance ==


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).
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.


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


=== Prerequisites ===
* Data on attached volumes (Cinder) remains unchanged.
* Sufficient quota in the selected region.
* The IP addresses remains unchanged.
* Appropriate larger flavor available (see [[BwCloud-OS Bereitgestellete-Flavors|Hardware Flavors]]).
* Back up important data before resizing.
* Schedule a maintenance window (short restart / brief downtime).


=== Step-by-Step (Dashboard) ===
'''Prerequisites:'''
# Log in to the [https://dashboard.bw-cloud.org bwCloud-OS Dashboard] and select the desired '''region''' in the top left.
 
# Navigate to Project → Compute → Instances.
* Enough quota available in the selected region
# Open the dropdown menu for the desired instance and select '''''Resize Instance'''''.
* A larger, compatible flavor is available (see [[Flavors]])
# Select a larger '''flavor''' (e.g., from <code>m1.small</code> to <code>m1.medium</code>) and confirm with ''Resize''.
* A short maintenance window is scheduled (brief downtime expected)
# Wait until the status shows '''VERIFY_RESIZE''' and the VM is reachable again.
 
=== Step-by-Step Procedure (Dashboard) ===
# Log in to the [https://dashboard.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.


=== After Resizing: Verify & Confirm ===
=== After Resizing: Verify & Confirm ===
Line 76: Line 79:
## RAM/CPU: <code>free -h</code>, <code>nproc</code>
## RAM/CPU: <code>free -h</code>, <code>nproc</code>
## Disk layout: <code>lsblk</code>, <code>df -h</code>
## Disk layout: <code>lsblk</code>, <code>df -h</code>
# If everything is working: select '''''Confirm Resize''''' in the instance dropdown.
# If everything works as expected, select '''Confirm Resize''' in the instance dropdown.
# If problems occur: select '''''Revert Resize''''' (restores the previous flavor).
# If issues occur, select '''Revert Resize''' to roll back to the previous flavor.


=== Notes ===
=== Notes ===
* The VM will be restarted during the resize; the IP address remains unchanged.
* While it is 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.
* 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.
* <strong>Attached data volumes</strong> (Cinder) are <strong>not resized automatically</strong>. To expand a volume:
* 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>)
** Go to '''Volumes → Extend Volume''' in the Dashboard.
** Then resize the filesystem '''inside the instance''' using a command such as:
*** <code>sudo resize2fs</code> (for ext4)
*** <code>sudo xfs_growfs</code> (for XFS)

Revision as of 21:05, 17 October 2025

In a Nutshell
  • Instances can be created via the Dashboard wizard, select: name → image → flavor → network → SSH key → launch.
  • To access your bwCloud-OS virtual machines, you must register an SSH key pair and assign it when creating instances.
  • Existing instances can be resized to larger flavors. Always back up important data beforehand, as the VM will reboot during the process.



Creating Instances

Create an Instance via 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 meaningful 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.

Create Instances automatically

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

Connecting to Instances

SSH Keys

To access your virtual machines, you need an SSH key pair. You can either use your existing keys or generate a new one through the bwCloud-OS Dashboard. Detailed instructions are available here.

SSH Access

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

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

The correct SSH username depends on the image used. You can find a list of default usernames here.

Lost Access

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

A possible (but tedious) workaround is described here.

Resources of Instances

Instance Flavors

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

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

Resizing an 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.

Important Notes:

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

Prerequisites:

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

Step-by-Step Procedure (Dashboard)

  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.

After Resizing: Verify & Confirm

  1. Check that the resources match:
    1. RAM/CPU: free -h, nproc
    2. 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.

Notes

  • While it is 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.
  • Attached data volumes (Cinder) are not resized automatically. To expand a volume:
    • Go to Volumes → Extend Volume in the Dashboard.
    • Then resize the filesystem inside the instance using a command such as:
      • sudo resize2fs (for ext4)
      • sudo xfs_growfs (for XFS)