How to install a Virtual Machine on Peplink/Pepwave - MediaFast/ContentHub Routers

Using Virtual Machine Manager to create a virtual machine via Network Install

Virtual Machine Manager (can be downloaded here) is a desktop user interface for managing KVM virtual machines through libvirt. It presents a summary view of running domains, their live performance & resource utilization statistics. Wizards enable the creation of new domains and the configuration & adjustment of a domain’s resource allocation & virtual hardware.

The wizard provides the following methods to install the operating system in the new virtual machine:

  • Local install media (ISO image or CDROM)
  • Network Install (HTTP, FTP, or NFS)
  • Network Boot (PXE)
  • Import existing disk image

Below are the steps of the Network Install:

  1. Open Virtual Machine Manager on the local PC (eg. Linux OS such as Ubuntu, Fedora, etc). Select “File > Add Connection…” and a dialog will appear. Configure the settings as below and click “Connect” to access the Peplink router KVM Console. The Username is the Web Admin / Username, and the Hostname could be the hostname or the IP of the Peplink device.
    Screenshot_1

  2. Input username and password for authentication. These are the same credentials as the device’s Web Admin login credentials.
    Screenshot_2

  3. After establishing a connection, a summary view of the VMs that are installed on the device will be displayed, as shown below. You can also start or shutdown any VM while in this view.
    Screenshot_3

  4. Go to “File > New Virtual Machine” in the menu bar and the dialog below will appear. Select “Network Install (HTTP, FTP, or NFS)” and click “Forward”.
    Screenshot_4

  5. Input the URL of the operating system install file to the URL field as shown below and click “Forward”. The following URL is the CentOS 7 install URL for testing.
    Screenshot_5

  6. Specify the RAM size and the number of CPUs to be allocated to the VM and click “Forward”.
    Screenshot_6

  7. Specify the storage size for the VM and click “Forward”.
    Screenshot_7

  8. Specify the name of the VM. Ensure that the “Customize configuration before install” checkbox is checked and specify “br0” in the “Bridge name” as shown below. Click “Finish”.
    Screenshot_8

  9. A VM configuration dialog will appear as shown below.
    Screenshot_9

  10. Modify the hardware configuration as listed below:

a. Delete the following hardware:

  • Tablet
  • Sound: ich6
  • Channel qemu-ga
  • Channel spice
  • Video QXL
  • USB Redirector 1
  • USB Redirector 2
  • VirtIO Disk 1

b. Select “Copy host CPU configuration” under “CPUs” as shown below.
Screenshot_10

c. Change “Display Spice” to “Display VNC”, and copy the settings as shown below.
Screenshot_11

d. Add “Storage” by clicking “Add Hardware”. Select “Storage” to specify the size, and click “Finish” when done.
Screenshot_12

  1. Displayed below is the final hardware configuration. Click “Begin Installation” to start the installation.
    Screenshot_13

  2. Open a VNC viewer and connect to the device as shown below.
    Screenshot_14

  3. A console will appear. Complete the installation here.

  4. When the installation is completed, the newly created VM will appear in the summary view as shown below.
    Screenshot_16

After the VM is installed in the Balance, the Balance needs to be configured to pass the traffic from WAN to the VM.

Listed below are the steps for configuring the Balance device:

  1. Log in to the Web Admin of the Balance.

  2. Find the VM’s IP address. There are two ways to get the VM’s IP address:
    a. Log in to the VM via VNC and use commands to get the network interface’s IP address; or
    b. From the Balance Web Admin, go to “Status → Client List”, and identify the correct IP address. From the example below, the VM’s IP address is 192.168.1.101.

  3. Navigate to “Network → NAT Mappings” and click the “Add NAT Rule” button.

  4. In the “Inbound Mappings” section, input the VM’s IP address and select the WAN as shown below. Click “Save” and “Apply Changes” to activate the changes.

  5. Once the changes are applied, the user will be able to access the VM (eg. CentOS) as if it was a standalone machine. For example, using SSH to connect to the host via the Peplink WAN IP (in this scenario: 59.148.180.42).

NOTES:

  1. KVM support was added in Firmware 8.0.2 special build (officially supported in Firmware 8.1.0). The latest special firmware can be downloaded from the link below:
    https://download.peplink.com/firmware/plb2500/fw-b305hw2_380hw6_580hw2_710hw3_1350hw2_2500-8.0.2s029-build2731.bin

  2. If the previous firmware that is installed on the Peplink router is a non-KVM version, after upgrading to 8.0.2s029, please allocate storage to the KVM and make sure the service is enabled. Follow the screen captures below to enable KVM.
    i. Configure storage allocation by navigating to “Storage Manager”, and clicking “Configure”.


    ii. Assign storage to the KVM service and click “Format” to proceed.

    iii. Navigate to “Advanced” > “KVM” and enable the KVM service.

  3. This feature is only applicable to higher-end models with more powerful CPUs and larger storages, e.g. MFA500, MFA750, and the X-series routers with storage options.