Microstack on Windows

Installing Microstack in Microsoft Windows

This guide gives a set of instructions to install Microstack in a Microsoft Windows
Desktop (even Windows 10 Home) with full access to the Openstack floating ip network.

Steps:

  • Install Virtualbox
  • Install Multipass
  • Install PSUtils
  • Install Microstack
  • Configure Routing

Install Virtualbox

Download and install Virtualbox from https://www.virtualbox.org/wiki/Downloads

Install Multipass

Download and install Multipass from https://microstack.run/#get-started

Select Virtualbox as the Hypervisor during installation

Install PSUtils

Download from: https://download.sysinternals.com/files/PSTools.zip

Create a directory called PSUtils in your home directory, and extract the .zip file
contents into that.

Install Microstack

As the default multipass on windows does not give bridged network access, unless you
launch the multipass VM with helpers, you will end up with a cluster that is only
reachable from multipass instances, and no way to interact with OpenStack from the host.

Create Multipass Virtualbox VM.

Launch a PowerShell as Administrator. We will be executing all our commands from
this shell.

multipass launch --name microstack-vm --mem 8G --disk 40G

Stop the VM

multipass stop microstack-vm

Add host only networking

Modify the VM to add a second, host only NIC. This is needed only if you want to
access OpenStack from the Windows host itself.

& $env:USERPROFILE\PSTools\PsExec64.exe -s $env:VBOX_MSI_INSTALL_PATH\vboxmanage modifyvm "microstack-vm" --nic2 hostonly

Start the VM

multipass start microstack-vm

Configure VM NIC

Create netplan entry for the new interface.

C:\>multipass exec microstack-vm -- bash
cat << EOF | sudo tee /etc/netplan/60-bridge.yaml
network:
  ethernets:
    enp0s8:
      optional: yes
      dhcp4: yes
      dhcp4-overrides:
        route-metric: 10
EOF
 
sudo netplan apply

Find the VM IP Address

Take note of IP address that was assigned to enp0s8 using the ip addr command.

multipass exec microstack-vm -- ifconfig enps08

Look for the line starting with inet :

  inet 192.168.56.101  netmask 255.255.255.0  broadcast 192.168.56.255

This address (192.168.56.101) is where you will go to gain access to the OpenStack
Horizon interface. For example: http://192.168.56.101 will present you with the login
screen for Openstack

Install Microstack

multipass exec microstack-vm -- sudo snap install microstack --edge --devmode
multipass exec microstack-vm -- sudo microstack init --auto --control

Fetch Admin Password

This is the admin password to log into Openstack Horizon or Keystone.

multipass exec microstack-vm -- sudo snap get microstack config.credentials.keystone-password

Configure Routing

There will be a default external network with a subnet 10.20.20.0/24 created in
Microstack. This is where floating IPs will be assigned, and with VirtualBox on
Windows, you will not be able to reach that subnet by default. The following commands
will enable you to route to it.

multipass exec microstack-vm -- sudo sysctl -w net.ipv4.ip_forward=1

Next, tell Windows to route traffic for the subnet through your multipass VM. You will
need the IP address for the multipass VM that you use when accessing Horizon.

route ADD 10.20.20.0 MASK 255.255.255.0 <IP_ADDR>

From the example above, we would use this command:

route ADD 10.20.20.0 MASK 255.255.255.0 192.168.56.101

And that is it. You can now launch VMs, assign floating IPs and interact with them from your Windows desktop.

Direct Download for Multipass

https://multipass.run/download/windows

Specifying Number of CPUs

multipass launch --name microstack-vm --cpus 6 --mem 8G --disk 40G

Correction to add host-only networking

Part of the command got cut off. The full command should be

& $env:USERPROFILE\PSTools\PsExec64.exe -s $env:VBOX_MSI_INSTALL_PATH\vboxmanage modifyvm "microstack-vm" --nic2 hostonly --hostonlyadapter2 "VirtualBox Host-Only Ethernet Adapter"

Enable Nested Virtualization

With the Multipass VM stopped, execute the following.

& $env:USERPROFILE\PSTools\PsExec64.exe -s $env:VBOX_MSI_INSTALL_PATH\vboxmanage modifyvm "microstack-vm" --nested-hw-virt on

Fetch IP address

The ifconfig command is not installed by default. You can use this command instead to search for the IP address for enp0s8:

multipass exec microstack-vm -- ip addr

Look for this output:

3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:03:a7:d0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.102/24 brd 192.168.56.255 scope global dynamic enp0s8

The address after inet is the one to use for Horizon and the route command.

Network and Storage

Note when launching a VM, microstack does not fully support Cinder and therefore you cannot allocate a volume. Instance will fail to launch unless you clear this in Horizon.

Due to the network configuration, the external network cannot be used directly by VMs. You must use the test network, or create your own network/subnet and add a router to route it to the external network. Floating IPs on the 10.20.20.0/24 subnet is the only way to reach your VM.