Developing using Arch Linux on Parallels on Apple Silicon with a systemd-nspawn container
Summary of the setup
This setup is for Parallels users on Apple Silicon, such as the newer Macs. It does not work on x86_64 Macs or PCs.
- Download a virtual machine and run it in Parallels. It has all the tools you are going to need pre-installed – build tools, git, IDE etc.
- In the virtual machine, run a single script, and you will have a UBOS Mesh site running that’s even pre-configured for debugging.
Steps in detail
Download the this virtual appliance file: http://depot.ubos.net/ubosdev/ubosdev-aarch64-20221123.pvmp (1.5GB)
Open the file with Parallels. A
ubosdevVM will show up in the Parallels Control Center.
Double-click the VM icon. This will unpack the file into the format that Parallels needs to run it.
Start the VM.
ubosdev, there is no password.
rootdoes not have a password either: we assume that’s safe enough on your computer. If you don’t think so, set one :-)
Pick a better screen resolution:
- In “Search”, type “Settings” and run it.
- If there’s an error message saying “Oops, something has gone wrong” about Network settings: ignore it, we are not running Network manager.
- Select “Displays” and pick a resolution that makes sense for your computer setup.
- Close the settings app.
In “Search”, type “Console” and run it (you get the “Search” by selecting “Activities” in the menu bar).
Fix the permissions on the home directory (current bug in the setup):
% sudo chmod 755 ~ubosdev
Set up the UBOS development environment by running:
% ubosdev-container setup --channel red --flavor mesh
--flavor meshif you plan to do UBOS Mesh development or you aren’t certain.
Note the argument specifying the
redrelease channel; the
yellowdefault one does not work yet.
This might take 5-30 min, depending on your network, computer and disk speed.
Once this command is complete, you can shutdown the VM any time if you like.
Ongoing development work
Run your Development VM.
Determine which UBOS Linux container to run:
% ubosdev-container list
Run your UBOS Linux container:
% ubosdev-container run --name <name>
<name>is one of the names from the list, e.g.
This gives you console access to the container. You can shut it down with
Access any deployed web app there from your development VM with the name of the container, e.g.
http://ubos-mesh-red/. Firefox is pre-installed on the VM.
To edit your code, IDEs
geanyis pre-installed on your development VM. NetBeans isn’t currently in the Arch Linux ARM repos; to install, “Download from mirror” here and then
sudo pacman -U netbeans*.pkg*.
To open up a shell inside your development container, open a new terminal and execute:
% sudo machinectl shell ubosdev@ubos-mesh-red
ubos-mesh-redis the name of your container.
To build your UBOS Mesh code, run the UBOS Mesh tools inside your development container:
% mesh-clean % mesh-build % mesh-test
To debug your UBOS Mesh code, connect with the Netbeans debugger:
This requires that the Java VM was started with the default debugging flag. This flag is set by default in the default Site JSON that’s deployed when you create a container with
- Run NetBeans
- Menu “Debug” / “Attach Debugger”
- Select Debugger: “Java Debugger (JPDA)”
- Select Connector: “Socket Attach (Attaches by socket to other VMs)”
- Host: name of your container, e.g.
- Port: 7777
To shut down your container, in the terminal where you run it, hit
^]three times in quick succession.