Re: Unable to create a New VM - Error message: Unable to start instance due to Unable to get answer that is of class com.cloud.agent.api.StartAnswer

2016-03-18 Thread Nezar Madbouh
Hi Simon,

Yes existing VMs are successfully running. Yesterday I was able to create a
VM in Dev Environment but I can't create VMs in Prod environment.

Thanks,
Nezar.

On 18 March 2016 at 09:12, Simon Weller  wrote:

> I'm assuming you have other VMs successfully running, correct? So you can
> write to your primary storage.
>
>
>
> 
> From: Nezar Madbouh 
> Sent: Thursday, March 17, 2016 4:43 PM
> To: users@cloudstack.apache.org
> Subject: Re: Unable to create a New VM - Error message: Unable to start
> instance due to Unable to get answer that is of class
> com.cloud.agent.api.StartAnswer
>
> Hi Simon and Shweta,
>
> Please see the result below:
>
> root@s-11-VM:~# /usr/local/cloud/systemvm/ssvm-check.sh
> 
> First DNS server is  8.8.8.8
> PING 8.8.8.8 (8.8.8.8): 48 data bytes
> 56 bytes from 8.8.8.8: icmp_seq=0 ttl=57 time=5.209 ms
> 56 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=0.936 ms
> --- 8.8.8.8 ping statistics ---
> 2 packets transmitted, 2 packets received, 0% packet loss
> round-trip min/avg/max/stddev = 0.936/3.072/5.209/2.137 ms
> Good: Can ping DNS server
> 
> Good: DNS resolves download.cloud.com
> 
> nfs is currently mounted
> Mount point is /mnt/SecStorage/d11d5c92-6950-30e8-a0b5-3cd46a17ec14
> Good: Can write to mount point
> 
> Management server is 10.61.153.20. Checking connectivity.
> Good: Can connect to management server port 8250
> 
> Good: Java process is running
> 
> Tests Complete. Look for ERROR or WARNING above.
> root@s-11-VM:~#
>
> Thanks & Regards,
> Nezar.
>
> On 17 March 2016 at 09:42, Simon Weller  wrote:
>
> > Nezar,
> >
> > Log into the Cloudstack UI.
> >
> > Click on "Infrastructure" on the left menu. Click on  View All below
> > "System VMs". find the item marked "Secondary Storage VM"  and then click
> > on the Name of that VM on the left (it will be s--VM). You'll see a
> > bunch of information about the VM. Find the Host line and also the Link
> > Local IP Address line and then follow the original instructions in my
> > previous email.
> >
> > - Si
> >
> >
> >
> >
> >
> > 
> > From: Shweta Agarwal 
> > Sent: Wednesday, March 16, 2016 12:16 AM
> > To: users@cloudstack.apache.org
> > Subject: Re: Unable to create a New VM - Error message: Unable to start
> > instance due to Unable to get answer that is of class
> > com.cloud.agent.api.StartAnswer
> >
> > Hi Nezar,
> >
> > You can find host name on detail view of SSVM in UI .
> > You can also use list api command listSystemVms to get the host details
> of
> > system vms.
> >
> > Thanks
> > Shweta
> >
> >
> > 
> > From: Nezar Madbouh 
> > Sent: Wednesday, March 16, 2016 9:58 AM
> > To: users@cloudstack.apache.org
> > Subject: Re: Unable to create a New VM - Error message: Unable to start
> > instance due to Unable to get answer that is of class
> > com.cloud.agent.api.StartAnswer
> >
> > Hi Simon,
> >
> > How can I find out which host the SSVM is on?
> >
> > Thanks & Regards,
> > Nezar.
> >
> > On 16 March 2016 at 12:28, Simon Weller  wrote:
> >
> > > Can you ssh into the Secondary Storage VM?
> > >
> > > This can be done by getting the link-local-ip address from the
> > > infrastructure menu in the UI and then sshing into the host the SSVM is
> > on
> > > and issuing this command as root: ssh -i /root/.ssh/id_rsa.cloud -p
> 3922
> > > root@link-local-ip  (replace link-local-ip with the link local ip).
> > >
> > > Try  running the SSVM diangnostic script:
> > > usr/local/cloud/systemvm/ssvm-check.sh
> > >
> > > - Si
> > > 
> > > From: Nezar Madbouh 
> > > Sent: Tuesday, March 15, 2016 7:49 PM
> > > To: users@cloudstack.apache.org
> > > Subject: Re: Unable to create a New VM - Error message: Unable to start
> > > instance due to Unable to get answer that is of class
> > > com.cloud.agent.api.StartAnswer
> > >
> > > Hi Simon,
> > >
> > > Please see details below:
> > >
> > >
> > > mysql> use cloud; select id, name, status, type from host where id = 5;
> > > Reading table information for completion of table and column names
> > > You can turn off this feature to get a quicker startup with -A
> > >
> > > Database changed
> > > ++--++-+
> > > | id | name | status | type|
> > > ++--++-+
> > > | 5 | eqx-cs-cmp-02.ipscape.com.au | up | routing |
> > > 

Re: bash script to create, start, stop and destroy a large number of VM in CloudStack

2016-03-18 Thread ilya
+1, looked through the script - looks good.

Over past few years, many wrote bunch of handy utilities to administer
cloudstack. We need to somehow merge all the scripts into 1 github repo..



On 3/16/16 12:29 PM, Thomas Schneider wrote:
> Hi all,
> 
> I created a small bash script to create, start, stop and destroy a large
> number of VM in CloudStack.
> I use it to do some test on new Cloudstack setup. It work with Cloudmonkey.
> If it can help someone.
> https://github.com/vascodaroxor/cloudstack-cloudzor
> 
> Regards,
> 


unable to create a VPC 4.8.0 after upgrading 4.3.1

2016-03-18 Thread kotipalli venkatesh
Hi All,

Our cloud information:

CS version: 4.3.1
Xenserver Version : 6.2

we are using 4.6 Template to upgrade from 4.3.1 to 4.8.0.

After upgrade 4.3.1 to 4.8.0 we are unable to create a network(VPC) and if
we are rebooting an existing  VPC router is then we are getting below error:

*r-14VM login: Traceback (most recent call last):*

* File "/opt/cloud/bin/baremetal-vr.py", line 28, in *
* from flask import flask*
*ImportError: No module named flask*


Is there any one facing this type of same scenario please give me
suggestions so we can step in to the next level.

Since we are keep on posting 2 months back. but still we are facing the
same issue now a days all guys are full busy to  share the mutual knowledge.

we are suspecting that  instead of 4.8 template 4.6 template using it might
be cause.
Please release the 4.8.0 Template as soon as possible.

Regards,
Venkatesh.k


Re: [Where are the snapshot file]

2016-03-18 Thread Gian Paolo Buono

Hi all,
In my environment i have many snapshot in state "Allocated" but in table 
snapshot_store_ref no record associated.
EX:
select id from snapshots where status = 'Allocated';
1020
select * from snapshot_store_ref where snaphot_id = 1020;
Empty set (0.00 sec)

Can i delete this entry or  I must set Destroyed state ?
Thanks
On 03/18/2016 11:35 AM, Stavros Konstantaras wrote:

It seems that CS 4.6 does not have enough logic to handle correctly the 
snapshots. In my case, it was an expunged volume that used to create the 
problem as snapshots of this volume still existed (both in DB and in secondary 
storage). So I created a manual workaround to bypass this problem by making our 
hands dirty in MySQL:

- Stop CS service

- In MySQL find the expunged volume in “volumes" table and keep the volume_id

- In “snapshot_store_ref" table get the location of the snapshots by using the 
mentioned volume_id. Then go to the secondary storage and delete all the 
relevant files (since now we know the exact location)

- Now it’s time to update the tables by running the following SQL commands:  
   where XXX is the volume id of 
the second step.

- Start CS service and check the snapshots output. The problem should be gone.

Hope that helps some fellows.

Regards
Stavros



Stavros Konstantaras
Science faculty Research IT support (FEIOG)
University of Amsterdam, Science Park 904, 1098 XH

Fingerprint: E5E5 9B19 D1CD 88CD 4763  3465 A8DC 7C92 330F D59A



On 16 Mar 2016, at 11:05, Stavros Konstantaras 
 wrote:

Hi Adrian,

Firstly, thanks for your extensive answer and the trick. My problem is similar 
to the CLOUDSTACK-8845 issue. In our case we just try to view the snapshots 
from cloudstack UI instead of listing them in cloud monkey. My first thoughts 
are that probably  some inconsistencies exist in the database but unfortunately 
after running the following mysql commands I don’t get any results.

< select volume_id,name,status from cloud.snapshots where volume_id not in 
(select id from cloud.volumes); >
< select * from cloud.snapshot_store_ref where volume_id not in (select id from 
cloud.volumes); >

Any other ideas to find out the inconsistencies and get rid of them? In 
addition, I checked the log file of cloudstack-management server and I don’t 
see the error you mentioned. I use CS 4.6 and XenServer 6.5

Thanks again.

Regards
Stavros


Stavros Konstantaras
Science faculty Research IT support (FEIOG)
University of Amsterdam, Science Park 904, 1098 XH

Fingerprint: E5E5 9B19 D1CD 88CD 4763  3465 A8DC 7C92 330F D59A



On 16 Mar 2016, at 07:43, Adrian Sender 
 wrote:

Hi Stravos,

A bit more info with ongoing snapshot issues with Xenserver.. your snapshots
may also be failing if your chain depth exceeds 30.

Assuming your using LVMoHBA (hardware hba), easiest way to check this is as
follows:

If the xenserver snapshot chain depth exceeds 30, you will not be able to take
any new snapshots.

You may see a similar error: (note exact error will depend on CCP / CS version..

2015-11-18 10:57:42,133 WARN  [c.c.h.x.r.XenServerStorageProcessor]
(DirectAgent-243:ctx-341ac146) (logid:65b51cbd) create snapshot operation
Failed for snapshotId: 36709, reason: SR_BACKEND_FAILURE_109The snapshot chain
is too long
SR_BACKEND_FAILURE_109The snapshot chain is too long


Example
===
[root@qh2-nsp04 ~]# vhd-util query -vsfd -n
/dev/VG_XenStorage-3965cb14-960e-d9d5-4ab9-608425f3ee20/VHD-7bf051ee-7762-4902-84be-4962e70a4e3e
-p
10240
1145303552
/dev/mapper/VG_XenStorage--3965cb14--960e--d9d5--4ab9--608425f3ee20-VHD--811a34ff--731a--4c36--92be--286831ab7393
hidden: 0
chain depth: 30

The best way to get the LVM path is as follows:

mysql> select * from volumes where name='ROOT-3230' \G

We are looking for the path, in this case "7bf051ee-7762-4902-84be-4962e70a4e3e"

Login to Xenserver console and do "lvscan | grep
7bf051ee-7762-4902-84be-4962e70a4e3e" This will give us VG and LV.

Then you can execute vhd-util query -vsfd -n
/dev/VG_XenStorage-3965cb14-960e-d9d5-4ab9-608425f3ee20/VHD-e00cd7a7-ae20-4b5d-a0e3-1c215d432ed4

Delete the broken snapshots from the primary storage in XenCenter.

Regards,
Adrian Sender

Testlabs Australia
Research Platform Services
M: +61. 487-440-732
E: asen...@testlabs.com.au
W: http://www.testlabs.com.au

-- Original Message ---
From: "Adrian Sender" 
To: users@cloudstack.apache.org
Sent: Wed, 16 Mar 2016 09:59:34 +1000
Subject: Re: [Where are the snapshot file]



Hi Stravos,

Jumping in a bit late on this thread...Can you share the exact
management log error.

We have ran CCP 4.3 with Xenserver, everything is generally ok; most
common snapshot issues are as follows:

Snapshot failing