CSE-461 Spring'25
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode

Multipass

Installation and Setup

  1. (Windows-only) Enable VM support with Hyper-V

Note to Windows users: Mininet does NOT currently work on WSL2 due to a missing component in the default WSL kernel that is required to support Open vSwitch, a dependency of Mininet.

(Windows-only) Enable Hyper-V You will need to enable Hyper-V on your machine to run VMs on Windows.
  1. Make sure you’re on a recent version of Pro, Education, or Enterprise edition of Windows. You can check this using the winver command. If you’re using the Home edition, you can obtain a free education license here. Follow the instructions to create an account using your UW credentials, then go to the “Microsoft Azure Education Hub” page and search for “Windows” in the list of available Software. Select either Windows 10 or 11 Education to obtain the product key. You can go to the activation settings page and enter the product key to upgrade your Windows version.
  2. Run the following commands in PowerShell as an administrator.
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All -NoRestart
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -NoRestart
  1. Restart your computer if the output from step 2 says RestartNeeded: True
  1. Install multipass for your machine. Choose the recommended setup options. If Multipass doesn’t work on your machine, contact course staff on Ed for alternative solutions.

(Windows-only): Restart your computer after the install to ensure that necessary background services are running.

  1. Download cloud-init configuration for cse461-VM.
  2. Initialize VM using the cloud-init configuration file.
multipass launch --name mininet focal --cpus 2 --memory 3G --cloud-init cse461-config.yml

The launched VM should have the name mininet. We can verify this name with multipass list:

$ multipass list

Name                    State             IPv4             Image
mininet	                Running           192.168.64.3     Ubuntu 20.04 LTS

Entering the shell

To ssh into the VM run the following

$ multipass shell mininet

Pausing and playing the VM

To stop VM from running:

$ multipass stop <NAME>

To start VM again

$ multipass start <NAME>

Deleting the VM

To delete VM space off your machine

$ multipass delete <NAME>
VSCode in VM
  1. When staring Multipass VM, make sure the VM has at least 4 GB of memory:
    multipass launch --name mininet --mem 4G
    
    If the VM is already launched, stop the VM, then change the memory of the VM with:
    multipass set local.mininet.memory=4G
    
  2. Create a key pair for SSH login on your host machine (not the VM):
    ssh-keygen -f ~/.ssh/mininet-key
    
    Skip by pressing enter when asked for password for convenience.
  3. On your host machine, copy the public key (~/.ssh/mininet-key.pub) to the VM:
    multipass transfer ~/.ssh/mininet-key.pub mininet:/home/ubuntu/.ssh/mininet-key.pub
    
  4. By running this command on your host machine, add public key to authorized_keys:
    multipass exec mininet -- bash -c "cat ~/.ssh/mininet-key.pub >> ~/.ssh/authorized_keys"
    
  5. On your computer (outside the VM), adjust permission of the private key:
    chmod 600 ~/.ssh/mininet-key
    
  6. In VSCode, make sure VSCode remote core functionality and SSH plugins are installed. Click on the remote icon in the left toolbar, then click on the plus sign in the SSH section. You will be prompted to enter a SSH login command to connect to the VM (NOTE: to find the IP of your vm, run the command multipass list):
    ssh -i ~/.ssh/mininet-key ubuntu@[IP of VM]
    
    Enter the command, then add the host to your local SSH config, and choose Linux as your remote machine type. If everything goes well, you should be able to start using VSCode for your Multipass VM now.
If multipass fails: VMware Instructions (Please contact course staff on ed!)
  1. Make a broadcom account.
  2. Download VMware click download fusion or workstation.
  3. After installing VMware, download Ubuntu Desktop Image ISO from Canonical:

X86-64 (Ubunutu 20.04 Focal).

ARM64 (Ubuntu 24.04 Noble).

  1. Create a new Linux virtual machine in VMWare, select the ISO image from the previous step when prompted for an installation image.

  2. Start the VM, follow onscreen instructions to install Ubuntu. The VM will restart once it’s finished.

  3. Open a terminal windows in Ubuntu, install any package updates using

    sudo apt update && sudo apt upgrade -y
    
  4. Install GuestVM support tools (Recommended for the VM desktop to scale correctly)

    sudo apt install open-vm-tools-desktop
    
  5. Feel free to delete the Ubuntu installer ISO file. You can now install mininet using the manual setup instruction below.

Mininet manual setup If you run into any issues with the automate cloud-init setup, you can manually install packages and fetch starter code using the instructions below. We assume you're in the home directory of the Ubuntu VM.
  1. Install mininet and Python with apt

    sudo apt-get update
    sudo apt-get install -y mininet python3 unzip net-tools xterm python3-pip
    
  2. Install Python mininet

    sudo pip3 install mininet
    
  3. Fetch files from course website and clone pox repo

    wget https://courses.cs.washington.edu/courses/cse461/25wi/projects/project2/resources/project2.zip
    unzip project2.zip
    rm project2.zip
    cd ~/
    git clone https://github.com/noxrepo/pox.git
    sudo cp ~/461_mininet/pox/* ~/pox/pox/misc/