https://www.juniper.net/documentation/en_US/vrr/topics/task/installation/vrr-kvm-installing.html
cp /home/me/Downloads/juniper/vMX_files/junos-x86-64-17.3R1.10.qcow2 /var/lib/libvirt/images/vrr-VM01.img
cp /home/me/Downloads/juniper/vMX_files/metadata.img /var/lib/libvirt/images/metadata.img
Issue with em2 and em3 >>> need more investigation, use vlan on em1
[root@hp8300 images]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.6c3be5389335 yes eno1
vnet0
vnet1
br1 8000.000000000000 yes
virbr0 8000.000000000000 yes
virbr1 8000.000000000000 yes
virbr2 8000.5254001f8598 yes virbr2-nic
vnet2
virbr3 8000.5254000d4d01 yes virbr3-nic
vnet3
virbr4 8000.525400571a52 yes virbr4-nic
virvlan 8000.525400279847 yes virvlan-nic
vrr-ext 8000.000000000000 no
vrr-mgmt 8000.000000000000 no
#some of the bridges have been created by virsh
[root@hp8300 images]# virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
virbr2 active yes yes
virbr3 active yes yes
virbr4 active yes yes
virvlan active yes yes
#using hp8300 set-up instead >>> and change the vrr.xml accordingly ( br0 + virbr0 )
#brctl addbr vrr-mgmt
#brctl addbr vrr-ext
#ip link set dev vrr-mgmt up
#ip link set dev vrr-ext up
<domain type='kvm' id='3'>
<!-- Assign VRR VM instance name -->
<name>vrr</name>
<!-- Assign Unique ID for each VRR VM instance -->
<uuid>57dfb619-105b-4388-8935-072886296763</uuid>
<!-- Assign Memory required for this VRR VM instance -->
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<!-- Assign required virtual CPU for VRR VM instance, here 4 vcpu is assigned -->
<vcpu placement='static' cpuset='0-1'>2</vcpu>
<cputune>
<vcpupin vcpu='0' cpuset='0'/>
<vcpupin vcpu='1' cpuset='1'/>
</cputune>
<resource>
<partition>/machine</partition>
</resource>
<sysinfo type='smbios'>
<bios>
<entry name='vendor'>Juniper</entry>
</bios>
<system>
<entry name='manufacturer'>Juniper</entry>
<entry name='product'>VRR</entry>
<entry name='version'>18.2</entry>
</system>
</sysinfo>
<os>
<type arch='x86_64' machine='pc-i440fx-rhel7.0.0'>hvm</type>
<boot dev='hd'/>
<smbios mode='sysinfo'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<cpu mode='custom' match='exact'>
<model fallback='allow'>SandyBridge</model>
</cpu>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<!-- Provide VRR VM instance image location -->
<source file='/var/lib/libvirt/images/vrr-VM01.img'/>
<backingStore/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='directsync'/>
<!-- Provide metadata image location, if needed -->
<source file='/var/lib/libvirt/images/metadata.img'/>
<backingStore/>
<target dev='sda' bus='usb'/>
<alias name='usb-disk0'/>
</disk>
<controller type='pci' index='0' model='pci-root'>
<alias name='pci.0'/>
</controller>
<controller type='ide' index='0'>
<alias name='ide0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='usb' index='0'>
<alias name='usb0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<!-- em0 – management interface with the associated bridge -->
<interface type='bridge'>
<source bridge='br0'/>
<target dev='vnet0'/>
<model type='e1000'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<!-- em1 – external data interface with the associated bridge -->
<interface type='bridge'>
<source bridge='virbr0'/>
<target dev='vnet1'/>
<model type='e1000'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</interface>
<!-- em2 – external data interface with the associated bridge -->
<interface type='bridge'>
<source bridge='virbr2'/>
<target dev='vnet2'/>
<model type='e1000'/>
<alias name='net2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</interface>
<!-- em3 – external data interface with the associated bridge -->
<interface type='bridge'>
<source bridge='virbr2'/>
<target dev='vnet3'/>
<model type='e1000'/>
<alias name='net3'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/0'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/0'>
<source path='/dev/pts/0'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
<listen type='address' address='127.0.0.1'/>
</graphics>
<video>
<model type='cirrus' vram='16384' heads='1'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x13' function='0x0'/>
</memballoon>
</devices>
</domain>
from vRR1.xml slot= '0x04' function= '0x0'
em0 = 0x03 >> will be the first interface
em1 = 0x04 >> will be the second interface
em2 = 0x05 >> will be the third interface
em3 = 0x06 >> will be the forth interface
[root@hp8300 ~]# virsh domiflist vRR1
Interface Type Source Model MAC
-------------------------------------------------------
vnet4 bridge br0 e1000 52:54:00:b5:e6:1c
vnet5 bridge br0 e1000 52:54:00:78:7d:ee
vnet6 bridge virbr2 e1000 52:54:00:eb:ba:dd
vnet7 bridge virbr2 e1000 52:54:00:10:e3:49
|
[root@hp8300 ~]# brctl showmacs br0 | grep 52:54:00:b5:e6:1c
4 52:54:00:b5:e6:1c no 1.01
bridge name bridge id STP enabled interfaces
br0 8000.6c3be5389335 yes eno1
vnet4
br1 8000.000000000000 yes
virbr0 8000.000000000000 yes
virbr1 8000.000000000000 yes
virbr2 8000.5254001f8598 yes virbr2-nic
vnet5
vnet6
vnet7
virbr3 8000.5254000d4d01 yes virbr3-nic
virbr4 8000.525400571a52 yes virbr4-nic
virvlan 8000.525400279847 yes virvlan-nic
vrr-ext 8000.000000000000 no
vrr-mgmt 8000.000000000000 no
[root@hp8300 ~]# virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
virbr2 active yes yes
virbr3 active yes yes
virbr4 active yes yes
virvlan active yes yes
|
---|
set system host-name vRR1
set system root-authentication plain-text-password
delete interfaces em0.0 family inet dhcp
set interfaces em0.0 family inet address 192.168.0.3/24
set ssh root-login allow
[root@hp8300 qemu]# virsh --help | grep vnc
vncdisplay vnc display
[root@hp8300 qemu]# virsh vncdisplay vrr
127.0.0.1:3
[root@hp8300 qemu]# virsh list
Id Name State
----------------------------------------------------
1 server1 running
6 vsrx1 running
9 vrr running
[root@hp8300 qemu]# virsh console vrr
Connected to domain vrr
Escape character is ^]
FreeBSD/amd64 (vRR1) (ttyu0)
login: