Useful Tips and TricksThis is a work in progress and most data is in bits-and pieces. Some of it is sketchy. Please help improve the article further. It's a wiki and self-organizing so everyone is encouraged to contribute and improve the knowledge base.
Compiled here are a list of tips and tricks on how to monitor, debug a running cloudstack instance (in no particular order). List down the problems you come across often and how you resolve them. Once there is sizable content here we can consider organizing it into logical categories
1. To list all the queries hitting the CloudStack database For seeing this one must enable the general query log of mysql
mysql> show variables like '%log%' ;
mysql> set global general_log= ON ;
|
The default location of the general query log on most distributions is /var/run/mysqld/mysqld.log 2. Unable To Migrate the Instances which are with vCenter Check if vMotion is enabled [http://kb./selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1036145]
To enable vMotion
1) Log in to vCenter Server using the vSphere Client.
2) Click the ESX host.
3) Click the Configuration tab.
4) Under the Hardware section , click Networking.
5) Click Properties for the virtual switch where a VMkernel port has been configured.
6) In the dialog box that opens, select vmkernel in the Ports tab and click Edit.
7) To enable vMotion, select Enabled next to vMotion and click OK.
|
3. How to get the CloudStack version from database?
mysql> select * from cloud.version order by id desc limit 1;
|
+----+---------+---------------------+----------+
| id | version | updated | step |
+----+---------+---------------------+----------+
| 2 | 3.0.1 | 2012-04-03 06:42:06 | Complete |
+----+---------+---------------------+----------+
1 row in set (0.00 sec)
4. How to get the complete details of a vm instance?
mysql> select * from cloud.vm_instance;
|
5. How to enable trace logging for a particular class in CloudStack? Add the following lines to /etc/cloud/management/log4j-cloud.xml where namespace.of.your.class is the something like com.cloud.utils for example 6. How to enable the ssh in vmware esx server
Edit the configuration file for SSH with the command:nano /etc/ssh/sshd_config
Find the line that starts with PermitRootLogin and change the no to yes. You can find this line about 2 pages down from the top. Save the file by first pressing Ctrl-O and then Enter.
. Exit with Ctrl-X.
Restart the sshd service with the command:
service sshd restart
|
7. Possible causes for Host to get into Alert State are :
1 ) Ping times out
2 ) Network connectivity is lost
3 ) Primary storage didn't mount correctly
4 ) Heart beat has failed
|
8. Failed to deploy Virtual Router : Reasons
1 )No capacity in hypervisor - CPU/Memory
2 )No ip address( public ) availability
3 )No storage space available
4 )System vm template has not been properly downloaded to primary storage while deploying first vm in account
|
|