Cloudstack emptying the configuration method

Source: Internet
Author: User
Tags mysql query uuid cloudstack
Step One: Re-initialize the Cloudstack database
1), Stop Cloudstack service. Service Cloudstack-management Stop
2), to MySQL query select uuid from Storage_pool; Remove the stored Sr.

[Root@aa ~]# mysql-u root-p

password:mysql> use cloud;
Database changed
Mysql> select UUID from Storage_pool;
+ ———————————— –+
| UUID |
+ ———————————— –+
| 6550eb15-daed-363e-be38-7e76bcd973ec |
| 7abfabe4-7081-3b1e-8ab3-4dcbc9633636 |
| db8002d3-1c41-383c-bab3-a561b9583547 |
+ ———————————— –+
3 Rows in Set (0.00 sec)
3), delete cloudstack database, drop DB cloud; Drop database cloud_usage;

[Root@aa ~]# mysql-u root-p

Password:welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 11958
Server version:5.0.77 Source Distribution
Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the buffer.
mysql> drop Database cloud; Drop database cloud_usage;
4), redeploy the Cloudstack database cloud-setup-databases Cloud:password@localhost–deploy-as=root:password
[Root@aa ~]# cloud-setup-databases Cloud:password@localhost–deploy-as=root:password
Testing specified deployment credentials on server localhost:3306
Setting up user credentials in:
-/etc/cloud/management/db.properties ... done.
Applying file/usr/share/cloud/setup/create-database.sql to the database on server localhost:3306
Applying file/usr/share/cloud/setup/create-schema.sql to the database on server localhost:3306
Applying file/usr/share/cloud/setup/create-database-premium.sql to the database on server localhost:3306
Applying file/usr/share/cloud/setup/create-schema-premium.sql to the database on server localhost:3306
Applying file/usr/share/cloud/setup/server-setup.sql to the database on server localhost:3306
Applying file/usr/share/cloud/setup/templates.sql to the database on server localhost:3306
Applying file/usr/share/cloud/setup/create-index-fk.sql to the database on server localhost:3306
  
5), Cloud-setup-management
[Root@aa ~]# Cloud-setup-management
Starting to configure Elasterstack Management Server:
Configure sudoers ... [OK]
Configure Firewall ... [OK]
Configure CloudStack Management Server ... [OK]
Elasterstack Management Server Setup is done!
Step Two: Initialize primary storage and level two storage
1), delete all files in primary storage and level two storage
Step three: Prepare for level two storage
1), mount the two-level storage NFS directory on the Management node:/export/secondary.
# mkdir-p/mnt/secondary
# mount-t NFS 172.16.204.111:/export/secondary/mnt/secondary/
2), download SYSTEMVM file
3), unzip the SYSTEMVM file
#/usr/lib64/cloud/agent/scripts/storage/secondary/cloud-install-sys-tmplt-m/mnt/secondary-f systemvm.vhd.bz2-h Xenserver-f
4), after completion, uninstall level two storage
#umount/mnt/secondary/
Fourth step: Reinstall the Hypervistor on the host.
If you do not want to reinstall the Hypervistor on the host, refer to the 2nd item in the first step to delete the stored Sr.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.