MetaCloud testbed - quick guide
- 1 Common terms
- 2 Login in web interface
- 3 Run virtual machine
- 4 Login to virtual machine
- 5 Virtual machine environment
- 6 Virtual machine administrating and states
- 7 What next?
We guide you to run a virtual machine through OpenNebula web interface.
Video tutorial https://www.youtube.com/watch?v=fWTamFvzpcQ&feature=youtu.be
VM = virtual machine
template a set of requirements for virtual machine. It can be:
- CPU number
- RAM memory size
- file with disc image that defines an operating system installed in VM
- requirements for IP address
- whether should be console VM available in web interface by VNC
- parameters contextualisation, setting particular features after VM start, for example ssh keys of VM owner
image - disc image, the file system with preinstalled operating system. Image may be:
- perzistent – changes in image are kept also after deleting VM. One particular image can be attached to only one particular virtual machine.
- nonperzistent – it may be part of several currently running VM. When new VM is created, nonpersistent image is copied to the VM. After deleting VM, the image is deleted too. But it is also possible to save an image of running VM thus save changes done in nonpersistent image.
Login in web interface
OpenNebula 4.10 we interface has two types of view that differs significantly:
- view cloud, the more simple view to run new virtual machines
- view user, the more complex view with more settings and informations
Default settings is cloud view.
How to switch between views is described in Switching regimes of Open Nebula.
Run virtual machine
Run virtual machine in cloud view
New virtual machines are created with the green "plus" button.
A new page appears. Choose short name of new virtual machine. A list with available templates appears, it also involves operating system icons. You may filter this list by inserting a string into search field.
Click on the selected template.
You may change number of CPU or amount of RAM memory in Capacity.
You may also remove some from IP addresses in Network. We recommend not to add an additional IP addresses, because an impossible combination can be created by allocating VM to physical device and IP address.
Confirm new VM by pressing a button Create at the top of the page.
Your new virtual machine will be in DEPLOYING state for a moment:
and after a while, it switches to RUNNING. The delay is caused by time necessary to copy the selected image to the physical host and boot the operating system.
Assigned IP address is highlighted in picture:
Log in to your virtual machine Login.
Run a virtual machine in user view
- in left menu choose Templates and then VMs, templates list appears
- choose any template, list may be filtered by using of search box
- click on Instantiate
- choose any name in dialog window and confirm by clicking Instantiate.
- choose Virtual machines in left menu, click on the VM in list, VM detail with bookmark Info appears, wait for a while, as soon as VM will be in RUNNING state, the delay is caused by copying the disc image to the physical host, and booting the operating system.
- switch to the Network tab and make not note of the assigned IP address.
Login to virtual machine
Prepared images by our side downloads updates and reboots, so wait for a while until virtual machine gets to the state RUNNING.
Accessing VMs in the Private Network
Depending on the template you have selected, your VM may be connected to a private address range
10.0.0.0/8 (simply put, its IP address is 10.something.something.something). In that case you cannot access the VM directly since it lacks a public IP address. You need to go through a gateway, and you cannot connect to any port other than 22 (SSH). Connections from your VM to the Internet, however, are in no way limited.
You can determine correct ssh command (port) via following table.
|Network name||Address range||NAT||ssh connection through gw|
|metacloud-brno-private2-nat||10.4.4.2-244||Yes||ssh email@example.com -p 64002 - 64244|
Example: Virtual machine connected to network metacloud-brno-private-nat with IP address 10.4.0.18 can be accessed with the following command:
* ssh firstname.lastname@example.org -p 61018
To login to running virtual machine with OS Linux as a user root by ssh (your ssh key is in your application form and is imported by kontextualization,
where ip_address is your virtual machine public IP address.
You may use to remote access to the virtual machine program Putty, if you use Windows operating system in the image.
If everything is properly set, you can login to the machine as a root, this machine works as "ordinary" remote machine. In case of problems, you may ask our user support.
If VM template supported VNC usage, you may use graphical interface of operating system in virtual machine. Linux shows the CLI only, whereas Windows is more usable for users.
After running VM, button VNC will be active.
In view cloud upper left:
In view user upper right:
after a clicking on VNC button, VNC client GUI appears in a browser:
You can not use other VNC client and connect directly, because VNC server do not listen on public IP address. But programs as Remote desktop or TeamViewer may be used.
Notice: To connect the Remote desktop application you should first allow this connection. Try the Control panel: Control Panel -> System -> Remote settings.
Virtual machine environment
You can operate virtual machines with OS Linux by commands typed in CLI. You may get more familiar with Linux commands by getting through tutorials.
Your Virtual Machine is fully under your control, our administrators have no access to it. You are fully responsible for it.
If you no longer use the virtual machine, turn it off (Undeploy) or delete it (Shutdown).
Virtual machine administrating and states
In view cloud
Administration is really simple, you may reboot, stop or delete the virtual machine by three buttons (see the Figure):
Every time, you do not need a virtual machine, shut it down or undeploy. The virtual machine that is only stopped, blocks the physical machines where they are allocated.
In view user
There is more options to administer the virtual machine than in view cloud.
Virtual machine stop
There is a button in the virtual machine detail to change the state:
Full description is in OpenNebula Documentation, the summary:
- Suspend - suspend to disc (hibernation), similarly when your notebook is "sleeping", VM stays in the physical device
- Power Off - sent ACPI signal to OS, similarly as you turn off our notebook, VM stays in the physical device
- Power Off hard - turn off OS immediately, similarly as when you plug out accidentally power supply from your PC. VM stays in physical device.
- Stop - suspend to disk (hibernation) and virtual machine is moved from physical device to datastore
- Undeploy - sent ACPI signal to OS, turn it off and move physical device to datastore
- Undeploy hard - turn off OS immediately and move VM from physical device to datastore
Suspend and Stop hibernate, after switching to state RUNNING, programs continue in running. Power Off and Undeploy turn off OS, so virtual machine boots after changing state to RUNNING.
There is no reason to keep virtual machine in power off state, it blocks dedicated memory, CPUs and disc space. Please, use state Undeploy instead.
All states above keep disc state also in nonpersistent images, VM is not deleted, only suspended. Similarly, IP address keeps assigned. Please, delete all idle virtual machines to relase IP addresses.
Virtual machine deleting
- Terminate - send ACPI signal to OS, wait until OS is terminated, copy persistent disc images, deletes nonpersistent disc images, deletes virtual machine
- Terminate hard - similarly as Shutdown, but end OS immediately (similarly as plug out PC)
Standard approach for deleting virtual machine with operating system with ACPI support (all prepared images) is using the Terminate command.
After deleting a virtual machine, nonpersistent disc is deleted!
You may also see detailed howto.