Installing and Running vJunos-Switch on Proxmox

TL:DR Juniper have been kind enough to release vJunos-Switch as a free product.

If you’re here then you probably want to skip to the chase of finding out how to run this on a Proxmox Server, so let’s get started in installing and running vJunos-switch on Proxmox.

 

Download the .qcow2 image from https://support.juniper.net/support/downloads/?p=vjunos

Note: change the file name where appropriate below if a newer version is available.

1) SSH into your Proxmox server.

2) Create a qcow directory in /var/lib/vz/template

mkdir /var/lib/vz/template/qcow

3) Upload the .qcow2 image to /var/lib/vz/template/qcow (sFTP/SCP)

4) Create the VM config file, you’ll need to find the next available VM ID on the host. For me that was 120 but you should check.

touch /etc/pve/qemu-server/120.conf

5) Assign the .qcow2 image to the VM, you’ll need to adjust local-zfs to whatever datastore you wish.

cd /var/lib/vz/template/qcow/
qm importdisk 120 vjunos-switch-23.1R1.8.qcow2 local-zfs

 

6) Replace the config of the previously-created 120.conf

nano /etc/pve/qemu-server/120.conf

Contents:

 

args: -smbios type=1,product=VM-VEX -chardev socket,id=serial0,port=7890,host=0.0.0.0,server=on,wait=off,telnet=on -device isa-serial,chardev=serial0
boot: order=virtio0
cores: 4
cpu: host
memory: 8192
meta: creation-qemu=7.2.0,ctime=1682364130
name: vjunos-switch-2
net0: virtio=FA:BB:50:F5:DD:C1,bridge=vmbr0,firewall=1
net1: virtio=3E:4E:80:80:15:45,bridge=vmbr0,firewall=1
net2: virtio=66:E9:23:49:6F:C6,bridge=vmbr0,firewall=1
net3: virtio=FE:B6:81:8F:85:EE,bridge=vmbr0,firewall=1
net4: virtio=46:22:4C:F2:AB:50,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsihw: virtio-scsi-single
smbios1: uuid=b60b0b27-593c-42fd-a2ac-a8702cb0415e
sockets: 1
vga: none
virtio0: local-zfs:vm-120-disk-0,iothread=1,size=32524M
vmgenid: 0b30be1d-92b6-443c-a416-725dbcfa14d5

7) Power up the VM, and then telnet to localhost port Start VM and, from the Proxmox Host, telnet to localhost on 7890

It’ll take a couple minutes for Junos to fully boot and there will be some inevitable messages that look like errors, but you should eventually get to the cli prompt.

 

 

 

For more misc Juniper blog posts, see here