2.2.1. Install on bare metal using USB stick¶
This chapter explains how to try Virtual Service Router on a physical machine, and install it, using a USB stick.
The first thing to do is to create the USB stick.
When it is done, you can either:
Test Virtual Service Router without changing anything on your machine
Install Virtual Service Router on a local disk
Create the USB stick¶
You will need a 2GB USB stick at least, and a Linux system. The data on the USB stick will be lost in the process.
We need to find which device will be associated to the USB stick in the Linux
system. One way to do it is to use lsblk
.
Before plugging the USB stick, run:
$ lsblk | grep disk
sda 8:0 0 698.7G 0 disk
sdb 8:16 0 931.5G 0 disk
Then plug the USB stick. A new device should appear:
$ lsblk | grep disk
sda 8:0 0 698.7G 0 disk
sdb 8:16 0 931.5G 0 disk
sdc 8:32 1 14.4G 0 disk
In our case, sdc
is the device associated to the USB stick.
Warning
Please carefully check the device associated to your USB stick, or you could wipe your local drive in the next step.
Note
Make sure that your usb device was not auto-mounted before performing
the next steps with mount -l
. If it was, use the umount
command
to unmount each mounted partition.
Once you know this device, you can put the .img.gz
file on the
Linux system, unzip it and put it on the USB device.
# gunzip 6wind-vsr-*.img.gz
# dd if=6wind-vsr-*.img of=/dev/sdc bs=8M
Note
These two commands will take several minutes to complete. The
progress of the dd
command can be checked by doing
kill -USR1 $(pgrep ^dd)
.
Test Virtual Service Router¶
You will need physical access to the machine, and a keyboard and screen attached to it to complete these steps. Alternately, you may access the machine using its first serial port.
Once the USB stick is ready, it has to be plugged in the machine on which you want to test Virtual Service Router.
Warning
Please make sure that there is no other Virtual Service Router live CDROM or live USB inserted in this machine. Otherwise the system might fail to boot properly.
Then, you should go in the BIOS setup, select the USB stick as first boot device, save the configuration, and reboot.
After some time, you should get an output similar to the following on screen.
GNU GRUB version 2.02
+----------------------------------------------------------------------------+
|*Virtual Service Router - X.Y.Z |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+----------------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, `e' to edit the commands
before booting or `c' for a command-line.
The highlighted entry will be executed automatically in 9s.
After 10 seconds, or if you type on the Enter key, the boot will start. You should get the following output.
____ _____ _ _ ____ __ ______ ____
/ /\ \ / /_ _| \ | | _ \ \ \ / / ___|| _ \
| '_ \ \ /\ / / | || \| | | | | \ \ / /\___ \| |_) |
| (_) \ V V / | || |\ | |_| | \ V / ___) | _ <
\___/ \_/\_/ |___|_| \_|____/ \_/ |____/|_| \_\
vsr login:
You are ready to test the software. Your data will persist on the USB stick.
The next step is to perform your first configuration.
Install Virtual Service Router¶
Once you have tried Virtual Service Router, you can install it on your machine.
It can be done from the CLI, using the system-image
command.
But first, you need to know on which device Virtual Service Router should be installed. To do so, log in as admin, password admin, and at the prompt, do:
vsr> show disk
name label fstype total available
==== ============ =========== ============= =========
sda 15461882265
sdb 1000190509056
sda
is the USB stick, which we do not want to break. It is the first detected
device, and its size is small (14.4G in our case).
sdb
is the device we are looking for, it is much bigger. We will install Virtual Service Router
on sdb
in our example. The data on sdb
will be lost in the process.
Warning
Please carefully check the device associated to the disk you want to use, or you could wipe the wrong drive in the next step.
Note
Please make sure to select this disk as boot device after installation.
Now, do:
vsr> cmd system-image install-on-disk sdb
This command will install Virtual Service Router on /dev/sdb
. The relevant configuration files
will be copied from the USB stick to the local drive. At the end of the
installation, you can reboot and remove the USB stick.
Note
To restore from a backup file, add backup-url <url>
to the previous
command. This will restore your configurations, private keys,
certificates and licenses.
The backup file must have been generated on the same or previous minor version (e.g. a backup from 3.0.1 can be restored on 3.0.x or 3.1.x).
You will then get the familiar GRUB screen that you got when you were testing the software, and after some time, the login screen.
GNU GRUB version 2.02
+----------------------------------------------------------------------------+
|*Virtual Service Router - X.Y.Z |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+----------------------------------------------------------------------------+
Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, `e' to edit the commands
before booting or `c' for a command-line.
The highlighted entry will be executed automatically in 9s.
(...)
____ _____ _ _ ____ __ ______ ____
/ /\ \ / /_ _| \ | | _ \ \ \ / / ___|| _ \
| '_ \ \ /\ / / | || \| | | | | \ \ / /\___ \| |_) |
| (_) \ V V / | || |\ | |_| | \ V / ___) | _ <
\___/ \_/\_/ |___|_| \_|____/ \_/ |____/|_| \_\
vsr login:
The next step is to perform your first configuration.