环境如下:
root@kickseed:~# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
root@kickseed:~# qemu-system-x86_64 --version
QEMU emulator version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.9), Copyright (c) 2003-2008 Fabrice Bellard
gns3 1.5.3
解压及转换为qcow2格式:
extract vmx-bundle-esxi-17.1R1.8.tgz
get junos-vmx-x86-64-17.1R1.8.tgz,vfpc_17.1R1.8.ova,vcp_17.1R1.8.ova
tar xvf vcp_17.1R1.8.ova
tar xvf vfpc_17.1R1.8.ova
qemu-img convert -f vmdk -O qcow2 vcp_17.1R1.8-disk1.vmdk vcp_17.1R1.8-disk1.qcow2
qemu-img convert -f vmdk -O qcow2 vcp_17.1R1.8-disk2.vmdk vcp_17.1R1.8-disk2.qcow2
qemu-img convert -f vmdk -O qcow2 vcp_17.1R1.8-disk3.vmdk vcp_17.1R1.8-disk3.qcow2
qemu-img convert -f vmdk -O qcow2 vfpc_17.1R1.8-disk1.vmdk vfpc_17.1R1.8-disk1.qcow2
VCP和VFP的Qemu的配置
VCP(1cpu,2G,2 NIC e1000):vcp_17.1R1.8-disk1.qcow2, vcp_17.1R1.8-disk2.qcow2,vcp_17.1R1.8-disk3.qcow2
VFP(4cpu,8G,12 NIC virtio-nic-pci):vfpc_17.1R1.8-disk1.qcow2
跑个OSPF
root@R1> show configuration | display set
set version 17.1R1.8
set system host-name R1
set system root-authentication encrypted-password "$6$TB.9Fd2a$Jixt86iBXPjDK25mjJJ/Ek9zd5zA2VrVA59Zx4vZE1Z6KU8eaKmdM5Zuhv2jXlFt4yRUUA/wL4xhVMxit9/zoJ/"
set system services ssh protocol-version v2
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/4 unit 0 family inet address 10.10.10.1/30
set interfaces fxp0 unit 0 family inet address 10.5.17.106/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
set routing-options static route 10.5.0.0/16 next-hop 10.5.17.254
set routing-options router-id 1.1.1.1
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-0/0/4.0
root@R2> show configuration | display set
set version 17.1R1.8
set system host-name R2
set system root-authentication encrypted-password "$6$RKSaomr7$T5Re0l41sd5pZ9TRXZ2Z5fSAcPCPD7o5oglaMnxJfI1qDR68xIjlsDre1DYYEegKC93oMf/zpPl.tn8BYxlFCu/"
set system services ssh protocol-version v2
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/4 unit 0 family inet address 10.10.10.2/30
set interfaces fxp0 unit 0 family inet address 10.5.17.107/24
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
set routing-options static route 10.5.0.0/16 next-hop 10.5.17.254
set routing-options router-id 2.2.2.2
set protocols ospf area 0.0.0.0 interface lo0.0 passive
set protocols ospf area 0.0.0.0 interface ge-0/0/4.0
验证
root@R1> show ospf neighbor
Address Interface State ID Pri Dead
10.10.10.2 ge-0/0/4.0 Full 2.2.2.2 128 31
root@R1>
root@R1> show route protocol ospf
inet.0: 8 destinations, 8 routes (8 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
2.2.2.2/32 *[OSPF/10] 00:25:55, metric 1
> to 10.10.10.2 via ge-0/0/4.0
224.0.0.5/32 *[OSPF/10] 00:27:27, metric 1
MultiRecv
inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)
root@R1> ping 2.2.2.2
PING 2.2.2.2 (2.2.2.2): 56 data bytes
64 bytes from 2.2.2.2: icmp_seq=0 ttl=64 time=1.444 ms
64 bytes from 2.2.2.2: icmp_seq=1 ttl=64 time=1.407 ms
^C
--- 2.2.2.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.407/1.425/1.444/0.018 ms
REF:
http://www.juniper.net/techpubs/en_US/vmx17.1/topics/task/installation/vmx-install-preparing.html
https://docs.gns3.com/144QvvLxBT69_fv-pPHf4etc5xjdItiA_a8s8gVmSTDk/index.html