Hugo Future Imperfect Slim

Tech Notes


3-Minute Read

Building cloudstack on Ubuntu 22.0.4

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 the following packages
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get dist-upgrade

sudo apt-get install cpu-checker build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev vim git subversion mercurial patch rsync curl wget sed openssh-client gpg gnupg2 gzip bzip2 zip unzip p7zip-full p7zip-rar python-is-python3 openjdk-11-jdk maven mysql-server mysql-client bzip2 nfs-common uuid uuid-runtime python-setuptools python3-setuptools ipmitool genisoimage nfs-kernel-server quota python3-dev python3-openssl jq
  1. Install git
apt 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. Verify if java is installed
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. Verify if Maven is installed

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. Configure mysql
vi /etc/mysql/mysql.conf.d/mysqld.cnf

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

Change the password of mysql user

sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''"
  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