-
Notifications
You must be signed in to change notification settings - Fork 1
Home
-
- Continuous Integration testing for msr-safe
-
-
- VirtualBox Setup Overview
-
- VM Host Setup
- Generic VM Setup
-
- Distro-specific setup
-
-
- Ubuntu
-
- 20.04 (Focal Fossa) Server Beta
- 18.04.4 (Bionic Beaver) Server
- 16.04.6 (Xenial Xerus) Server
- 14.04.6 (Trusty Tahr) Server
- 12.04.5 (Precise Pangolin) Server
-
- Centos
-
- 8.1.1911
- 7
- 6.10
-
- openSUSE
-
- Leap-15.2
- Leap-15.1
-
-
Here's what we want to accomplish:
- Set up the virtual machine based on this release of this distro using the Oracle VM VirtualBox Manager GUI.
- Get both NAT and host-only networking. The former allows easier setup on my less-secure workstation. The latter allows a fixed IP address to be used on a machine behind a bastion host where we do our continuous integration builds.
- Install the minimum number of package needed for an msr-safe build and test cycle.
- Demonstrate how to move the vm behind the bastion host and then use the VirtualBox command line interface to set up execution there.
- Show how to set up ssh keys to allow automated github updates and build scripts.
Assumptions:
- VirtualBox is already installed on the workstation and bastion host.
- A modest amount of familiarity with the Linux environment.
VirtualBox allows several different kinds of networking. NAT is the default, which allows the VM to reach the internet but does not allow the host to ssh into the vm without using port forwarding. To give our VMs a static IP address, we add on Host-Only networking. The first step in doing so is setting up a loopback device on the host machine. Using the GUI, that procedure looks like this.
Here is what the VirtualBox Manager looks like when started for the first time.
Use CTRL+H (or File->Host Network Manager) to bring up this window. (Note the VirtualBox documentation describes an older interface that no longer exists.)
Click on Create. That gives us a host-side network device with the name vboxnet0.
Click on Properties. The DHCP Server should NOT be enabled. Note that the field "IPv4 Address" (192.168.56.1) describes the address of the host machine as seen from the VM. This address will be shared across all VMs.
Click on Apply (if needed) and then Close. Running ip address
on the command line at this point on the host should give
something like:
rountree@Solvent:/$ ip address ... 9: vboxnet0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 0a:00:27:00:00:00 brd ff:ff:ff:ff:ff:ff rountree@Solvent:/$
Note that the link is currently down.
iso available here http://releases.ubuntu.com/20.04/ubuntu-20.04-beta-live-server-amd64.iso
Note this is a beta release. Once the official release happens this link will no longer work. Also note this is the server version.
Starting from the VirtualBox Manager:
Click on New.
Fill in the blanks to suit.
Click on Create. The next screen concerns creating the hard disk.
The default values are fine. Click on Create.
At this point we have a working virtual machine that, were we to fire it up, would discover that no bootable media was available. So let's attach some. We start off on this screen:
Click on Settings.
Click on Storage.
Under "Controller:IDE" there should be a CD-ROM icon labelled "Empty". Click on that. Its attributes appear on the right. Click on the CDROM icon in Attributes and choose the appropriate ISO file. That information will replace the "Empty" in the Storage Device column. Next, check the "Live CD/DVD" box in the Attributes column. Then click Ok. The screen should look like this just prior to clicking on Ok.
Click on Settings again (as clicking on OK above closes the window) and then click on Network.
Adapter 1 defaults to NAT and being enabled. That's what we want. Click on the Adapter 2 tab and then click on the "Enable Network Adapter" checkbox. Select "Host-only Adapter" from the "Attached to:" drop-down menu. The "Name" field will be populated with the named Host Adapter we set up earlier.
Click ok. At this point we're ready to boot the machine from our virtual CD-ROM. Click on Start.