Skip to main content

Create the VMs

Updated Sep 15, 2023 ·

Overview

We'll use VirtualBox to create three VMs with the specifications outlined in the lab architecture. Each VM will have:

  • Ubuntu Server 22.04 LTS
  • Headless (no GUI)

NOTE: It is recommended to select "Skip unattended install" during VM creation because there is a chance the OS installation will fail.

Create the Virtual Machines

Open Oracle VirtualBox and click the "+" button to create the virtual machines. Follow the details for each node.

Controller VM

SettingConfigurationNotes
Namecontroller
RAM (Base Memory)6 GB (6144 MB)Enough for Keystone, Glance, Nova API, Neutron
CPU (Processors)2 coresMinimum 2
Storage20 GBSystem disk only
Display16 MBOnly needed for console access, no GUI
Network Adapters3
Adapter 1Host-OnlySelect the created Host-Only Adapter network
Adapter 2NAT Network (ProviderNetwork)Set Promiscuous Mode: Allow All
Adapter 3NAT Network (Internet)Enable DHCP

Make sure to select the Host-Only Adapter (Management Network) created from previous step

  • Adapter 1 (Host-Only) is mandatory; all OpenStack nodes communicate here.
  • Adapter 3 (NAT) allows the VM to reach Ubuntu repositories.
  • The IP address and Gateway will be set in the next step (step 3).
  • Display memory is minimal; no GUI needed.

Compute VM

SettingConfigurationNotes
Namecompute1
RAM (Base Memory)4 GB (4096 MB)Enough for running VMs via Nova
CPU (Processors)2 coresAt least 2
Storage10 GBSystem only; ephemeral VM disks handled by Cinder/Glance
Display16 MBConsole only
Network Adapters3
Adapter 1Host-OnlySelect the created Host-Only Adapter network
Adapter 2NAT Network (ProviderNetwork)Set Promiscuous Mode: Allow All
Adapter 3NAT Network (Internet)Enable DHCP

Notes:

  • Only 2 adapters needed, compute doesn’t need internet unless for updates.
  • Adapter 1 (Host-Only) ensures communication with controller and other nodes.
  • Adapter 2 (NAT Network) connect VMs launched by OpenStack to provider network

Storage (Block Storage) VM

SettingConfigurationNotes
Nameblock1
RAM4 GB (4096 MB)Minimum for Cinder services
CPU2 coresMinimum 1, more if heavy testing
Storage20 GBStorage space for volumes
Display16 MBConsole only
Network Adapters2Each adapter has a purpose
Adapter 1Host-OnlySelect the created Host-Only Adapter network
Adapter 2Disabled
Adapter 3NAT Network (Internet)Enable DHCP

Notes:

  • Primary disk larger because it hosts Cinder volumes for testing.
  • Adapter 1 (Host-Only) allows communication with controller for service API.

Configure the VM Settings

Once you launch the VMs, it will go through the installation wizard. Use the arrow keys to select the option and press Enter.

NOTE: The configurations are the same for all three nodes except for the network and hostname configurations.

OS Installation Options

OptionRecommendedActual
LanguageEnglishEnglish
Installation modeMinimal VMMinimal VM
Hostnamecontrollercontroller
Userjmedenjmeden
Passwordopenstackopenstack
PartitioningEntire disk + LVMEntire disk + LVM
SSHOpenSSH ServerOpenSSH Server
GRUBYesYes

Language

Keyboard

Installation Type

Network Configurations

The network configurations will be different for each node. There will be three interface for each node:

  • enp0s3 → Host-Only (Management)
  • enp0s8 → NAT Network “Provider” (10.10.10.0/24, DHCP OFF)
  • enp0s9 → NAT Network “Internet” (DHCP ON)

Use the configurations below:

NodeInterfaceSubnetAddressGatewayName Servers
Controllerenp0s3 (Host-Only)10.0.0.0/2410.0.0.11
Controllerenp0s8 (Provider NAT)10.10.10.0/2410.10.10.11
Controllerenp0s9 (Internet NAT)10.0.2.0/24DHCPAuto (DHCP)Auto (DHCP)
Computeenp0s3 (Host-Only)10.0.0.0/2410.0.0.21
Computeenp0s8 (Provider NAT)10.10.10.0/2410.10.10.21
Computeenp0s9 (Internet NAT)10.0.2.0/24DHCPAuto (DHCP)Auto (DHCP)
Storageenp0s3 (Host-Only)10.0.0.0/2410.0.0.31
Storageenp0s9 (Internet NAT)10.0.2.0/24DHCPAuto (DHCP)Auto (DHCP)

Use the arror keys to select and press Enter to edit the field.

To set a static IP, select IPV4 Method -> Manual:

Enter the required fields, navigate to Save, and press Enter.

Proxy and Mirror Configurations

You can leave the proxy configuration blank.

For the mirror, you can wait for the mirror location test passes then press Enter on Done

Storage Configuration

Select Use an entire disk -> Set up this disk as an LVM group and press Enter on Done.

When prompted to confirm destructive action, select Continue.

Username

SSH Configuration

Make sure to install OpenSSH so you can SSH to the VM from your host machine.

You can import the SSH key later.

You can skip the snaps for now. Choose Done.

Installation Complete

Once the installation is finished, you should see the Installation Complete message.

Choose Reboot Now.

After rebooting, login with the user you created.

From a terminal in your host machine, try to SSH to the virtual machine. Enter password when prompted.

Exit back to your host machine and proceed to create the SSH key.

Add an SSH Key

From your host machine, generate SSH Key:

ssh-keygen -t ed25519 -C "jmeden@host"

You can change the key name, or press Enter to accept default file location (~/.ssh/id_ed25519)

Verify key was created:

$ ls -l ~/.ssh/vbox* 

-rw------- 1 user user 505 Feb 14 17:40 /home/user/.ssh/vbox
-rw-r--r-- 1 user user 178 Feb 14 17:40 /home/user/.ssh/vbox.pub

Copy public key to each node.

ssh-copy-id jmeden@<VM-IP>

Example for controller node:

ssh-copy-id -i ~/.ssh/vbox.pub jmeden@10.0.0.11

This installs your public key into ~/.ssh/authorized_keys on the VM.

Test the connection:

ssh -i ~/.ssh/vbox jmeden@10.0.0.11 

Next Steps

Next, configure the networking and security settings on each node.

See Networking and Security.