You are right, CS tries to re-create VM, but fails with this:
-------------------------------------------------------------------------------------------
2014-10-06 15:08:59,447 DEBUG [c.c.d.DeploymentPlanningManagerImpl] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) This VM has 
last host_id specified, trying to choose the same host: 1
2014-10-06 15:08:59,449 DEBUG [c.c.d.DeploymentPlanningManagerImpl] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) The last host 
of this VM is in avoid set
2014-10-06 15:08:59,449 DEBUG [c.c.d.DeploymentPlanningManagerImpl] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) Cannot choose 
the last host to deploy this VM
2014-10-06 15:08:59,449 DEBUG [c.c.d.FirstFitPlanner] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) Searching 
resources only under specified Pod: 1
2014-10-06 15:08:59,449 DEBUG [c.c.d.FirstFitPlanner] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) Listing 
clusters in order of aggregate capacity, that have (atleast one host with) 
enough CPU and RAM capacity under this Pod: 1
2014-10-06 15:08:59,455 DEBUG [c.c.d.FirstFitPlanner] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) Removing from 
the clusterId list these clusters from avoid set: [1]
2014-10-06 15:08:59,456 DEBUG [c.c.d.FirstFitPlanner] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) No clusters 
found after removing disabled clusters and clusters in avoid list, returning.
2014-10-06 15:08:59,506 DEBUG [c.c.c.CapacityManagerImpl] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) VM state 
transitted from :Starting to Stopped with event: OperationFailedvm's original 
host id: 1 new host id: null host id before state transition: null
2014-10-06 15:08:59,542 ERROR [c.c.v.VmWorkJobHandlerProxy] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) Invocation 
exception, caused by: com.cloud.exception.InsufficientServerCapacityException: 
Unable to create a deployment for VM[User|i-2-13-VM]Scope=interface 
com.cloud.dc.DataCenter; id=1
2014-10-06 15:08:59,542 INFO  [c.c.v.VmWorkJobHandlerProxy] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161 ctx-377bdf08) Rethrow 
exception com.cloud.exception.InsufficientServerCapacityException: Unable to 
create a deployment for VM[User|i-2-13-VM]Scope=interface 
com.cloud.dc.DataCenter; id=1
2014-10-06 15:08:59,542 DEBUG [c.c.v.VmWorkJobDispatcher] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161) Done with run of VM work 
job: com.cloud.vm.VmWorkStart for VM 13, job origin: 160
2014-10-06 15:08:59,542 ERROR [c.c.v.VmWorkJobDispatcher] 
(Work-Job-Executor-71:ctx-57f37864 job-160/job-161) Unable to complete 
AsyncJobVO {id:161, userId: 2, accountId: 2, instanceType: null, instanceId: 
null, cmd: com.cloud.vm.VmWorkStart, cmdInfo: 
rO0ABXNyABhjb20uY2xvdWQudm0uVm1Xb3JrU3RhcnR9cMGsvxz73gIAC0oABGRjSWRMAAZhdm9pZHN0ADBMY29tL2Nsb3VkL2RlcGxveS9EZXBsb3ltZW50UGxhbm5lciRFeGNsdWRlTGlzdDtMAAljbHVzdGVySWR0ABBMamF2YS9sYW5nL0xvbmc7TAAGaG9zdElkcQB-AAJMAAtqb3VybmFsTmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO0wAEXBoeXNpY2FsTmV0d29ya0lkcQB-AAJMAAdwbGFubmVycQB-AANMAAVwb2RJZHEAfgACTAAGcG9vbElkcQB-AAJMAAlyYXdQYXJhbXN0AA9MamF2YS91dGlsL01hcDtMAA1yZXNlcnZhdGlvbklkcQB-AAN4cgATY29tLmNsb3VkLnZtLlZtV29ya5-ZtlbwJWdrAgAESgAJYWNjb3VudElkSgAGdXNlcklkSgAEdm1JZEwAC2hhbmRsZXJOYW1lcQB-AAN4cAAAAAAAAAACAAAAAAAAAAIAAAAAAAAADXQAGVZpcnR1YWxNYWNoaW5lTWFuYWdlckltcGwAAAAAAAAAAHBwcHBwcHBwc3IAEWphdmEudXRpbC5IYXNoTWFwBQfawcMWYNEDAAJGAApsb2FkRmFjdG9ySQAJdGhyZXNob2xkeHA_QAAAAAAADHcIAAAAEAAAAAF0AApWbVBhc3N3b3JkdAAcck8wQUJYUUFEbk5oZG1Wa1gzQmhjM04zYjNKa3hw,
 cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: 
null, initMsid: 90520745720479, completeMsid: null, lastUpdated: null, 
lastPolled: null, created: Mon Oct 06 15:08:58 EEST 2014}, job origin:160
com.cloud.exception.InsufficientServerCapacityException: Unable to create a 
deployment for VM[User|i-2-13-VM]Scope=interface com.cloud.dc.DataCenter; id=1
        at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:946)
        at 
com.cloud.vm.VirtualMachineManagerImpl.orchestrateStart(VirtualMachineManagerImpl.java:5190)
        at sun.reflect.GeneratedMethodAccessor195.invoke(Unknown Source)
------------------------------------------------

Strange - I have enough resources to create it from the scratch.  Why does it 
different  for "stop-start" ?
The second thing that I am worry -- "The last host of this VM is in avoid set 
".   May be this is the reason of failure?

Vadim.


-----Original Message-----
From: Erik Weber [mailto:terbol...@gmail.com] 
Sent: Monday, October 06, 2014 3:28 PM
To: users@cloudstack.apache.org
Subject: Re: CS 4.4.0 and XenServer 6.2. Stopping VM destroys it.

On Mon, Oct 6, 2014 at 2:10 PM, Vadim Kimlaychuk <vadim.kimlayc...@elion.ee>
wrote:

> Hello,
>
>             Have found very unplesent behaviour : when I execute „stop 
> instance“ command Cloudstack actually destroys VM from hypervisor. No 
> errors or other warnings has been issued.



AFAIK that is normal, you don't need the VM definition on the hypervisor, 
CloudStack will recreate it when needed.


> Management log shows:
>
> 2014-10-06 14:55:37,365 DEBUG [c.c.a.t.Request]
> (Work-Job-Executor-70:ctx-ea29a5b5 job-158/job-159 ctx-65d35099) Seq
> 1-1867586470475218798: Sending  { Cmd , MgmtId: 90520745720479, via:
> 1(xcp1), Ver: v1, Flags: 100011,
> [{"com.cloud.agent.api.StopCommand":{"isProxy":false,"executeInSequenc
> e":false,"checkBeforeCleanup":false,"vmName":"i-2-13-VM","wait":0}}]
> }
> 2014-10-06 14:55:37,365 DEBUG [c.c.a.t.Request]
> (Work-Job-Executor-70:ctx-ea29a5b5 job-158/job-159 ctx-65d35099) Seq
> 1-1867586470475218798: Executing:  { Cmd , MgmtId: 90520745720479, via:
> 1(xcp1), Ver: v1, Flags: 100011,
> [{"com.cloud.agent.api.StopCommand":{"isProxy":false,"executeInSequenc
> e":false,"checkBeforeCleanup":false,"vmName":"i-2-13-VM","wait":0}}]
> }
>
> ……
>
> Then shortly after that:
> 2014-10-06 14:56:24,867 DEBUG [c.c.h.x.r.CitrixResourceBase]
> (DirectAgent-282:ctx-29a6d080) 10. The VM i-2-13-VM is in Stopped 
> state
>
> But when I go to XEN dom0 and run „xe vm-list“ there is no VM anymore.
> And I can’t obviously start it again. Shows error “Job failed due to 
> exception Unable to create a deployment for VM[User|i-2-13-VM]“
>

Could you get more log output as to why it fails to create a deployment?
Best is to tail the log 1 second before you hit launch, and paste the log 
content on pastebin after the exception occurs.


--
Erik

Reply via email to