AREDN on Proxmox: Difference between revisions

From Bay Area Mesh
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 43: Line 43:
   
 
Change the 100 in the above command to match the ID of your VM.
 
Change the 100 in the above command to match the ID of your VM.
  +
  +
Note; depending on your Proxmox configuration, <code>local</code> may not be correct for you. Another common possibility here is <code>local-lvm</code> so if this command errors, try that instead.
   
 
== Making the VM bootable ==
 
== Making the VM bootable ==
Line 65: Line 67:
   
 
== Configuring AREDN ==
 
== Configuring AREDN ==
The version of AREDN that boots up is exactly like any other version of AREDN; it’s accessible on IP address 192.168.1.1 and must be configured through the AREDN UI.
+
The version of AREDN that boots up is exactly like any other version of AREDN. However, because we dont have easy access to the UI yet, we can finish the configuration from the console.
  +
  +
From the console execute the following command:
  +
  +
<code>/usr/local/bin/firstuse_setup <NODE NAME> <PASSWORD></code>
  +
  +
Where <code><NODE NAME></code> should be replaced by your node's new name, and <code><PASSWORD></code> should be a password to protect access to this node. For example:
   
  +
<code>/usr/local/bin/firstuse_setup KN6PLV-MyNewNode mysecretpassword</code>
Depending on the configuration of your Proxmox server, address 192.168.1.1 might not be the easiest address to work with. For example, my Proxmox server uses the subnet 192,.168.51.X. So before configuring AREDN for the first time, we will quickly change the default IP address by typing:
 
   
  +
Then reboot the node using the command:
<code>ifconfig br-lan 192.168.51.253</code>
 
   
  +
<code>/sbin/reboot</code>
Replace the 192.168.51.253 IP address with whatever makes sense for your setup.
 
   
  +
Once the node has rebooted, the setup will have been completed and the node will have a 10.X.Y.Z address like all AREDN nodes.
You can now open the AREDN UI using '''<nowiki>http://192.168.51.253</nowiki>''' and set up the node as you normally would. Don’t forget the default AREDN username and password is “root” and “hsmm”.
 
   
 
== Connecting to the Mesh ==
 
== Connecting to the Mesh ==

Latest revision as of 21:57, 3 November 2024

We’re going to create a VM on Proxmox and use an AREDN x86 image as the boot disk. To do this we’ll first create a normal VM, import the AREDN disk image, and then boot the VM.

Create a VM

First create a VM by using the normal Proxmox Create VM UI. Pick a name for your node, not forgetting to include your callsign at the beginning as usual.

Aredn Proxmox Create VM.png

We’re not going to install AREDN from an install image, so here we just picked “Do not use any media”.

Aredn Proxmox No CD.png

For the system, we just use the defaults.

Aredn Proxmox Default System.png

We’re not going to use the default disk (we’ll add our own later) so hit the trash icon next to “scsi0” on the top/left to remove it.

Aredn Proxmox Trash Disk.png

It will look like this when you’re done.

Aredn Proxmox No Disks.png

You can leave the CPU as the default.

Aredn Proxmox Default CPU.png

For memory you won’t want anything like as much as the default. 128MB is plenty.

Aredn Proxmox 128M Memory.png

Networking can be left with the defaults. Later you might want to change these, but I’m going to assume you know what you’re doing if you’re changing VLAN tags.

Aredn Proxmox Default Networking.png

Finally hit Finish and you’re done with the first step.

Aredn Proxmox Confirm.png

Adding the AREDN boot image

The next step needs to be completed from the command line, so log into your Proxmox server.

Download the AREDN x86 boot image from the AREDN server. The URL will end ext4-combined.img.gz and will have the form:

http://downloads.arednmesh.org/snapshots/targets/x86/64/aredn-VERSION-x86-64-generic-ext4-combined.img.gz

So to download the image you might type:

wget http://downloads.arednmesh.org/snapshots/targets/x86/64/aredn-20230510-ca49646-x86-64-generic-ext4-combined.img.gz

Next we uncompress the image:

gunzip aredn-20230510-ca49646-x86-64-generic-ext4-combined.img.gz

You may see a message about trailing garbage. You can safely ignore this.

We now need to import the disk into our VM. When we created out VM we gave it the ID 100, so we do this using the following command:

qm disk import 100 aredn-20230510-ca49646-x86-64-generic-ext4-combined.img local

Change the 100 in the above command to match the ID of your VM.

Note; depending on your Proxmox configuration, local may not be correct for you. Another common possibility here is local-lvm so if this command errors, try that instead.

Making the VM bootable

We now have a VM with an AREDN disk, but the VM isn’t yet read to boot. We now need to make our newly imported disk the boot disk.

Back in the Proxmox UI, select the VM and then the Hardware tab, which should look something like this:

Aredn Proxmox Basic VM.png

Notice the “Unused Disk 0” at the bottom - that’s the disk we just imported. Double tap on the “Unused Disk 0” row to bring up the following dialog:

Aredn Proxmox Disk Setup.png

And then just hit the ‘Add” button. The disk is now added.

The final step is to make it the boot disk. Select the VM again, but this time pick the “Options” tab, and then double click the “Boot Order” row.

Aredn Proxmox Check Boot Order.png

On the displayed popup make sure to only select the SCSI disk, like this:

Aredn Proxmox Set Boot Disk.png

Hit OK.

Booting

We’re ready to boot up the AREDN VM for the first time. Hit the Start button and and select the VM’s Console. Hit the RETURN key a couple of times after the text stops scrolling and the screen will look something like this:

Aredn Proxmox Booted.png

Congratulations!

Configuring AREDN

The version of AREDN that boots up is exactly like any other version of AREDN. However, because we dont have easy access to the UI yet, we can finish the configuration from the console.

From the console execute the following command:

/usr/local/bin/firstuse_setup <NODE NAME> <PASSWORD>

Where <NODE NAME> should be replaced by your node's new name, and <PASSWORD> should be a password to protect access to this node. For example:

/usr/local/bin/firstuse_setup KN6PLV-MyNewNode mysecretpassword

Then reboot the node using the command:

/sbin/reboot

Once the node has rebooted, the setup will have been completed and the node will have a 10.X.Y.Z address like all AREDN nodes.

Connecting to the Mesh

To connect the VM to the rest of your mesh, you need to route VLAN 2 out of the VM.

Unfortunately, there's no Proxmox UI, or even command line tools, to do this. So you need to edit the VM's configuration by hand.

On your Proxmox host change to the directory /etc/pve/qemu-server

cd /etc/pve/qemu-server

When the VM is stopped, edit the file 100.conf (or whatever ID you gave your VM) and look for a line which looks something like this (the mac address, here in italics, will be different from shown here):

net0: virtio=62:1b:33:cf:67:01,bridge=vmbr0

Change this line to append trunks=2, so it looks like this:

net0: virtio=62:1b:33:cf:67:01,bridge=vmbr0,trunks=2

You can now restart the VM and the DtD/VLAN2 will be connected from your AREDN VM to your Proxmox host.

Proxmox Host VLANs

Next you have to connect the host's VLAN2 to your mesh network. There are many ways you could do this, so it's difficult to provide instructions for this step. One option is to use a hAP lite or hAP ac2 and connect Port 5 (the DtD out port) to your Proxmox server either via a dumb switch or to an extra ethernet port on your Proxmox host. How to configure VLANs on the Proxmox host is beyond the scope of this article, but you may find this YouTube video "Proxmox NETWORKING: VLANs, Bridges, and Bonds!" helpful.