Difference between revisions of "How To Manage OpenNebula Virtual Machines"

From CipherSpace Client Wiki
Jump to navigation Jump to search
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__TOC__
[[Category:OpenNebula]]
 
[[Category:How To]]
[[Category:CloudInfrastructure]]
==Look at running Virtual Machines==
==Look at running Virtual Machines==


1.[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#:<br>
#:A list of all instantiated virtual machines will apear. Some basic information is showed.
#:[[File:vm_list.png|thumb|none|upright=2.5]]
#:<br>
#:Click on a virtual machine to see all its configuration.
#:[[File:vm_detail.png|thumb|none|upright=2.5]]


==Open VNC console==
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#:<br>
#Select the virtual machine you want to access and click on the "VNC" button.
#:[[File:vnc_button.png|thumb|none|upright=1]]
#:<br>
#:A flyout will appear with the virtual machine console. To move the console in a separate browser window or tab press [[File:expand_button.png|20px]] button.
#:[[File:vnc_view.png|thumb|none|900px]]


2. Go to “Virtual Resources” in the left menu and click on “Virtual Machines” in the drop down menu.
==Instantiate a Virtual Machine==
[[File:VM_menu.png|thumb|none|upright=0.5]]
 
 
A list of all instantiated virtual machines will apear. Some basic information is showed.
[[File:vm_list.png|thumb|none|upright=2.5]]
Click on a virtual machine to see all its configuration.
[[File:vm_detail.png|thumb|none|upright=2.5]]
 
 
==Shutdown a Virtual Machine==
 
1.[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
 
 
2. Go to “Virtual Resources” in the left menu and click on “Virtual Machines” in the drop down menu.
[[File:VM_menu.png|thumb|none|upright=0.5]]
 


#Go to “Templates” in the left menu and click on “Vms” in the drop down menu.
#:[[File:Templates_menu.png|thumb|none|upright=0.5]]
#[[OpenNebula_Templates | Create or modify a template]]. This template will then be used to instantiate a virtual machine on which the operative system will be install.
#Click on the template just created and press "Instantiate" button to power on the virtual machine.
#:[[File:vm_instantiate.png|thumb|none|upright=1.2]]


3. Click on the virtual machine, press the red button with a bin and click "shutdown".
==Terminate Virtual Machine Instances==
[[File:vm_shutdown.png|thumb|none|upright=1.5]]
You can terminate a running instance with the following operations:
If more than one virtual machine need to be shutdown, select each of them, press the red button with a bin and click "shutdown".
*'''terminate''': Gracefully shuts down a running VM, sending the ACPI signal. Once the VM is shut down, the host is cleaned, and persistent disk(s) will be moved to the associated datastore. If after a given time the VM is still running (e.g. guest ignoring ACPI signals), OpenNebula will return the VM to the RUNNING state.
[[File:vm_multishutdown.png|thumb|none|upright=2.5]]
*'''terminate --hard''': Same as above but the VM is immediately destroyed. Use this action instead of terminate when the VM doesn’t have ACPI support.


==Suspend a Virtual Machine==
All the above operations free the resources used by the VM.
 
===Terminate===
1.[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
 
#Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
 
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
2. Go to “Virtual Resources” in the left menu and click “Virtual Machines” in the drop down menu.
#:<br>
[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the red button with the bin and click "Terminate".
 
#:[[File:vm_shutdown.png|thumb|none|upright=1.5]]
 
#:If more than one virtual machine need to be shut down, select each of them, press the red button with the bin and click "Terminate".
3. Click on the virtual machine, press the hold button and click "suspend".
#:[[File:vm_multishutdown.png|thumb|none|upright=2.5]]
[[File:vm_suspend.png|thumb|none|upright=1.5]]
===Terminate Hard===
If more than one virtual machine need to be suspended, select each of them, press the hold button and click "suspend".
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
 
#Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
 
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
==Open VNC console==
#:<br>
#Click on the virtual machine, press the red button with the bin and click "Terminate hard".
#:[[File:vm_shutdown_hard.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be shut down, select each of them, press the red button with the bin and click "Terminate Hard".
#:[[File:vm_multishutdown_hard.png|thumb|none|upright=2.5]]


1.[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
==Pause Virtual Machine Instances==
<span style="color:red">'''Be aware that VMs, which are in some of the states below, may still occupy resources even though they are not actually running. Those resources will be accounted for and, based on your subscription plan, can be charged to you.'''</span>


There are two different ways to temporarily stop the execution of a VM: short and long term pauses. A short term pause keeps all the VM resources allocated to the hosts so its resume its operation in the same hosts quickly. Use the following actions:
*'''suspend''': the VM state is saved in the running Host. When a suspended VM is resumed, it is immediately deployed in the same Host by restoring its saved state.
*'''poweroff''': Gracefully powers off a running VM by sending the ACPI signal. It is similar to suspend but without saving the VM state. When the VM is resumed it will boot immediately in the same Host.
*'''poweroff --hard''': Same as above but the VM is immediately powered off. Use this action when the VM doesn’t have ACPI support.


2. Go to “Virtual Resources” in the left menu and click “Virtual Machines” in the drop down menu.
You can also plan a long term pause. The Host resources used by the VM are freed and the Host is cleaned. Any needed disk is saved in the system datastore. The following actions are useful if you want to preserve network and storage allocations (e.g. IPs, persistent disk images):
[[File:VM_menu.png|thumb|none|upright=0.5]]
*'''undeploy''': Gracefully shuts down a running VM, sending the ACPI signal. The Virtual Machine disks are transferred back to the system datastore. When an undeployed VM is resumed, it is be moved to the pending state, and the scheduler will choose where to re-deploy it.
*'''undeploy --hard''': Same as above but the running VM is immediately destroyed.
*'''stop''': Same as undeploy but also the VM state is saved to later resume it.


3. Click on the virtual machine, press "VNC" button.
When the VM is successfully paused you can resume its execution with:
[[File:vnc_button.png|thumb|none|upright=1]]


A flyout will appear with the virtual machine console.
*'''resume''': Resumes the execution of VMs in the stopped, suspended, undeployed and poweroff states.
[[File:vnc_view.png|thumb|none|900px]]
===Suspend===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the hold button and click "Suspend".
#:[[File:vm_suspend.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be suspended, select each of them, press the hold button and click "Suspend".
#:[[File:Vm_multisuspend.png|thumb|none|upright=2.5]]
===Poweroff===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the hold button and click "Poweroff".
#:[[File:vm_poweroff.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be powered off, select each of them, press the hold button and click "Poweroff".
#:[[File:Vm_multipoweroff.png|thumb|none|upright=2.5]]
===Poweroff Hard===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the hold button and click "Poweroff Hard".
#:[[File:vm_poweroff_hard.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be powered off hard, select each of them, press the hold button and click "Poweroff Hard".
#:[[File:Vm_multipoweroff_hard.png|thumb|none|upright=2.5]]
===Undeploy===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the stop button and click "Undeploy".
#:[[File:vm_undeploy.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be undeployed, select each of them, press the stop button and click "Undeploy".
#:[[File:Vm_multiundeploy.png|thumb|none|upright=2.5]]
===Undeploy Hard===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the stop button and click "Undeploy Hard".
#:[[File:vm_undeploy_hard.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be undeployed hard, select each of them, press the stop button and click "Undeploy Hard".
#:[[File:Vm_multiundeploy_hard.png|thumb|none|upright=2.5]]
===Stop===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the stop button and click "Stop".
#:[[File:vm_stop.png|thumb|none|upright=1.5]]
#:If more than one virtual machine need to be stopped, select each of them, press the stop button and click "Stop".
#:[[File:Vm_multistop.png|thumb|none|upright=2.5]]
===Resume===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to "Instances" in the left menu and click "VMs" in the drop down menu.
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#Click on the virtual machine, press the play button to resume.
#:[[File:vm_resume.png|thumb|none|upright=1]]
#:If more than one virtual machine need to be resumed, select each of them, press the play button to resume.
#:[[File:Vm_multiresume.png|thumb|none|upright=2.5]]

Latest revision as of 22:13, 20 March 2017

Look at running Virtual Machines

  1. Log into OpenNebula Sunstone.
  2. Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
    VM menu.png

    A list of all instantiated virtual machines will apear. Some basic information is showed.
    Vm list.png

    Click on a virtual machine to see all its configuration.
    Vm detail.png

Open VNC console

  1. Log into OpenNebula Sunstone.
  2. Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
    VM menu.png

  3. Select the virtual machine you want to access and click on the "VNC" button.
    Vnc button.png

    A flyout will appear with the virtual machine console. To move the console in a separate browser window or tab press Expand button.png button.
    Vnc view.png

Instantiate a Virtual Machine

  1. Go to “Templates” in the left menu and click on “Vms” in the drop down menu.
    Templates menu.png
  2. Create or modify a template. This template will then be used to instantiate a virtual machine on which the operative system will be install.
  3. Click on the template just created and press "Instantiate" button to power on the virtual machine.
    Vm instantiate.png

Terminate Virtual Machine Instances

You can terminate a running instance with the following operations:

  • terminate: Gracefully shuts down a running VM, sending the ACPI signal. Once the VM is shut down, the host is cleaned, and persistent disk(s) will be moved to the associated datastore. If after a given time the VM is still running (e.g. guest ignoring ACPI signals), OpenNebula will return the VM to the RUNNING state.
  • terminate --hard: Same as above but the VM is immediately destroyed. Use this action instead of terminate when the VM doesn’t have ACPI support.

All the above operations free the resources used by the VM.

Terminate

  1. Log into OpenNebula Sunstone.
  2. Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
    VM menu.png

  3. Click on the virtual machine, press the red button with the bin and click "Terminate".
    Vm shutdown.png
    If more than one virtual machine need to be shut down, select each of them, press the red button with the bin and click "Terminate".
    Vm multishutdown.png

Terminate Hard

  1. Log into OpenNebula Sunstone.
  2. Go to “Instances” in the left menu and click on “VMs” in the drop down menu.
    VM menu.png

  3. Click on the virtual machine, press the red button with the bin and click "Terminate hard".
    Vm shutdown hard.png
    If more than one virtual machine need to be shut down, select each of them, press the red button with the bin and click "Terminate Hard".
    Vm multishutdown hard.png

Pause Virtual Machine Instances

Be aware that VMs, which are in some of the states below, may still occupy resources even though they are not actually running. Those resources will be accounted for and, based on your subscription plan, can be charged to you.

There are two different ways to temporarily stop the execution of a VM: short and long term pauses. A short term pause keeps all the VM resources allocated to the hosts so its resume its operation in the same hosts quickly. Use the following actions:

  • suspend: the VM state is saved in the running Host. When a suspended VM is resumed, it is immediately deployed in the same Host by restoring its saved state.
  • poweroff: Gracefully powers off a running VM by sending the ACPI signal. It is similar to suspend but without saving the VM state. When the VM is resumed it will boot immediately in the same Host.
  • poweroff --hard: Same as above but the VM is immediately powered off. Use this action when the VM doesn’t have ACPI support.

You can also plan a long term pause. The Host resources used by the VM are freed and the Host is cleaned. Any needed disk is saved in the system datastore. The following actions are useful if you want to preserve network and storage allocations (e.g. IPs, persistent disk images):

  • undeploy: Gracefully shuts down a running VM, sending the ACPI signal. The Virtual Machine disks are transferred back to the system datastore. When an undeployed VM is resumed, it is be moved to the pending state, and the scheduler will choose where to re-deploy it.
  • undeploy --hard: Same as above but the running VM is immediately destroyed.
  • stop: Same as undeploy but also the VM state is saved to later resume it.

When the VM is successfully paused you can resume its execution with:

  • resume: Resumes the execution of VMs in the stopped, suspended, undeployed and poweroff states.

Suspend

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the hold button and click "Suspend".
    Vm suspend.png
    If more than one virtual machine need to be suspended, select each of them, press the hold button and click "Suspend".
    Vm multisuspend.png

Poweroff

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the hold button and click "Poweroff".
    Vm poweroff.png
    If more than one virtual machine need to be powered off, select each of them, press the hold button and click "Poweroff".
    Vm multipoweroff.png

Poweroff Hard

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the hold button and click "Poweroff Hard".
    Vm poweroff hard.png
    If more than one virtual machine need to be powered off hard, select each of them, press the hold button and click "Poweroff Hard".
    Vm multipoweroff hard.png

Undeploy

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the stop button and click "Undeploy".
    Vm undeploy.png
    If more than one virtual machine need to be undeployed, select each of them, press the stop button and click "Undeploy".
    Vm multiundeploy.png

Undeploy Hard

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the stop button and click "Undeploy Hard".
    Vm undeploy hard.png
    If more than one virtual machine need to be undeployed hard, select each of them, press the stop button and click "Undeploy Hard".
    Vm multiundeploy hard.png

Stop

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the stop button and click "Stop".
    Vm stop.png
    If more than one virtual machine need to be stopped, select each of them, press the stop button and click "Stop".
    Vm multistop.png

Resume

  1. Log into OpenNebula Sunstone.
  2. Go to "Instances" in the left menu and click "VMs" in the drop down menu.
    VM menu.png
  3. Click on the virtual machine, press the play button to resume.
    Vm resume.png
    If more than one virtual machine need to be resumed, select each of them, press the play button to resume.
    Vm multiresume.png