Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c43f6ed
Move optional steps for testing VMs out of README.md file
jafingerhut Oct 16, 2024
459987f
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Oct 25, 2024
5f69ce2
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Oct 31, 2024
fcdf6d2
Merge remote-tracking branch 'upstream/master'
jafingerhut Nov 3, 2024
27310d1
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Nov 7, 2024
51d5317
Merge remote-tracking branch 'upstream/master'
jafingerhut Nov 13, 2024
0054e7b
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 1, 2024
b8a81f2
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 1, 2024
1b02938
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 10, 2024
f574bea
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 10, 2024
40ac9e0
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 30, 2024
365a909
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 30, 2024
e62c95b
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 30, 2024
0af41fd
Merge remote-tracking branch 'upstream/master'
jafingerhut Dec 30, 2024
d600b63
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Dec 31, 2024
29fd124
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Dec 31, 2024
fdd4721
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 1, 2025
089cbd8
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 3, 2025
ff1664a
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 25, 2025
b8c5cab
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Jan 25, 2025
ff9c994
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Jan 27, 2025
3224949
Add 2025-Jan-30 versions of source code for install.sh
jafingerhut Jan 30, 2025
9235e50
Merge branch 'master' of https://github.com/p4lang/tutorials
jafingerhut Feb 11, 2025
fe22d96
Merge remote-tracking branch 'upstream/master'
jafingerhut Feb 28, 2025
2f66fc9
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Feb 28, 2025
82856d1
Merge remote-tracking branch 'upstream/master'
jafingerhut Mar 2, 2025
dcb3d72
Merge remote-tracking branch 'upstream/master'
jafingerhut Apr 1, 2025
2bb59c9
Merge remote-tracking branch 'up/master'
jafingerhut Apr 21, 2025
7f076ba
Merge remote-tracking branch 'up/master'
jafingerhut Apr 21, 2025
4e1408f
Merge remote-tracking branch 'up/master'
jafingerhut May 1, 2025
cdceaab
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut May 1, 2025
aa0e580
Merge remote-tracking branch 'up/master'
jafingerhut May 13, 2025
745f2bd
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut May 13, 2025
7b68640
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Jun 1, 2025
21aca3b
Merge remote-tracking branch 'upstream/master'
jafingerhut Jun 1, 2025
72c2c09
Merge remote-tracking branch 'up/master'
jafingerhut Jul 3, 2025
cb9381d
Merge remote-tracking branch 'up/master'
jafingerhut Jul 5, 2025
70c4cd8
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Aug 1, 2025
b71ef2a
Merge remote-tracking branch 'up/master'
jafingerhut Aug 1, 2025
54b84c2
Merge remote-tracking branch 'up/master'
jafingerhut Sep 1, 2025
471c37a
Merge remote-tracking branch 'up/master'
jafingerhut Oct 1, 2025
cf02788
Merge remote-tracking branch 'up/master'
jafingerhut Nov 1, 2025
143c96d
Merge remote-tracking branch 'up/master'
jafingerhut Nov 14, 2025
573a295
Merge remote-tracking branch 'up/master'
jafingerhut Jan 17, 2026
bd8682a
Merge remote-tracking branch 'up/master'
jafingerhut Jan 23, 2026
488b5d4
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Jan 23, 2026
6d5bb15
Merge remote-tracking branch 'up/master'
jafingerhut Feb 1, 2026
d9cb2b8
Merge remote-tracking branch 'up/master'
jafingerhut Feb 3, 2026
f562b70
Merge remote-tracking branch 'up/master'
jafingerhut Feb 21, 2026
9f2940c
Merge remote-tracking branch 'up/master'
jafingerhut Feb 21, 2026
61e3320
Merge remote-tracking branch 'up/master'
jafingerhut Mar 1, 2026
7b5d789
Merge remote-tracking branch 'upstream/master'
jafingerhut Mar 1, 2026
773337c
Merge remote-tracking branch 'up/master'
jafingerhut Mar 28, 2026
b57b175
Merge remote-tracking branch 'up/master'
jafingerhut Apr 1, 2026
f8d40bf
Merge remote-tracking branch 'up/master'
jafingerhut Apr 3, 2026
f50884c
Merge remote-tracking branch 'up/master'
jafingerhut Apr 17, 2026
e01791d
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Apr 17, 2026
0d27891
Merge remote-tracking branch 'up/master'
jafingerhut Apr 17, 2026
ae86454
Merge remote-tracking branch 'up/master'
jafingerhut Apr 19, 2026
68b6d0e
Merge remote-tracking branch 'up/master'
jafingerhut Apr 23, 2026
79afdc1
Merge branch 'master' of github.com:jafingerhut/tutorials
jafingerhut Apr 23, 2026
55a454e
Add vm-ubuntu-26.04 directory
jafingerhut Apr 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<!--
SPDX-FileCopyrightText: 2024 Andy Fingerhut

SPDX-License-Identifier: Apache-2.0
-->

# Creating a VM using VirtualBox and an ISO disk image with an Ubuntu Desktop Linux 26.04 installer

In the initial boot menu, the default choice "Try or Install Ubuntu"
should be highlighted. Press return to continue.

Choose your language. Click Next button.

In "Accessibility", I usually do not change any of the defaults. You
might want to. Click Next button when ready to continue.

Select your keyboard layout. Click Next button.

In "Internet connection" screen, you will likely see the default
choice as "Use wired connection", and there is a greyed-out
unselectable choice "No Wi-Fi devices connected". This is the case
even if the host system has no wired network connection, only Wi-Fi.
The reason you see these choices is that as far as the VM is
concerned, it detects only a virtual wired Ethernet adapter, created
by VirtualBox, and does not see the host system's physical Wi-Fi
device. This is normal. Click the Next button to proceed.

In "Try or Install Ubuntu", select "Install Ubuntu". Click the Next
button.

In "Type of installation", select "Interactive Installation". At
least, that is what these instructions are written for. If you want
to try an Automated installation, feel free to do so, but don't expect
the steps to be documented here. Click the Next button.

In "Applications" window, select "Default selection", and click Next.

In "Optimise your computer" window, I leave the boxes unchecked, and
click Next.

In "Disk setup" window, select "Erase disk and install Ubuntu", and
click Next. Note that it is only the new virtual disk you created for
this VM that is going to be erased and written over, _not_ the entire
file storage of the host OS.

In "Encryption and file system" window, I check "No encryption", but
you may choose otherwise. Click Next.

In "Create your account" window, enter your own name (if you wish --
feel free to use pseudonyms if that floats your boat), desired system
name, user name, and password. I prefer to uncheck the box next to
"Require my password to log in", as my host system is intended to keep
the computer secure with requiring a password to log in, with screen
lock after a timeout if you desire. Repeating that for the guest OS
is just annoying to me. Click Next button to continue.

In "Select your timezone" window, click on the map your approximate
location, or edit the contents of the text boxes labeled "Location" or
"Timezone". Click Next to continue.

In "Ready to install" window, click "Install" button.

Installation can take several minutes. Be patient. Eventually you
should see a window titled "Installation complete". Click the
"Restart now" button.

If in a boot screen you see the message "Please remove the
installation medium, then press ENTER:", just press return to
continue.

Proceed to the section titled [Installing open source P4 development
tools on the
VM](README.md#installing-open-source-p4-development-tools-on-the-vm).
142 changes: 142 additions & 0 deletions vm-ubuntu-26.04/README-create-vm-using-iso-installer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<!--
SPDX-FileCopyrightText: 2024 Andy Fingerhut

SPDX-License-Identifier: Apache-2.0
-->

# Create VM using ISO installer

Host OS versions these instructions have been tested with:
+ MacBook Pro M3 - Apple Silicon / arm64 processor
+ macOS 26.4.1
+ VirtualBox 7.2.6

## Finding the Linux installer image you want

Download the `.iso` file that installs the version of Linux that you
are interested in. An Internet search for terms like these works for
me. You should only pay attention to search results that are on the
ubuntu.com web site.

+ If your system has a 64-bit Intel or AMD CPU
+ Search terms: Ubuntu 26.04 amd64
+ Names of files I found on 2026-Apr-23:
+ `ubuntu-26.04-desktop-amd64.iso`
+ If you have an Apple Silicon Mac:
+ Search terms: Ubuntu 26.04 arm64
+ Names of files I found on 2026-Apr-23:
+ `ubuntu-26.04-desktop-arm64.iso`

An installer for Ubuntu Desktop leads to fewer steps you need to do in
order to get a GUI Desktop. As of 2026, Ubuntu releases Ubuntu
Desktop installers for both amd64 and arm64 systems. If you want a
system with a GUI desktop, there is little reason to install from an
Ubuntu Server installer first.


## Creating a new VM

Start VirtualBox. While there are command line ways to do all of this
with VirtualBox (I believe), I have never used those. The VirtualBox
GUI takes a few minutes to use when creating a new VM, and installing
the VM takes the computer a while longer. I estimate around 30 to 45
minutes total time to create a new VM where you install Linux from an
`.iso` file.

A nice thing about VirtualBox is that once you create a VM for the
operating system you want, if you have enough free disk space to keep
around that original VM (which I typically include "base OS" somewhere
in its name), it is very quick (30 seconds or less) to create a copy
of the base OS VM, and then install a bunch of software on that copy.
As long as you leave the original base OS VM there, it will not
change, and you can create copies of it whenever you want to try
experimenting with it. Did you accidentally mess up the state of some
VM's system-wide configuration files, or install some weird
combination of software that seems to conflict with each other? You
can abandon that VM image, deleting it whenever you no longer find its
contents useful, and create more clones of the original base OS VM for
further experiments.

In the VirtualBox GUI window:

+ Click the button "New"
+ In the window that appears, give a unique name to your VM,
e.g. "Ubuntu 26.04 base OS".
+ To the right of the "ISO Image" text box, click the down-arrow icon
and if you do not see the `.iso` installer file you downloaded,
click "Other..." and find it.
+ I prefer to _uncheck_ the box "Proceed with Unattended
Installation", and these instructions will assume you are doing so,
too.
+ Click on the ">" symbol to the left of "Specify virtual hardware" to
specify the amount of RAM, number of virtual CPUs, and hard disk
space you want.
+ In 2026, I rarely want to create a VM with less than 8 GBytes
(8192 MBytes) of RAM. I typically select 4 processors.
+ With VirtualBox, changing the RAM available to a VM, or its number
of processors, after you create it is quick and easy, either
increasing it, or decreasing it. Simply shut down the VM, select
the VM in the GUI, click "Settings", change the RAM/number-of-CPU
settings, and start the VM image again. As long as your host OS
has enough free RAM, VirtualBox can use it for the running VM
image. Thus, you do not need to think too hard when choosing the
initial RAM size while creating the VM image.
+ Click on the ">" symbol to the left of "Specify virtual hard disk"
to specify the size of the virtual disk.
+ I typically specify 60 GBytes of disk space. I do _not_ click the
"Pre-allocate Full Size" check box, since then it would
immediately create a file that was 60 GBytes in size. If you do
not check that box, VirtualBox creates a disk image file that is
only as large as it needs to be to store the files currently
existing within the VM's file system, not the full size it might
grow to later.
+ Leave the other settings as: VDI format for disk image, and the
boxes unchecked next to "Use an Existing Virtual Hard Disk File"
and "Create Virtual Machine Without a Virtual Hard Disk".
+ I believe it is possible to increase the disk space allocated to
the VM later, but I have not personally done so, and you will not
find instructions to do so here. It is definitely more steps than
changing the RAM size later. It also might be possible to
decrease it later, but only if you can find and run the proper
utility programs in the guest VM to shrink its files into a subset
of the available physical disk space. It is thus more important
to think of the maximum disk space you expect to use within the
VM, _or_ copy files out of it to another system to free up disk
space during the lifetime of that VM. Fortunately you can pick a
large size, and choose the option not to preallocate it all when
the VM is created. It might be easier to create a new VM and copy
files from the old one to the new one vs. increasing the disk
space available to an old one.
+ Click the "Finish" button. This closes the window you were working
on, and a new VM image with the name you gave it has now been
created. It does _not_ have the OS installed yet.
+ Select that new image and click on the button "Settings".
+ Click "General".
+ Under the "Features" tab, change "Shared Clipboard" to
"Bidirectional".
+ Click "Display".
+ Under the "Screen" tab, change "Video Memory" from 16 MB to 32 MB.
+ If you want to create a shared folder on your host OS that is
readable and writable from the guest OS, too, click "Shared Folder".
+ Click on the icon that looks like a folder with a "+" symbol on it.
+ Change "Folder Path" to choose the host OS folder you want to share.
+ Check the box for "Auto-mount".
+ If you want the guest OS to only be able to read this folder, but
not write to it, check the box for "Read-only".
+ Click "OK" button.
+ Back in the main settings window for the VM image, click the OK
button.


# Common steps for starting any VM image, including a new installer one

+ Select the VM image and click the "Start" button.
+ If the text is uncomfortably small for reading, select the
VirtualBox menu item View -> Virtual Screen 1 -> Scale to 200%.
Adjust the scale choice to your reading comfort.


# Creating a VM using VirtualBox and an ISO disk image with an Ubuntu Desktop Linux installer

Follow the steps
[here](README-create-vm-using-iso-installer-for-ubuntu-desktop.md).
19 changes: 19 additions & 0 deletions vm-ubuntu-26.04/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
SPDX-FileCopyrightText: 2026 Andy Fingerhut

SPDX-License-Identifier: Apache-2.0
-->

# Introduction

Ubuntu 26.04 was released on 2026-Apr-23. The open source P4
development tools have not yet been updated and tested working on
Ubuntu 26.04. Be patient. Ubuntu 26.04 includes more recent versions
of GCC and other build tools as the default versions, and some P4 code
requires changes in order to compile successfully when using the new
versions.

In the mean time, Ubuntu 22.04 and 24.04 are actively supported, and
you can find instructions for installing the open source P4
development tools on Ubuntu 24.04
[here](../vm-ubuntu-24.04/README.md).
Loading