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

From CipherSpace Client Wiki
Jump to navigation Jump to search
Line 1: Line 1:
__TOC__
 


==Look at running Virtual Machines==
==Look at running Virtual Machines==
Line 12: Line 12:
#:Click on a virtual machine to see all its configuration.
#:Click on a virtual machine to see all its configuration.
#:[[File:vm_detail.png|thumb|none|upright=2.5]]
#:[[File:vm_detail.png|thumb|none|upright=2.5]]
==Open VNC console==
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#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]]
#:<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]]


==Instantiate a Virtual Machine==
==Instantiate a Virtual Machine==
Line 21: Line 32:
#:[[File:vm_instantiate.png|thumb|none|upright=1.2]]
#:[[File:vm_instantiate.png|thumb|none|upright=1.2]]


==Shutdown a Virtual Machine==
==Terminate Virtual Machine Instances==
When you shut down a virtual machine, OpenNebula sent ACPI signal to the machine operative system.
You can terminate a running instance with the following operations (either as onevm commands or through Sunstone):
Once the machine is shut down, its resources (memory, cpu) are available for a new machine.
*'''shutdown''': Gracefully shuts down a running VM, sending the ACPI signal. Once the VM is shutdown the host is cleaned, and persistent and deferred-snapshot disk 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 returned the VM to the RUNNING state.
<br>
*'''shutdown --hard''': Same as above but the VM is immediately destroyed. Use this action instead of shutdown when the VM doesn’t have ACPI support.
 
If you need to terminate an instance in any state use:
*'''delete''': The VM is immediately destroyed no matter its state. Hosts are cleaned as needed but no images are moved to the repository, leaving then in error. Think of delete as kill -9 for a process, an so it should be only used when the VM is not responding to other actions.
 
All the above operations free the resources used by the VM
 
===Shutdown===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#Go to “Virtual Resources” in the left menu and click on “Virtual Machines” in the drop down menu.
#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]]
#:[[File:VM_menu.png|thumb|none|upright=0.5]]
#:<br>
#:<br>
#Click on the virtual machine, press the red button with the bin and click "shutdown".
#Click on the virtual machine, press the red button with the bin and click "Shutdown".
#:[[File:vm_shutdown.png|thumb|none|upright=1.5]]
#:[[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 "shutdown".
#:If more than one virtual machine need to be shut down, select each of them, press the red button with the bin and click "Shutdown".
#:[[File:vm_multishutdown.png|thumb|none|upright=2.5]]
#:[[File:vm_multishutdown.png|thumb|none|upright=2.5]]


==Suspend a Virtual Machine==
===Shutdown Hard===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#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]]
#:<br>
#Click on the virtual machine, press the red button with the bin and click "Shutdown 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 "Shutdown Hard".
#:[[File:vm_multishutdown_hard.png|thumb|none|upright=2.5]]
===Delete===
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#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]]
#:<br>
#Click on the virtual machine, press the red button with the bin and click "Delete".
#:[[File:vm_delete.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 "Delete".
#:[[File:vm_multidelete.png|thumb|none|upright=2.5]]
==Pause Virtual Machine Instances==
 
 
When you suspend a virtual machine, OpenNebula save the machine state and you can resume it later.
When you suspend a virtual machine, OpenNebula save the machine state and you can resume it later.
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
Line 43: Line 81:
#:If more than one virtual machine need to be suspended, select each of them, press the hold button and click "suspend".
#: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]]
#:[[File:Vm_multisuspend.png|thumb|none|upright=2.5]]
==Open VNC console==
#[[OpenNebula_Administrative_Functions | Log into OpenNebula Sunstone]].
#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]]
#:<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]]

Revision as of 13:44, 23 September 2016


Look at running Virtual Machines

  1. Log into OpenNebula Sunstone.
  2. Go to “Virtual Resources” in the left menu and click on “Virtual Machines” 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 “Virtual Resources” in the left menu and click on “Virtual Machines” 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 “Virtual Resources” in the left menu and click on “Templates” 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 (either as onevm commands or through Sunstone):

  • shutdown: Gracefully shuts down a running VM, sending the ACPI signal. Once the VM is shutdown the host is cleaned, and persistent and deferred-snapshot disk 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 returned the VM to the RUNNING state.
  • shutdown --hard: Same as above but the VM is immediately destroyed. Use this action instead of shutdown when the VM doesn’t have ACPI support.

If you need to terminate an instance in any state use:

  • delete: The VM is immediately destroyed no matter its state. Hosts are cleaned as needed but no images are moved to the repository, leaving then in error. Think of delete as kill -9 for a process, an so it should be only used when the VM is not responding to other actions.

All the above operations free the resources used by the VM

Shutdown

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

  3. Click on the virtual machine, press the red button with the bin and click "Shutdown".
    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 "Shutdown".
    Vm multishutdown.png

Shutdown Hard

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

  3. Click on the virtual machine, press the red button with the bin and click "Shutdown 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 "Shutdown Hard".
    Vm multishutdown hard.png

Delete

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

  3. Click on the virtual machine, press the red button with the bin and click "Delete".
    Vm delete.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 "Delete".
    Vm multidelete.png

Pause Virtual Machine Instances

When you suspend a virtual machine, OpenNebula save the machine state and you can resume it later.

  1. Log into OpenNebula Sunstone.
  2. Go to “Virtual Resources” in the left menu and click “Virtual Machines” 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