Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

https://www.juniper.net/documentation/en_US/vrr/topics/task/installation/vrr-kvm-installing.html

...

#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

...

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

Code Block
titleshow VM's mac address
[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

...

title/etc/libvirt/qemu/vrr.xml
collapsetrue

...


Code Block
title/etc/libvirt/qemu/vrr.xml
collapsetrue
<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'>
      <driver<alias name='qemu' type='qcow2' cache='noneide0'/>
<!-- Provide VRR VM instance image location -->
      <source file='/var/lib/libvirt/images/vrr-VM01.img<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
      <backingStore</>controller>
    <controller  <target devtype='hdausb' busindex='ide0'/>
      <alias name='ide0-0-0usb0'/>
      <address type='drivepci' controllerdomain='00x0000' bus='00x00' targetslot='00x01' unitfunction='00x2'/>
    </disk>controller>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='directsync'/>
<!-- Provide metadata image location, if needed --<!-- em0 – management interface with the associated bridge -->
    <interface type='bridge'>
      <source filebridge='/var/lib/libvirt/images/metadata.imgbr0'/>
      <target <backingStoredev='vnet0'/>
      <target<model devtype='sda' bus='usbe1000'/>
      <alias name='usb-disk0net0'/>

   </disk>   <address  <controller type='pci' index='0' model='pci-root'type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
 <alias name='pci.0'/>  <!-- em1  </controller>external data interface with the <controller type='ide' index='0'associated bridge -->
    <interface  <alias nametype='ide0bridge'/>
      <address<source typebridge='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1virbr0'/>
      <target dev='vnet1'/>
    </controller>     <controller<model type='usb' index='0'e1000'/>
      <alias name='usb0net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x010x04' function='0x20x0'/>
    </controller>interface>
    <!-- em0em2 external managementdata interface with the associated bridge -->
    <interface type='bridge'>
      <source bridge='br0virbr2'/>
      <target dev='vnet0vnet2'/>
      <model type='e1000'/>
      <alias name='net0net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x030x05' function='0x0'/>
    </interface>
    <!-- em1em3 – external data interface with the associated bridge -->
    <interface type='bridge'>
      <source bridge='virbr0virbr2'/>
      <target dev='vnet1vnet3'/>
      <model type='e1000'/>
      <alias name='net1net3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x040x06' function='0x0'/>
    </interface>
    <serial type='pty'>
       <!-- em2 – external data interface with the associated bridge --><source path='/dev/pts/0'/>
      <target port='0'/>
      <interface<alias typename='bridgeserial0'/>
    </serial>
    <source<console bridgetype='pty'virbr2'/ tty='/dev/pts/0'>
      <target<source devpath='vnet2/dev/pts/0'/>
      <model<target type='serial' port='e10000'/>
      <alias name='net2serial0'/>
    </console>
    <address<input type='pcimouse' domainbus='0x0000' bus='0x00' slot='0x05' function='0x0ps2'/>
    <input type='keyboard' bus='ps2'/>
    </interface>
    <!-- em3 – external data interface with the associated bridge --><graphics type='vnc' port='5900' autoport='yes' listen='127.0.0.1'>
      <interface<listen type='address' address='bridge'>127.0.0.1'/>
    </graphics>
   <source bridge='virbr2'/> <video>
      <target<model devtype='vnet3'/>
      <model type='e1000cirrus' vram='16384' heads='1'/>
      <alias name='net3video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x060x02' function='0x0'/>
    </interface>video>
    <serial<memballoon typemodel='ptyvirtio'>
      <source<alias pathname='/dev/pts/0balloon0'/>
      <target<address porttype='0pci'/> domain='0x0000'      <alias name='serial0bus='0x00' slot='0x13' function='0x0'/>
    </serial>memballoon>
  </devices>
</domain>
<console type 


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


Code Block
titleshow VM's mac address
[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






Code Block
titlebasic configuration vRR1 root/juniper123
collapsetrue
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

...