Juniper vSRX 15.1X49 on QEMU

Recently, I have been quite busy running into some problems with deployment of Junos 15.1X49-D15.4 on Qemu image. So, I want make your lifer easier and I share my quick installation steps with you.

1. Download vSRX VMware Appliance

Download the file media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova. The good news is that you do not need to enter a licence key after you download the image. The bad new is that you still need a valid contract with Juniper in order to download the file. Luckily, you can find the installation file flying somewhere on the Internet.

2. Extract Archive and OVA files

$ unrar e media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.rar
$ tar xvf media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova

3. Convert StreamOptimized Virtual Machine Disk to Format 

Details ale explained in my original vSRX article.

$ qemu-img convert -O qcow2 media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4-disk1.vmdk media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4-disk1.img 

4. Hack Image To Support QEMU

Unfortunately, vSRX 15.1 image boots to “Wind River Linux 6.0.0.15” prompt but it would not launch the freebsd VM within the nested KVM instance. The workaround along with the detailed explanation of the issue is originally posted here.

$ /usr/local/bin/qemu-system-x86_64 -m 4192M media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4-disk1.img -enable-kvm -smp 2

Login with the username root, the password is not set. Copy the lines below.

Backup dmicode file.

root@localhost:/# mv /usr/sbin/dmidecode /usr/sbin/dmidecode.orig

Create the wrapper.

root@localhost:/# echo -e '#!/bin/bash\n' > /usr/sbin/dmidecode

root@localhost:/# echo '/usr/sbin/dmidecode.orig $@ | grep -v " SMBIOS implementations newer \| fully supported by this "' >> /usr/sbin/dmidecode

Assign run privileges to the wrapper.

root@localhost:/# chmod +x /usr/sbin/dmidecode

5. Configure GNS3 QEMU VM

RAM: 4448 MB or more
vCPUs: 2
Network Adapters: 8
Network Adapters Type:  Ethernet (e1000)

Note: In order to show GigabitEthernet interfaces by vSRX, more than 4192 MB RAM is needed to assign by GNS3 to vSRX  QEMU instance along with the 2 CPUs.

Picture 1 - GigabitEthernet interfaces Presented in Junos vSRX CLI

End.

One thought on “Juniper vSRX 15.1X49 on QEMU

  1. Hello,

    Nice tutorial. Thank you.
    I want to ask you about the the CPU. I know you mentioned that you must have 2 vCPU for the appliance, and that's not a problem. But the only version that for my that doesn't use all my CPU is the version 12 (the firefly version), and all the version above 12 it's using all my CPU.
    So how much of the CPU is using this version 15 for you?
    Thank you.
    Marius

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.