Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E23AD534 for ; Tue, 16 Oct 2012 17:27:20 +0000 (UTC) Received: (qmail 70826 invoked by uid 500); 16 Oct 2012 17:27:20 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 70769 invoked by uid 500); 16 Oct 2012 17:27:20 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 70760 invoked by uid 99); 16 Oct 2012 17:27:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 17:27:20 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Alena.Prokharchyk@citrix.com designates 66.165.176.63 as permitted sender) Received: from [66.165.176.63] (HELO SMTP02.CITRIX.COM) (66.165.176.63) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 17:27:15 +0000 X-IronPort-AV: E=Sophos;i="4.80,595,1344211200"; d="scan'208";a="211454288" Received: from sjcpmailmx01.citrite.net ([10.216.14.74]) by FTLPIPO02.CITRIX.COM with ESMTP/TLS/RC4-MD5; 16 Oct 2012 17:26:53 +0000 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.72]) by SJCPMAILMX01.citrite.net ([10.216.14.74]) with mapi; Tue, 16 Oct 2012 10:26:53 -0700 From: Alena Prokharchyk To: "cloudstack-dev@incubator.apache.org" Date: Tue, 16 Oct 2012 10:26:50 -0700 Subject: Re: Stop instance is destroying my VM Thread-Topic: Stop instance is destroying my VM Thread-Index: Ac2rw28fx4f6FVVBR1ajv1+duzCxtg== Message-ID: In-Reply-To: <031222CBCF33214AB2EB4ABA279428A3012CA5D51918@SJCPMAILBOX01.citrite.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.0.120402 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org On 10/16/12 10:19 AM, "Min Chen" wrote: >According to Gavin, stopVM has already deleted vm metadata from xenserver >database, what extra cleanup is done in expunge call besides destroying >vm volumes? I guess that my confusion is this: for a normal end-user, how >can he relate our CloudStack UI exposed operations (stop and destroy) to >similar operations(shutdown and destroy) exposed in XenCenter UI? Expunge just cleans up the volumes from the primary storage. I believe in Xen case the SR cleanup is also being done as a part of it. Check CitrixResourceBase code for more details. >=20 > >Thanks >-min > >-----Original Message----- >From: Alena Prokharchyk [mailto:Alena.Prokharchyk@citrix.com] >Sent: Tuesday, October 16, 2012 10:08 AM >To: cloudstack-dev@incubator.apache.org >Subject: Re: Stop instance is destroying my VM > >On 10/16/12 10:04 AM, "Min Chen" wrote: > >>Thanks Alena, So destroying an already stopped VM is just updating >>CloudStack DB without interacting with hypervisor, do we send >>hypervisor command when we expunge the destroyed VM? > >Yes. > >> >>Thanks >>-min >> >>On 10/16/12 9:54 AM, "Alena Prokharchyk" >>wrote: >> >>>Forgot to mention: if Destroy command is called on vm in Running >>>state, >>>cloudStack: >>> >>>* Stops vm on the backend (just the way we do when StopVm command is >>>executed, so you no longer see the vm on the hypervisor) >>>* marks vm as Destroyed in the DB. >>> >>>On 10/16/12 9:53 AM, "Alena Prokharchyk" >>> >>>wrote: >>> >>>>On 10/16/12 9:46 AM, "Min Chen" wrote: >>>> >>>>>Thanks Lee for clarification. Then my next natural question is: what >>>>>is the difference between stop instance and destroy instance (which >>>>>are also shown on CloudStack UI)? >>>> >>>> >>>>cloudStack doesn't send any commands to the backend on DestroyVm >>>>command. >>>>The vm is marked as Destroyed in the DB, the regular user can't see >>>>it any more. The vm can be recovered by the ROOT admin in the >>>>"expunge.delay" >>>>period of time (configurable, 1 day by default). When recoverVm >>>>command is executed, the vm goes back to Stopped state. >>>> >>>>If no recover was called on vm in Destroyed state, it will get >>>>expunged after expunge.delay. Expunge means that all vm's volumes >>>>will get destroyed on the primary storage, and the vm will be marked >>>>as Removed in the DB. >>>> >>>>-Alena. >>>> >>>>> >>>>>-min >>>>> >>>>>On 10/15/12 7:33 PM, "Gavin Lee" wrote: >>>>> >>>>>>It's by design, when you stop a VM (advanceStop() in >>>>>>VirtualMachineManagerImpl) in CloudStack UI, it will delete all the >>>>>>vm metadata info from xenserver database, it will reconstruct the >>>>>>vm profile to xenserver db when you start again (advanceStart() in >>>>>>VirtualMachineManagerImpl). >>>>>> >>>>>>It's easy to keep vm profile consistency since the only reference >>>>>>is cloudstack database. >>>>>> >>>>>>On Tue, Oct 16, 2012 at 6:12 AM, Min Chen >>>>>>wrote: >>>>>>> Hi there, >>>>>>> What did we internally invoke when user is >>>>>>>stopping VM instance from CloudStack UI? It seems that it did more >>>>>>>than shutdown VM from XenCenter. After this operation, my VM >>>>>>>disappeared from XenCenter console. If I manually do shutdown from >>>>>>>XenCenter UI, I can see that my VM is still there with stopped >>>>>>>status. >>>>>>> Thanks >>>>>>> -min >>>>>> >>>>>> >>>>>> >>>>>>-- >>>>>>Gavin >>>>> >>>>> >>>> >>>> >>>> >>> >> >> > > >