Skip to content

Commit ce7d49f

Browse files
authored
Add vm-ubuntu-26.04 directory (p4lang#740)
* Move optional steps for testing VMs out of README.md file This may help avoid new users being confused that they must follow those instructions. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Add 2025-Jan-30 versions of source code for install.sh Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> * Add vm-ubuntu-26.04 directory It has tested working instructions for creating an Ubuntu 26.04 Desktop VM in VirtualBox so far, but the P4 development tools do not yet build on it. These files are a starting placeholder, ready to be updated when everything else is working. Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu> --------- Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
1 parent 3e9306d commit ce7d49f

3 files changed

Lines changed: 234 additions & 0 deletions

File tree

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2024 Andy Fingerhut
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Creating a VM using VirtualBox and an ISO disk image with an Ubuntu Desktop Linux 26.04 installer
8+
9+
In the initial boot menu, the default choice "Try or Install Ubuntu"
10+
should be highlighted. Press return to continue.
11+
12+
Choose your language. Click Next button.
13+
14+
In "Accessibility", I usually do not change any of the defaults. You
15+
might want to. Click Next button when ready to continue.
16+
17+
Select your keyboard layout. Click Next button.
18+
19+
In "Internet connection" screen, you will likely see the default
20+
choice as "Use wired connection", and there is a greyed-out
21+
unselectable choice "No Wi-Fi devices connected". This is the case
22+
even if the host system has no wired network connection, only Wi-Fi.
23+
The reason you see these choices is that as far as the VM is
24+
concerned, it detects only a virtual wired Ethernet adapter, created
25+
by VirtualBox, and does not see the host system's physical Wi-Fi
26+
device. This is normal. Click the Next button to proceed.
27+
28+
In "Try or Install Ubuntu", select "Install Ubuntu". Click the Next
29+
button.
30+
31+
In "Type of installation", select "Interactive Installation". At
32+
least, that is what these instructions are written for. If you want
33+
to try an Automated installation, feel free to do so, but don't expect
34+
the steps to be documented here. Click the Next button.
35+
36+
In "Applications" window, select "Default selection", and click Next.
37+
38+
In "Optimise your computer" window, I leave the boxes unchecked, and
39+
click Next.
40+
41+
In "Disk setup" window, select "Erase disk and install Ubuntu", and
42+
click Next. Note that it is only the new virtual disk you created for
43+
this VM that is going to be erased and written over, _not_ the entire
44+
file storage of the host OS.
45+
46+
In "Encryption and file system" window, I check "No encryption", but
47+
you may choose otherwise. Click Next.
48+
49+
In "Create your account" window, enter your own name (if you wish --
50+
feel free to use pseudonyms if that floats your boat), desired system
51+
name, user name, and password. I prefer to uncheck the box next to
52+
"Require my password to log in", as my host system is intended to keep
53+
the computer secure with requiring a password to log in, with screen
54+
lock after a timeout if you desire. Repeating that for the guest OS
55+
is just annoying to me. Click Next button to continue.
56+
57+
In "Select your timezone" window, click on the map your approximate
58+
location, or edit the contents of the text boxes labeled "Location" or
59+
"Timezone". Click Next to continue.
60+
61+
In "Ready to install" window, click "Install" button.
62+
63+
Installation can take several minutes. Be patient. Eventually you
64+
should see a window titled "Installation complete". Click the
65+
"Restart now" button.
66+
67+
If in a boot screen you see the message "Please remove the
68+
installation medium, then press ENTER:", just press return to
69+
continue.
70+
71+
Proceed to the section titled [Installing open source P4 development
72+
tools on the
73+
VM](README.md#installing-open-source-p4-development-tools-on-the-vm).
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2024 Andy Fingerhut
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Create VM using ISO installer
8+
9+
Host OS versions these instructions have been tested with:
10+
+ MacBook Pro M3 - Apple Silicon / arm64 processor
11+
+ macOS 26.4.1
12+
+ VirtualBox 7.2.6
13+
14+
## Finding the Linux installer image you want
15+
16+
Download the `.iso` file that installs the version of Linux that you
17+
are interested in. An Internet search for terms like these works for
18+
me. You should only pay attention to search results that are on the
19+
ubuntu.com web site.
20+
21+
+ If your system has a 64-bit Intel or AMD CPU
22+
+ Search terms: Ubuntu 26.04 amd64
23+
+ Names of files I found on 2026-Apr-23:
24+
+ `ubuntu-26.04-desktop-amd64.iso`
25+
+ If you have an Apple Silicon Mac:
26+
+ Search terms: Ubuntu 26.04 arm64
27+
+ Names of files I found on 2026-Apr-23:
28+
+ `ubuntu-26.04-desktop-arm64.iso`
29+
30+
An installer for Ubuntu Desktop leads to fewer steps you need to do in
31+
order to get a GUI Desktop. As of 2026, Ubuntu releases Ubuntu
32+
Desktop installers for both amd64 and arm64 systems. If you want a
33+
system with a GUI desktop, there is little reason to install from an
34+
Ubuntu Server installer first.
35+
36+
37+
## Creating a new VM
38+
39+
Start VirtualBox. While there are command line ways to do all of this
40+
with VirtualBox (I believe), I have never used those. The VirtualBox
41+
GUI takes a few minutes to use when creating a new VM, and installing
42+
the VM takes the computer a while longer. I estimate around 30 to 45
43+
minutes total time to create a new VM where you install Linux from an
44+
`.iso` file.
45+
46+
A nice thing about VirtualBox is that once you create a VM for the
47+
operating system you want, if you have enough free disk space to keep
48+
around that original VM (which I typically include "base OS" somewhere
49+
in its name), it is very quick (30 seconds or less) to create a copy
50+
of the base OS VM, and then install a bunch of software on that copy.
51+
As long as you leave the original base OS VM there, it will not
52+
change, and you can create copies of it whenever you want to try
53+
experimenting with it. Did you accidentally mess up the state of some
54+
VM's system-wide configuration files, or install some weird
55+
combination of software that seems to conflict with each other? You
56+
can abandon that VM image, deleting it whenever you no longer find its
57+
contents useful, and create more clones of the original base OS VM for
58+
further experiments.
59+
60+
In the VirtualBox GUI window:
61+
62+
+ Click the button "New"
63+
+ In the window that appears, give a unique name to your VM,
64+
e.g. "Ubuntu 26.04 base OS".
65+
+ To the right of the "ISO Image" text box, click the down-arrow icon
66+
and if you do not see the `.iso` installer file you downloaded,
67+
click "Other..." and find it.
68+
+ I prefer to _uncheck_ the box "Proceed with Unattended
69+
Installation", and these instructions will assume you are doing so,
70+
too.
71+
+ Click on the ">" symbol to the left of "Specify virtual hardware" to
72+
specify the amount of RAM, number of virtual CPUs, and hard disk
73+
space you want.
74+
+ In 2026, I rarely want to create a VM with less than 8 GBytes
75+
(8192 MBytes) of RAM. I typically select 4 processors.
76+
+ With VirtualBox, changing the RAM available to a VM, or its number
77+
of processors, after you create it is quick and easy, either
78+
increasing it, or decreasing it. Simply shut down the VM, select
79+
the VM in the GUI, click "Settings", change the RAM/number-of-CPU
80+
settings, and start the VM image again. As long as your host OS
81+
has enough free RAM, VirtualBox can use it for the running VM
82+
image. Thus, you do not need to think too hard when choosing the
83+
initial RAM size while creating the VM image.
84+
+ Click on the ">" symbol to the left of "Specify virtual hard disk"
85+
to specify the size of the virtual disk.
86+
+ I typically specify 60 GBytes of disk space. I do _not_ click the
87+
"Pre-allocate Full Size" check box, since then it would
88+
immediately create a file that was 60 GBytes in size. If you do
89+
not check that box, VirtualBox creates a disk image file that is
90+
only as large as it needs to be to store the files currently
91+
existing within the VM's file system, not the full size it might
92+
grow to later.
93+
+ Leave the other settings as: VDI format for disk image, and the
94+
boxes unchecked next to "Use an Existing Virtual Hard Disk File"
95+
and "Create Virtual Machine Without a Virtual Hard Disk".
96+
+ I believe it is possible to increase the disk space allocated to
97+
the VM later, but I have not personally done so, and you will not
98+
find instructions to do so here. It is definitely more steps than
99+
changing the RAM size later. It also might be possible to
100+
decrease it later, but only if you can find and run the proper
101+
utility programs in the guest VM to shrink its files into a subset
102+
of the available physical disk space. It is thus more important
103+
to think of the maximum disk space you expect to use within the
104+
VM, _or_ copy files out of it to another system to free up disk
105+
space during the lifetime of that VM. Fortunately you can pick a
106+
large size, and choose the option not to preallocate it all when
107+
the VM is created. It might be easier to create a new VM and copy
108+
files from the old one to the new one vs. increasing the disk
109+
space available to an old one.
110+
+ Click the "Finish" button. This closes the window you were working
111+
on, and a new VM image with the name you gave it has now been
112+
created. It does _not_ have the OS installed yet.
113+
+ Select that new image and click on the button "Settings".
114+
+ Click "General".
115+
+ Under the "Features" tab, change "Shared Clipboard" to
116+
"Bidirectional".
117+
+ Click "Display".
118+
+ Under the "Screen" tab, change "Video Memory" from 16 MB to 32 MB.
119+
+ If you want to create a shared folder on your host OS that is
120+
readable and writable from the guest OS, too, click "Shared Folder".
121+
+ Click on the icon that looks like a folder with a "+" symbol on it.
122+
+ Change "Folder Path" to choose the host OS folder you want to share.
123+
+ Check the box for "Auto-mount".
124+
+ If you want the guest OS to only be able to read this folder, but
125+
not write to it, check the box for "Read-only".
126+
+ Click "OK" button.
127+
+ Back in the main settings window for the VM image, click the OK
128+
button.
129+
130+
131+
# Common steps for starting any VM image, including a new installer one
132+
133+
+ Select the VM image and click the "Start" button.
134+
+ If the text is uncomfortably small for reading, select the
135+
VirtualBox menu item View -> Virtual Screen 1 -> Scale to 200%.
136+
Adjust the scale choice to your reading comfort.
137+
138+
139+
# Creating a VM using VirtualBox and an ISO disk image with an Ubuntu Desktop Linux installer
140+
141+
Follow the steps
142+
[here](README-create-vm-using-iso-installer-for-ubuntu-desktop.md).

vm-ubuntu-26.04/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!--
2+
SPDX-FileCopyrightText: 2026 Andy Fingerhut
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
-->
6+
7+
# Introduction
8+
9+
Ubuntu 26.04 was released on 2026-Apr-23. The open source P4
10+
development tools have not yet been updated and tested working on
11+
Ubuntu 26.04. Be patient. Ubuntu 26.04 includes more recent versions
12+
of GCC and other build tools as the default versions, and some P4 code
13+
requires changes in order to compile successfully when using the new
14+
versions.
15+
16+
In the mean time, Ubuntu 22.04 and 24.04 are actively supported, and
17+
you can find instructions for installing the open source P4
18+
development tools on Ubuntu 24.04
19+
[here](../vm-ubuntu-24.04/README.md).

0 commit comments

Comments
 (0)