This guide is geared more towards CS 4.0 (build 140) and vSphere5, however, the same concept should apply to other hypervisors types like KVM and XEN. This is NOT a beginners guide, please use your judgement and substitute values as necessary.
If you attempted to create Advanced Networking - but for some reason it did not work and you would like to start over
The example environment in this tutorial consists of:
Physical gear and OS:
Hypervisor Network Layout - same on all 3 hosts:
--------------------------------------------------------------
SSH to your CS4 environment
Mount the secondary NFS storage to /mnt/secondary on CS4
Run
/usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary/ -u http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova -h vmware
It is recommended to create layout of how you believe CloudStack IP allocation will take place, hence a quick write up of what networks get what assignments is very helpful. In my case, i wanted to be able to deploy DEV and MGMT VMs on vSwitch2 that uses VLAN tagging, while CS Managment/Storage VMs would reside on vSwitch0 (w/o VLAN tag). If you would like to move your CS Management VMs to VLAN tag'ed network - you will need to confirm that you meet minimum requirements for CS described in Setup Guide and alter the CS Global Settings to change the default portgroup name "Management Network" for vmware - if its different.
Network we need to define before we begin:
Below is the sample table created for easy of IP space accounting
VmWare Virtual Switch |
CS Physical Network |
VmWare PortGroup Name |
Network |
Subnet |
Gateway |
VLAN TAG |
Network Type |
Network IP Range |
---|---|---|---|---|---|---|---|---|
vSwitch0 |
vSwitch0-CS-Dev-MGMT-PN |
Management Network |
10.25.243.0 |
255.255.255.0 |
10.25.243.1 |
NONE |
CS Management |
10.25.243.140 - 10.25.243.146 |
vSwitch0 |
vSwitch0-CS-Dev-MGMT-PN |
Management Network |
10.25.243.0 |
255.255.255.0 |
10.25.243.1 |
NONE |
CS Storage |
10.25.243.147 - 10.25.243.149 |
vSwitch2 |
vSwitch2-CS-Dev-Public-PN |
MGMT |
10.25.243.0 |
255.255.255.0 |
10.25.243.1 |
1045 |
Public |
10.25.243.195 - 10.25.243.199 |
vSwitch2 |
vSwitch2-CS-Dev-Public-PN |
DEV |
10.28.18.0 |
255.255.254.0 |
10.28.18.1 |
1075 |
Public |
10.28.19.195 - 10.28.19.199 |
vSwitch2 |
vSwitch2-CS-Dev-MGMT-PN |
MGMT |
10.25.243.0 |
255.255.255.0 |
10.25.243.1 |
1045 |
Guest |
10.25.243.150 - 10.25.243.194 |
vSwitch2 |
vSwitch2-CS-Dev-DEV-PN |
DEV |
10.28.18.0 |
255.255.254.0 |
10.28.18.1 |
1075 |
Guest |
10.28.19.150 - 10.28.19.194 |
You will need administrative VC user and password when configuring vSphere Cluster with CS.
The above table gives you an overview of what I have setup. Please note that while i have listed 6 Physical Network names - we only need to create 4.
vSwitch0-CS-Dev-MGMT-PN, vSwitch2-CS-Dev-Public-PN, vSwitch2-CS-Dev-MGMT-PN and vSwitch2-CS-Dev-DEV-PN.
Moreover, the concept of Public IP space in Advanced Network Shared setup does not apply - as it is meant to be used for internal Non-Isolated network. Therefore, i've allocated a very small amount of public IP space that will be used by CS management VMs only. If you are using Isolated mode, then you should assign more public IP addresses.
Before you begin - you can see my cluster network setup in Virtual Center. I've removed all the remnants of existing CS network setup as i've done this several times before.
This screenshot shows the storage setup - also clean from previous CS storage setup attempts.
Next is to import the System VM image for VmWare.
Login to CS with user that has admin privileges, this screenshot has Citrix CloudPlatform Logo - which is a bug that will be addressed in CS4.0.1
Navigate to Infrastructure > Zones, click Add Zone
Choose Advanced Zone
.
Complete the required fields for Setup Zone page
When you get to Setup Network, define your Physical Network Names, in my case I created 4 Physical Networks - as defined in Network Map above.
Note that I've placed CS Management and Storage Traffic on vSwitch0-CS-Dev-MGMT-PN
The Public traffic on vSwitch2-CS-Dev-Public-PN
The Guest traffic for 2 of my tagged VLANs on vSwitch2-CS-Dev-MGMT-PN and vSwitch2-CS-Dev-DEV-PN.
Press Edit on each Traffic Type and and specify the respective VmWare vSwitch (reminder you must use non distributed virtual switch - the support for dVs will be in CS version 4.1).
Once you've defined all VMWare Traffic Labels for all of your Traffic Types, proceed to the next step.
Screenshot shows how i've defined 2 Public Networks for DEV and MGMT. This is only required of your are using Isolated Mode in your Network Offering. To make an analogy of what Isolated mode means, look at how AWS does IaaS. They offer an Internal IP address as well as External IP address. If If you are planning to run your environment in traditional manner where NATing is handled by Firewalls, your don't need to define Public Network for your guest VMs. A small public network IP range is required only for Management VMs.
Define you POD on the page below as well as IP space for CS Management Network
I've purposely left VLAN Range blank for both Physical Networks on Guest Traffic and will do this through API/CLI commands later. This function has not worked as expected through UI interface and Network has not been created.
On the Storage Traffic page, define the IP range for your storage network. For simplicity, i did not use a VLAN tagged network.
The screenshot below defined the VmWare cluster information, you will need a user that is able to login to a virtual center with administrative privileges.
Primary storage is where your guest VMs are going to live.In this example its NFS based, make sure you have proper network access to CS and your hypervisors.
Secondary storage is where your templates are going to reside, make sure it has proper network access to CS and your hypervisors.
Last but not least - if you've done everything properly, you should see a Ready Page to Launch a Zone.
I'd strongly recommend to open Virtual Center and look for all the progress CS makes when it goes through the setup process. At the same time, i would launch an ssh session to cloudstack server and tail the /var/log/cloud/management/management-server.log.
Note that you will be getting occasional warning and errors - as it tries to deploy multiple components - this is normal.
The initial setup process may take upto 10 minutes depending on your environment. I'd recommend to wait it out and proceed only once the initial setup is successful.
Here is an example of what you may see...
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.