Juniper vSRX(15.1X) を VirtualBox で動かす (original : 2015/12/11)
この記事は某所で 2015/12/11
に書いたもののコピーです。
そのため 2017/05/13
時点ではやや古い情報も含まれています。
- Juniper さんの vSRX ダウンロード規約が変わっていそう (詳細は未確認)
.
概要
本項でやること
- KVM、VMware ESX 向けの 60 日間 trial 版が公開されている Juniper vSRX を VirtualBox に入れる
- 公式にはサポートされない手順なので、自己責任で
- JUNOS の基本的な操作は省略(ある程度知っている人向け)
環境情報
- ホスト: Windows7 + VirtualBox 4.3.18
- Juniper vSRX: JUNOS 15.1X49-D15.4
vSRX?
- Juniper SRX の 仮想版
- 以前は Firefly Perimeter として公開されていた
- DPDK 対応などの機能強化を果たして、ほぼ別物として名前も Firefly から vSRX になった
- 参考 2014年03月時点での Firefly Perimeter ロードマップなど
- version が 12.1X となっているものは Firefly で 15.1X となっているものは vSRX
- だが、最近は旧 Firefly も vSRX と呼ばれていたりして、ややこしい
手順
vSRX イメージファイル取得
- Trial 版ダウンロードページ | Juniper または ダウンロードページ | Juniper にアクセス
vSRX VMware Appliance with IDE virtual disk
を選択してmedia-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova
をダウンロード2015/11/23
現在の最新版
ovf 形式にファイル変換
- 取得したovaファイルを ovf 形式にする (以下例では VMwarePlayer などに同梱されている ovftool を使用)
>ovftool.exe media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova \convert\media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ovf Opening OVA source: media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ova The manifest validates Opening OVF target: \convert\media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ovf Writing OVF package: \convert\media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ovf Transfer Completed Source is signed but could not verify certificate (possibly self-signed) Completed successfully
media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ovf media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide-disk1.vmdk media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.mf
変換したファイルに小細工(インポートエラーが出ないように)
media-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.mf
ファイルは別ディレクトリに除外しておくmedia-srx-ffp-vsrx-vmdisk-15.1X49-D15.4.ide.ovf
の line 82 を以下のように上書き編集(%iid%
->2
)
編集前
<Item ovf:configuration="4GvRAM"> <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits> <rasd:Description>Memory Size</rasd:Description> <rasd:ElementName>Memory</rasd:ElementName> <rasd:InstanceID>%iid%</rasd:InstanceID> <rasd:ResourceType>4</rasd:ResourceType> <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
編集後
<Item ovf:configuration="4GvRAM"> <rasd:AllocationUnits>byte * 2^20</rasd:AllocationUnits> <rasd:Description>Memory Size</rasd:Description> <rasd:ElementName>Memory</rasd:ElementName> <rasd:InstanceID>2</rasd:InstanceID> <rasd:ResourceType>4</rasd:ResourceType> <rasd:VirtualQuantity>4096</rasd:VirtualQuantity>
VirtualBox に ovf をインポート
ファイル
->仮想マシンのインポート
で先の編集した ovf ファイルを指定
- 以降の画面キャプチャはインポート後の設定からとってきたもの
- どうやら
アダプタータイプ
は一回起動したあとは勝手に準仮想化ネットワーク(virtio-net)
にされるようだ アダプター 1
が JUNOS 側から見るとfxp0
(管理用ポート)になる
コンソール画面から初期設定
- 起動する
- 無事に起動できたら、コンソールログインして以下を設定する
# root password の設定(必須) set system root-authentication plain-text-password -> 対話型で入力 # ユーザ作成とパスワード設定 set system login user <username> class super-user set system login user <username> authentication plain-text-password # ssh 有効化 set system services ssh root-login deny set system services ssh protocol-version v2
- 必要に応じて、以下手順でデフォルトのファイアウォールモードからルータモード(いずれも俗称)に切り替える(要再起動)
ssh して状態確認
--- JUNOS 15.1X49-D15.4 built 2015-07-31 02:20:21 UTC kotetsu> kotetsu> show version Model: vSRX Junos: 15.1X49-D15.4 JUNOS Software Release [15.1X49-D15.4] kotetsu> show chassis hardware Hardware inventory: Item Version Part number Serial number Description Chassis 5028f7dddeb5 VSRX Midplane System IO Routing Engine VSRX RE FPC 0 Virtual FPC PIC 0 Virtual GE Power Supply 0 kotetsu> show system license License usage: Licenses Licenses Licenses Expiry Feature name used installed needed Virtual Appliance 1 1 0 59 days Licenses installed: License identifier: E420588955 License version: 4 Software Serial Number: 20150625 Customer ID: vSRX-JuniperEval Features: Virtual Appliance - Virtual Appliance count-down, Original validity: 60 days kotetsu> show configuration | display set set version 15.1X49-D15.4 set system root-authentication encrypted-password "$1$8FV6oxYf$H0vFbn4hEjZEwb748.JxK0" set system login user kotetsu uid 2000 set system login user kotetsu class super-user set system login user kotetsu authentication encrypted-password "$1$w/Ff6i9v$1wW4Wrt8Xy04P8ee63/Hb." set system services ssh root-login deny set system services ssh protocol-version v2 set system services web-management http interface fxp0.0 set system syslog user * any emergency set system syslog file messages any any set system syslog file messages authorization info set system syslog file interactive-commands interactive-commands any set system license autoupdate url https://ae1.juniper.net/junos/key_retrieval set security forwarding-options family mpls mode packet-based set interfaces fxp0 unit 0 family inet address 192.168.101.30/24
おわり
- インストールしただけなので別に…