Kategorien: Compute Cloud
Can I install Microsoft Windows in a VM?
Technically it is possible to run Windows in a VM on the Compute Cloud. Before you start you must make sure that you own an appropriate license and that your Windows license allows you to run Windows virtualized on our hardware.
Do you create any backups?
No. If you need to backup your data you are responsible for that.
Who should I contact if further information or additional help is needed?
We are not responsible for problems with software you are running within your VM.
- Please check the RRZE CC User Guide and (this) FAQ for answers.
- Just try to google it. The internet knows much more about all the possible Openstack issues than we do, though hard to find occasionally.
- If this does not help or in case you are 100% sure it is a problem of the RRZE CC please use the E-Mail address cc-support@fau.de to open a ticket.
How can I resize a VM’s volume?
Once in a while you may have the need for more storage space in an existing VM. How to accomplish this depends on the type of volume you need to enlarge.
Additional Volumes
If you are dealing with a volume that you attached additionally to you VM, then enlarging is rather straightforward.
- Connect to your virtual machine via SSH, and unmount the volume.
- Now login to the web interface, navigate to the volume page and detach the volume via ‚Manage Attachments‘ in the drop down menu on the right. (Or use the CLI Client)
- Then click on ‚Extend Volume‘ in the same drop down, and choose a new bigger size for it.
- After that you can attach the volume again via ‚Manage Attachments‘
- Adjust the partition layout of the volume if necessary from the virtual machine and mount the volume again.
- Finally enlarge the filesystem of the volume. For example in case of an xfs or ext4 filesystem use the xfs_growfs /mount/point or resize2fs /mount/point commands.
Root Volumes
Root volumes need special treatment, because you cannot detach them from an instance. There are two options:
Deleting the virtual machine
If you didn’t choose ‚Delete volume on instance‘ delete when creating the virtual machine, you can do the following:
- Delete the virtual machine.
- Go to the volume page, and extend the volume via the drop down ‚Manage Attachments‚.
- Then create a new virtual machine from this volume.
- Finally adjust the partition layout if necessary.
Using the Cinder CLI Client
First of all you have to install the OpenStack and Cinder command line tools on your local (Linux) computer. To install the Cinder CLI on Ubuntu do ‚apt install python3-cinderclient
‚.
- Shut down the instance using the OpenStack CLI command ‚
openstack server stop <INSTANCE-UUID
>‘ or by using the OpenStack Web UI selecting ‚Shut Off Instance‚ in the pull down menu. - When the instance state has changed to shutoff, call ‚
openstack server volume list
‚ and get theVOLUME_ID
of the/dev/vda
volume, i.e. the root volume. - Call ‚
cinder --os-volume-api-version 3.42 extend <VOLUME_ID> <NEW_SIZE>
‚ . - Restart the instance using Web UI or by calling ‚
openstack server start <INSTANCE-UUID
>‘ . - Finally adjust the partition layout if necessary and enlarge the filesystem, see above.
I cannot delete a volume or a volume snapshot
The volume must be in the state Available and have the attachment status Detached. Before you can delete volumes you need to delete any snapshots of these volumes or vice versa. Volumes cannot be deleted as long as any snapshots of the particular volumes exist. The Horizon Web GUI does not provide the possibility to list these dependencies between volumes and snapshots but you could use the following bash script to list the dependencies for your project: get_volume_dependencies.sh
Below you see an example of the output of that script. There are 2 volumes and one Snapshot listed. To be able to delete the snapshot you first have to delete the volume with UUID 1a0ed73b-d15a-4db2-8a84-c96953c183f0.
./get_volume_dependencies.sh VOLUME: 07e56053-082a-411e-be41-747cd7004a56 (Name: )
VOLUME: 1a0ed73b-d15a-4db2-8a84-c96953c183f0 (Name: )
SNAPSHOT: c90c09b1-01e5-4a9d-b2b6-ba9187f5af6c (Name: snapshot for snapsnap) ??? VOLUME: 1a0ed73b-d15a-4db2-8a84-c96953c183f0 (Name: )
Despite cleared dependencies the system may still refuse to delete a volume most often due to an inconsistent state and/or attachment status in the database. An example would be a volume for which openstack volume show VOLUME_UUID
shows an attachment to an already deleted instance, or an instance for which **openstack server show SERVER_UUID**
does not show said attachment. In that case the state and/or attachment status have to be reset manually which requires admin privileges, so if you have this kind of problem please open a ticket and name the volume.
I cannot delete an image
As long as there exists a volume, which has been created based on the image, you can not delete the image.
How can I download an image/a volume?
In order to download a volume, e.g. because you want to save a backup or want to use this volume in a different environment, you will face several limitations:
- You cannot simply download a snapshot of a volume (it will always have a size of 0 (zero) bytes)
- You need to use the command line tools.
In order to download an instance’s volume please follow these steps:
- Create a snapshot of the instance
- Go to Volumes > Snapshots
- Click on „Create Volume“ next to the snapshot you want to download
- Go to Volumes > Volumes
- Click on „Upload to Image“ in the dropdown menu next to the volume you want to download.
This step can take a long time. Grab a coffee and do something else until the new image has been created. - Go to Compute > Images
- Click on the image and note its ID.
- Using the command line tools you can now download the image using the openstack command:
openstack image save --file myimage.raw
What are security groups and how do I use them?
The concept of security groups is used to prevent unwanted and malicious network traffic from or to the machines. It can be seen as an external (outside of the VM itself) firewall that can be fully configured by the user.
It is worth noting that the default security group does not even allow incoming SSH connections! If you want to access your VMs via SSH you need to add a corresponding rule to the security group you want to use first.
If you run into problems regarding network connectivity of your VMs security groups are a good place to start debugging your problems.
Please note: you can modify the Security Groups any time. The changes take effect immediately. You do not need to restart or shelve and unshelve your VM.
I need a static IP for my VM
To reach a VM you need to assign a floating IP to it. Floating IPs have some remarkable characteristics:
- Once you select a floating IP from the pool this IP stays assigned to you until you return it to the pool.
This is very helpful if you want to register this IP with remote services (such as NFS exports), because until you explicitly return it to the pool you can be sure that this IP is only used by you. - Once you assign a floating IP to a particular VM this IP stays assigned to it even if you shelve your VM.
This ensures that a VM will use the same IP even if you shelve it inbetween. To free the floating IP you need to explicitly disassociate it or delete the VM.
I cannot reach my VM via SSH
First and foremost, please check if the Security Group you are using allows SSH traffic to the VM.
- If you have set a password for your user you can use the NoVNC console from within the OpenStack dashboard to log into the VM and reconfigure netplan’s configuration file located in /etc/netplan/50-cloud-init.yaml. More information on this topic can be found here.
- If you do not have a password set you need to create a new VM.
- As default value, a volume will be kept even if its VM is deleted. In this case, you can delete the VM, go to the Volumes overview page and select „Launch as instance“ from the particular volume’s dropdown menu.
- If you are unsure, you can create a snapshot of your (running) VM, go to Volumes > Snapshots and select „Launch as Instance“ from the particular snapshot’s dropdown menu.
Once the VM is ready, you should be able to log in via SSH.