Hugo Future Imperfect Slim

Tech Notes


3-Minute Read

Building cloudstack on Mac os

Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used by a number of service providers to offer public cloud services, and by many companies to provide an on-premises (private) cloud offering, or as part of a hybrid cloud solution.

  1. Install Brew ( package manager)
/bin/bash -c "$(curl -fsSL"
  1. Install git
brew install git 
  1. Install Python and pyenv ( in order to manage multiple python versions)
brew install python
brew install pyenv

Pouplate the .zshrc to

if command -v pyenv 1>/dev/null 2>&1; then
    eval "$(pyenv init -)"

Make sure to install python version 3.8.10 in order to run some sample tests

pyenv versions

pyenv install 3.8.10

pyenv global 3.8.10

check the version of python and python3

python --version
python3 --version
  1. Install java runtime
brew install --cask temurin
brew tap homebrew/cask-versions
sudo softwareupdate --install-rosetta
brew install --cask temurin11

In .zshrc file add the following line

export PATH="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin:${PATH}

Verify the java version

java --version 

❯ java --version
openjdk 11.0.19 2023-04-18
OpenJDK Runtime Environment Temurin-11.0.19+7 (build 11.0.19+7)
OpenJDK 64-Bit Server VM Temurin-11.0.19+7 (build 11.0.19+7, mixed mode)
  1. Install Maven

Download the maven from

tar -xvf apache-maven-3.9.1-bin.tar.gz
mv apache-maven-3.9.1 /usr/local/bin/

In .zshrc file add the following line

export PATH="/usr/local/bin/apache-maven-3.9.1/bin:${PATH}"
mvn --version

Apache Maven 3.9.1 (2e178502fcdbffc201671fb2537d0cb4b4cc58f8)
Maven home: /usr/local/bin/apache-maven-3.9.1
Java version: 11.0.19, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
Default locale: en_IN, platform encoding: UTF-8
OS name: "mac os x", version: "13.2.1", arch: "aarch64", family: "mac"
  1. Install mysql
brew install mysql

vi  /opt/homebrew/etc/my.cnf

server_id = 1
binlog-format = 'ROW'
# add the following for MySQL 8.x

brew services start mysql
  1. Install the Noredist CloudStack builds requires additional jars

git clone "
cd cloudstack-nonoss
bash -x
  1. Building Cloudstack and running the maangement server
git clone ""

To build specific version of cloudstack 

git checkout 4.17.2 

cd  cloudstack 

To build specific version of cloudstack 
git checkout 4.17.2 

vi .python-version 

mvn clean install -Dnoredist -P developer,systemvm

mvn -Pdeveloper -pl developer -Ddeploydb

Run the management server 

mvn -pl :cloud-client-ui jetty:run -Dnoredist or

mvn -pl :cloud-client-ui jetty:run -Dnoredist
  1. Building Cloudstack simulator and running it
mvn clean install -Dsimulator -P developer,systemvm
mvn -Pdeveloper -pl developer -Ddeploydb
mvn -Pdeveloper -pl developer -Ddeploydb-simulator
mvn -pl :cloud-client-ui jetty:run -Dsimulator
  1. Running Cloudstack UI
curl -o- | bash

nvm install v14

node -v

npm -v

cd cloudstack/ui

npm install
npm run serve
  1. Deploying resources and running Test
$ pip3 install --upgrade tools/marvin/dist/Marvin-*.tar.gz

$ python3 tools/marvin/marvin/ -i setup/dev/advanced.cfg

$nosetests -v --with-marvin   --marvin-config=setup/dev/advanced.cfg   --with-xunit   --xunit-file=xunit.xml   -a tags=advanced,required_hardware=false   --zone=Sandbox-simulator   --hypervisor=simulator    test/integration/smoke/

Ref Links

comments powered by Disqus

Recent Posts



I am a Software Engineer at Persistent Systems, working on Cloud Stack Orchestration and various tech related to Cloud Infra, container technology like Docker, Kubernetes