As some of you may know during your investigation or testing phases of looking at a new virtualisation platform, things go wrong or some settings weren't set correctly. This (for me at least) seems to happen more often than not with Apache's CloudStack platform.

Several times (as a beginner to it), I have found that I have set up the networks wrong or missed a step when setting up the Secondary Storage VM (SSVM). This can be a real pain and lead to many hours of trying to fix a problem which, as it seems to be, is impossible to fix once the system has already been configured.

In my case, networking was a huge problem as we only had a single /24 network available to test with. However CloudStack implies that you need to separate your Guest and Management networks in order for it to work. While this in itself is not true, it is highly recommended that you do.

In a production environment, you would NEVER put the Guest and Management networks on the same subnet... ever. Not only is it a very large security risk, but it is a very bad habit to get into.

CloudStack does not provide you an easy way to reset everything to default settings, or even run the Zone creation wizard again.

In order to reset CloudStack back to its default settings, we need to perform a few steps.

Note: I am going to assume that because your configuration doesn't allow you to create instances or upload templates/ISO's, that you don't have any other running VM's etc.

1. Destroy any running System VM's

This may be optional, but I don't want any excess VM's potentially running in the background after we reset the CloudStack Management Interface.

2. Run the following script

This script will remove any settings that the Management Server had and reinstall the base CloudStack settings

#!/bin/bash
/etc/init.d/cloudstack-management stop
mysql -p<password> -e 'drop database cloud'
mysql -p<password> -e 'drop database cloud_usage'
 
cloudstack-setup-databases cloud:<password>@localhost --deploy-as=root:<password>
rm -rf /var/log/cloud/management/*
cloudstack-setup-management
/etc/init.d/cloudstack-management start

 3. Access the Management Server

Now that the script has finished running, you should be able to access the control panel again on http://<management-server>:8080/client

 

Tips:

If you need to run on a single /24 subnet, when creating your Pod, select a smaller IP pool for the Pod and the Guest network and make sure they are the same details as the current network that you know works.

  • ie. Main network: 10.0.0.0/24
    • Set Guest Network to:
      • 10.0.0.1 - 10.0.0.100
    • Set Management Network to:
      • 10.0.0.101 - 10.0.0.200

NOTE: CloudStack CAN steal IP addresses, so it is recommended that you choose a smaller pool of IP addresses that you can dedicate.