#!/bin/sh

echo "Installing Juniper vMX"
tar -zxvf /*.tgz -C /tmp/ --wildcards vmx*/images/*img --wildcards vmx*/images/*qcow2
mkdir /vmx
mv -v /tmp/vmx*/images/vmxhdd.img /vmx/
mv -v /tmp/vmx*/images/junos-vmx*qcow2 /vmx/		# 16.1 and newer
mv -v /tmp/vmx*/images/jinstall64-vmx*img /vmx/
# vFPC / vPFE
mv -v /tmp/vmx*/images/vPFE-2*.img /vmx/vfpc.img	# 14.1
mv -v /tmp/vmx*/images/vFPC*.img /vmx/vfpc.img		# 15.1 and newer
mv -v /tmp/vmx*/images/metadata-usb-*.img /vmx/
mv -v /tmp/vmx*/images/metadata_usb.img /vmx/metadata-usb-re.img	# old style
# clean up
rm -rfv /*.tgz /tmp

#!/bin/sh

echo "Installing Juniper vMX"
tar -zxvf /*.tgz -C /tmp/ --wildcards vmx*/images/*img --wildcards vmx*/images/*qcow2
mkdir /vmx
mv -v /tmp/vmx*/images/vmxhdd.img /vmx/
mv -v /tmp/vmx*/images/junos-vmx*qcow2 /vmx/		# 16.1 and newer
mv -v /tmp/vmx*/images/jinstall64-vmx*img /vmx/
# vFPC / vPFE
mv -v /tmp/vmx*/images/vPFE-lite-*.img /vmx/vfpc.img	# 14.1
mv -v /tmp/vmx*/images/vFPC*.img /vmx/vfpc.img		# 15.1 and newer
mv -v /tmp/vmx*/images/metadata-usb-*.img /vmx/
mv -v /tmp/vmx*/images/metadata_usb.img /vmx/metadata-usb-re.img	# old style
# clean up
rm -rfv /*.tgz /tmp

Use lite image when available
vmx: Use lite image when available

Older versions of vMX ship with two vFPC images - one is for performance and
the other is the lite image meant for low throughput labing. The performance
image requires some specific CPU instructions and I couldn't actually get it to
work on my dev laptop, despite it being rather new, so switching to the lite
image.

vMX 14.1 is the only versions I've seen that actually has these two images.

Fixes #30.
