Build a FreeBSD VM Image Release

release(7) documents a set of shell scripts for creating FreeBSD release files in same manner as the release engineering team. The script creates a new chroot environment, checks out a fresh tree, doing the release builds in a clean environment.

That might be what you want.

I want to write some scripts that take in a specified network, some git commit ids and generates a set of virtual machine images running in bhyve to reproduce a test environment. Building in a clean environment isn't what I need.

The Makefiles in release expect to be run from a tree that already has a built kernel and world. They make building the VM images really easy, but apart from comments in the files aren't documented.

I am going to use a directory for all of the stuff:

freebsd/
    -> src        # freebsd src tree
    -> obj        # object directory
    -> destdir    # freebsd destination direcory

$ cd freebsd
$ git clone https://github.com/freebsd/freebsd.git src
$ cd src

Build the kernel and world, setting the object directory to the one in our tree.

$ env MAKEOBJDIRPREFIX=/home/user/freebsd/obj time make -j4 -DKERNFAST buildkernel
$ env MAKEOBJDIRPREFIX=/home/user/freebsd/obj make -j4 buildworld -DWITH_META_MODE=yes -DWITH_CCACHE_BUILD -DNO_CLEAN

Move to the release directory to build our VM images:

$ cd release

# env MAKEOBJDIRPREFIX=/home/user/freebsd/obj make vm-release -j4 DESTDIR=/home/user/freebsd/destdir WITH_VMIMAGES=yes VMFORMATS=raw NOPKG=yes NOPORTS=yes NOSRC=yes  
# env MAKEOBJDIRPREFIX=/home/user/freebsd/obj make vm-install -j4 DESTDIR=/home/user/freebsd/destdir WITH_VMIMAGES=yes VMFORMATS=raw NOPKG=yes NOPORTS=yes NOSRC=yes

I exclude, packages, ports and the src distribution in the images.

As a test launch a bhyve VM with our created disk image:

# sh /usr/share/examples/bhyve/vmrun.sh -c 4 -m 1024M -t tap0 -d ../../destdir/vmimages/FreeBSD-12.0-CURRENT-amd64.raw test

Reading: The Moon is a Harsh Mistress, The Difference Engine

Aberdeen, Scotland: 11°C, Partly cloudy throughout the day.

Help make the internet better

Back in January I wrote about a small tool I had thrown together to do some internet measurements. Back then we decided not to take the next step and attempt to roll the tool out to a large audience.

We have decided we need the network edge data after all and I need your help.

First, you can get edgetrace from https://trace.erg.abdn.ac.uk

In short: We need measurements from as many network edges as possible. Places where people connect are almost always near the edges of the internet. Your home, office, the pub or a park with WiFi is probably near the edge. We need your help by running our tool from these sorts of places. The more the better.

In full: Packets on the internet are given a Best Effort service by default, everything is treated the same. The packets for your video call are treated the same way as a large download, but that means there is more latency when queues grow and packets in your file transfer are dropped when there is network pressure. With Quality of Service and Active Queue Management we can build networks that allow latency sensitive packets through the queue quicker while also stopping packets that shouldn't be dropped from being dropped.

The DSCP Bits in the IP header are used give different IP packets different Quality of Service classes. Right now, no one is really sure how these marks are treated; Are they removed? Changed in someone way? Or much worse, does the presence of these marks lead to packets being dropped?

To find this out we need to perform a survey, we can (and have) bought time on virtual machines in data centers, but that only measures things that are close to the network core. We also need to measure how these marks are treated at the edge, on connections that real people use.

There isn't anyway to easily perform these measurements without asking a whole lot of people for help. This is where you come in.

We need you to download and run our tool. If you can do it from home, the bus or the train that is excellent. Every run of the tool helps us build up more data about what is happening in the internet.

Thank you for helping make the internet better.


Reading: The Moon is a Harsh Mistress, The Difference Engine

Aberdeen, Scotland: 5°C, Partly cloudy throughout the day.

The unix mail command

This xkcd has been relevant today

mail command

If you wanted to know how to use the mail command you could look here.

> d *

Might just make it all go away.


Reading: The Moon is a Harsh Mistress, The Difference Engine

Aberdeen, Scotland: 3°C, Partly cloudy throughout the day.

UUCP

The Simulator Image and the linked picture


POC||GTFO 14 dropped today.

Reading: The Moon is a Harsh Mistress, The Difference Engine

Aberdeen, Scotland: 3°C, Drizzle starting in the afternoon, continuing until evening.

The entire planet

Look at this amazing gem floating in space.

Paper deadline was today, I have to set up a large survey this week, but I am starting to surface again from this insane series of deadlines. There is a lot of FreeBSD Kernel work coming up, hopefully both at work and at home.

I have already poking at an implementation of UDP Options, there is also the possibility of me being given a TCP ABE implementation to port. For this work, unlike the stuff I did before for NewCWV I am going to provide a solid set of tests in the form of VM images. To do that I will need to figure out generation of images from just a git commit id.


Reading: The Moon is a Harsh Mistress, The Difference Engine

Aberdeen, Scotland: 6°C, Partly cloudy throughout the day.

previous next