Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

THIS DOCUMENT IS STILL BEING WORKED ON!!

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.

Disclaimer

The CS4.0 build 140 is defined on purpose in this document - there are known UI issues that have been already addressed - however, since no update/patch has been officially released to address these issues (at the time of this writing)  - in order to configure Advanced Networking - we must use API calls to substitute what GUI could not accomplish. The newer releases should address the UI limitations and API calls may not be necessary. Nevertheless, its a good learning experience.

...

  • If you've tried previously to configure CS within your environment and it has not worked, before you begin, make sure you environment is clean from all previous attempts. I will use VSphere 5 as an example, translate it to a hypervisor of your choice.
  • Remove all network modifications on your Hypervisors/Cluster created by CS
  • Remove all storage modifications on your Hypervisors/Cluster created by CS
  • Remove all the content from NFS primary and secondary datastore (i'm making assumption that data is not needed) or present a new primary and secondary NFS datastore
  • Remove all the references from CS about the zone/pod/cluster/storage/networks/hosts you attempted to add but failed
    If there are remnants of previous setup - there is a chance your Zone Deployment may fail - therefore, please confirm that your environment is in pristine state as it was pre-CloudStack Zone Deployment operation

...

VmWare Virtual Switch

CS Physical Network

VmWare PortGroup Name

Network

Subnet

Gateway

VLAN TAG

CS Traffic 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

...

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 addressesspace, if you are running traditional Shared internal environment - then 5 IPs on each network should be enough.

Step 3: Add Zone/POD/Cluster via UI

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 iI've done this several times before.
 

...

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.

...

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.
 

...

To test it, run "list zones" command, the example screenshot is below.

Step 5: Creating Network Offering

...

In order for VMs to have network functinality we need to create a network offering and networks. 

Network Offering is a collection of network services VM will have an access to. For example, if you would like to have DHCPD, DNS, LoadBalancing and UserData services offered, we need to create Network Offering with following these services.

In order to create the Network Offerings, we must first Tag our Guest Traffic in Physical Networks in CloudStack.

Navigate to Infrastructure, Zones, choose your Zone and press on Physical Network.

RAW IMAGES - NOT YET DOCUMENTED

     

  

  

 
  Image Removed

  Image Removed

  Image Removed

  Image Removed

  Image Removed

Image Added

Press on each Physical Network that has a Guest Traffic Type and define a tag. My setup has only 2 Guest Traffic Types, 1 in each Physical Network respectively. In the example below, you will see that I use {Physical Network Name}-Guest-tag, this naming convention is optional and only my preference. Make sure to leave VLAN information blank, we will do this portion through API/CLI shortly.

  Image Added

Upon completion, navigate to Service Offerings and choose Network Offering from the drop down menu and press on "Add network offering" button. In this example, I kept it very basic and only enable DHCP, DNS and UserData services that are offered by Default Virtual Router system offering that comes with CS. For the proof of concept, i suggest keeping it simple - you can revisit this section and add more services once you get your environment functional with VLAN tagging.

  Image Added

Once you service offering has been created, open it by pressing on its name and enable it.

  Image Added

Part 6: Create networks through CloudMokey CLI

In order to create the networks for each of our Guest Traffic Types, we need to get the following information from API/CLI.

ZoneID - the ID of the zone you've created in Step 3
NetworkOfferingID - the ID of the network offering created in Step 5
PhysicalNetworkID - in this example i have 2 physical network ID
Network Information - this includes ip range, subnet mask, gateway and vlan for each Guest Traffic.

Below is the set of screenshots and commands i run in order to get the required IDs.

Code Block

list zones | grep -iE 'id|name|----'
list networkofferings | grep -iE 'id|name|----'
list physicalnetworks

 

 

 

Note the required IDs and keep them handy for the next step of creating a network. You can see the command i've executed below. This screenshot shows an example of how I created the CS-DEV-vSwitch2-DEV-Network

 

One more run for the CS-DEV-vSwitch2-MGMT-Network

  Image Added

If all is done correctly, you can navigate to a Networks in CS and see your Networks displayed.

    Image Removed

Almost done, in order to activate these networks, we will need to deploy an instance from one of the templates and choose the network offering you've created. I'm not putting any screenshots for that part - as I assume you know how to do that.

Troubleshooting

If for some reason, the deployment did not go as expected, here are some pointers of what you can do to understand and correct the issue.

  • Inspect the /var/log/cloud/management/management-server.log for specifics of what CloudStack Core does. 
  • Inspect the /var/log/cloud/management/api-server.log to see what API commands have been executed and error details if it failed.
  • Review the Virtual Center Recent Task tab for additional information on what CS does.

How to get more help?
CloudStack community is very involved and helps users fairly quickly.
First, please search the existing mailing lists for cloudstack-users and cloudstack-dev on http://markmail.org/ 
Reach out to cloudstack-users mailing list and join our IRC channel on irc.freenode.com - channel #cloudstack 

Author Info

This document is written and maintained by ilya musayev, IRC: serverchief