[one-users] onevm delete vs onevm cancel

Ruben S. Montero rubensm at dacya.ucm.es
Sat Apr 3 06:45:19 PDT 2010


Hi

In OpenNebula you can terminate a VM with three different methods:

shutdown: Similar to a proper machine shutdown, it waits for the
shutdown process so the VM disks are left in a clean state. Then VM
images are deleted or copied back to $ONE_LOCATION/var/$VMID if
save="yes" has been defined.

cancel: The VM is killed, but the process is checked by OpenNebula, so
if the process fails the VM remains in runn. So you can free the used
resources. Also if cancel succeeds the VMDIR in the remote machine is
not deleted

delete: Similar to a hard kill, the cancel and TM delete commands are
executed but their result is not checked (well, the output of the
cancel and TM delete operation are in vm.log, but you have to check
the file to find out). The VM is directly deleted from the database.

So there is a risk of not really freeing resources with the delete
operation. So the thumb rule: use cancel when you'd do kill, and
delete when you'd like to do a kill -9.

Cheers

Ruben

On Thu, Mar 25, 2010 at 9:59 PM, Shi Jin <jinzishuai at gmail.com> wrote:
> Hi there,
>
> Could anyone explain to what the differences between the commands "onevm
> delete" and "onevm cancel"?
> I understand they both call the cancel() function of the one_vmm_kvm.rb
> code, right?
> The cancel() function in turn calls the "virsh destory" command to unplug
> the power for the VM, correct?
>
> I guess they are different from "onevm shutdown", which calls the shutdown()
> function in the VMM and in turn calls the "virsh shutdown" command. This
> way, the VM are shutdown gratefully rather the sudden death of the previous
> two cases.  Am I understanding things properly?
>
> Is there any difference betweehn "onevm delete" and "onevm cancel"?
> Thank you very much.
>
> --
> Shi Jin, Ph.D.
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>



-- 
Dr. Ruben Santiago Montero
Associate Professor (Profesor Titular), Complutense University of Madrid

URL: http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7



More information about the Users mailing list