vMX
Highlighted
vMX

vMX on Ubuntu 16.04 LTS

a week ago

Hi,

 

I have installed Ubuntu 16.04 because I need to install vMX version 18.3 and have gone through the configuration process prior to running the following command:

 

sudo ./vmx.sh -lv --install

 

I have added , whatI believe to be a required line, to the vmx.conf file as follows:

device-type : virtio
identifier : vmx1 
host-management-interface : eno2
routing-engine-image : "/home/clive/juniper/images/junos-vmx-x86-64-18.3R1.9.qcow2"
routing-engine-hdd : "/home/clive/juniper/images/vmxhdd.img"
forwarding-engine-image : "/home/clive/juniper/images/vFPC-20180829.img"

 

And running the command:

 

sudo ./vmx.sh -lv --install

 

Halts at the following error (almost immediately):

 

==================================================
Welcome to VMX
==================================================
Date..............................................12/06/18 11:06:50
VMX Identifier....................................vmx1
Config file......................................./home/clive/juniper/vmx/config/vmx.conf
Build Directory.................................../home/clive/juniper/vmx/build/vmx1
Assuming kvm hypervisor...........................
Virtualization type...............................kvm
./vmx.sh: 82: [: virtio: unexpected operator
Error! Invalid virtio

 

Any ideas as to why please? I have tried commenting out the line....

 

I have no problem at all on Ubunti 14 LTS for vMX 17   ----  but I really need vMX 18.3

10 REPLIES
vMX

Re: vMX on Ubuntu 16.04 LTS

a week ago

Hi,

 

Can you please share the complete file of vmx.conf.

 

i think this a syntax issue, can you try the same by modifiying a sample config file, which would under "config/samples/".

-
VR
# Please mark my solution as accepted if it helped, Kudos are appreciated as well.
vMX

Re: vMX on Ubuntu 16.04 LTS

[ Edited ]
a week ago

Sure... here's the vmx.conf file (currently):

 

##############################################################
#
#  vmx.conf
#  Config file for vmx on the hypervisor.
#  Uses YAML syntax.
#  Leave a space after ":" to specify the parameter value.
#
##############################################################
---
#Configuration on the host side - management interface, VM images etc.
HOST:
    device-type               : virtio
    identifier                : vmx1   # Maximum 6 characters
    host-management-interface : eno2
    routing-engine-image      : "/home/clive/juniper/images/junos-vmx-x86-64-18.3R1.9.qcow2"
    routing-engine-hdd        : "/home/clive/juniper/images/vmxhdd.img"
    forwarding-engine-image   : "/home/clive/juniper/images/vFPC-20180829.img"
---
#External bridge configuration
BRIDGES:
    - type  : external
      name  : br-ext                  # Max 10 characters
---
#vRE VM parameters
CONTROL_PLANE:
    vcpus       : 1
    memory-mb   : 1024
    console_port: 8601
    interfaces  :
      - type      : static
        ipaddr    : x.x.x.x
        macaddr   : "0A:00Smiley Very HappyD:C0Smiley Very HappyE:0E"
---
#vPFE VM parameters
FORWARDING_PLANE:
    memory-mb   : 8192
    vcpus       : 4
    console_port: 8602
    device-type : virtio
    interfaces  :
      - type      : static
        ipaddr    : x.x.x.x
        macaddr   : "0A:00Smiley Very HappyD:C0Smiley Very HappyE:10"
---
#Interfaces
#JUNOS_DEVICES:
#   - interface            : ge-0/0/0
#     mac-address          : "02:06:0A:0E:FF:F0"
#     description          : "ge-0/0/0 interface"
#   - interface            : ge-0/0/1
#     mac-address          : "02:06:0A:0E:FF:F1"
#     description          : "ge-0/0/0 interface"
 
#   - interface            : ge-0/0/1
#     mac-address          : "02:06:0A:0E:FF:F1"
#     description          : "ge-0/0/0 interface"
#   - interface            : ge-0/0/2
#     mac-address          : "02:06:0A:0E:FF:F2"
#     description          : "ge-0/0/0 interface"
#   - interface            : ge-0/0/3
#     mac-address          : "02:06:0A:0E:FF:F3"
#     description          : "ge-0/0/0 interface"
 
 
 
vMX

Re: vMX on Ubuntu 16.04 LTS

a week ago

We dont need device-type configured under HOST section.. It has been already defined under vPFE section.. 

So can you remove device-type under HOST section and try.

-
VR
# Please mark my solution as accepted if it helped, Kudos are appreciated as well.
vMX

Re: vMX on Ubuntu 16.04 LTS

a week ago

How weird. I actually hashed that line out and tried and it still failed, but if you remove the line completely it gets past that point.

 

Okay, now I'm stuck here:

sudo ./vmx.sh -lv --install

 

VMX Install & Start
==================================================
Linux distribution................................ubuntu
Check GRUB........................................[Disabled]
Installation status of qemu-kvm...................[OK]
Installation status of libvirt-bin................[OK]
Installation status of bridge-utils...............[OK]
Installation status of python.....................[OK]
Installation status of libyaml-dev................[OK]
Installation status of python-yaml................[OK]
Installation status of numactl....................[OK]
Installation status of libnuma-dev................[OK]
Installation status of libparted0-dev.............[OK]
Installation status of libpciaccess-dev...........[OK]
Installation status of libyajl-dev................[OK]
Installation status of libxml2-dev................[OK]
Installation status of libglib2.0-dev.............[OK]
Installation status of libnl-dev..................[Absent]
Check Kernel Version..............................[Disabled]
Check Qemu Version................................[Disabled]
Check libvirt Version.............................[Disabled]
Check virsh connectivity..........................[OK]
[OK]
[OK]
==================================================
Pre-Install Checks Completed. 0 error(s) and 1 warning(s)
==================================================
Check RE state....................................[Not Running]
[OK]
Check for VM vfp-vmx1.............................[Not Running]
[OK]
Check if bridge br-ext exists.....................[No]
Cleanup VM bridge br-ext..........................[OK]
Cleanup VM bridge br-int-vmx1.....................[OK]
Cleanup VM bridge br-fab-vmx1.....................[OK]
==================================================
VMX Stop Completed
==================================================
Check VCP image...................................[OK]
Check VFP image...................................[OK]
Check VCP Config image............................[OK]
Check management interface........................[OK]
Setup huge pages to 8192..........................[Already configured]
[OK]
Attempt to kill libvirtd..........................[OK]
Attempt to start libvirt-bin......................[OK]
Sleep 2 secs......................................[OK]
Check libvirt support for hugepages...............[OK]
==================================================
System Setup Completed
==================================================
Get Management Address of eno1....................[OK]
Generate libvirt files............................[Failed]
Traceback (most recent call last):
File "/home/clive/juniper/vmx/scripts/common/vmx_configure.py", line 893, in <module>
if key.keys()[0] == "FORWARDING_PLANE":
AttributeError: 'NoneType' object has no attribute 'keys'
Log file........................................../home/clive/juniper/vmx/build/vmx1/logs/vmx_1544101733.log
==================================================
Aborted!. 1 error(s) and 1 warning(s)

 

vMX

Re: vMX on Ubuntu 16.04 LTS

[ Edited ]
a week ago

I think that may be because of this error I get when I complete the following command:

 

sudo apt-get install libnl-dev

 

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libnl-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libnl-dev' has no installation candidate

 

Nope: I've fixed that error by using:

 

sudo apt-get install libnl-3-dev

 

Same failure error though:

 

System Setup Completed
==================================================
Get Management Address of eno1....................[OK]
Generate libvirt files............................[Failed]
Traceback (most recent call last):
File "/home/clive/juniper/vmx/scripts/common/vmx_configure.py", line 893, in <module>
if key.keys()[0] == "FORWARDING_PLANE":
AttributeError: 'NoneType' object has no attribute 'keys'
Log file........................................../home/clive/juniper/vmx/build/vmx1/logs/vmx_1544102226.log

 

 

As an add on, I have installed: python-netifaces

 

Python versions installed:

Python 2.7.12

Python 3.5.2

vMX
Solution
Accepted by topic author adgwytc
a week ago

Re: vMX on Ubuntu 16.04 LTS

a week ago

Hi,

 

Please uncomment below section of interface.. make atleast one insterface is configured for vMX..

 

---
#Interfaces

JUNOS_DEVICES:
- interface : ge-0/0/0
mac-address : "02:06:0A:0E:FF:F0"
description : "ge-0/0/0 interface"

-
VR
# Please mark my solution as accepted if it helped, Kudos are appreciated as well.
vMX

Re: vMX on Ubuntu 16.04 LTS

a week ago

gaaaaahhhhhh - I  missed that..... Thanks very much. Working  Smiley Happy

 

 

vMX

Re: vMX on Ubuntu 16.04 LTS

[ Edited ]
a week ago

What's the key sequence please to escape from Console back to ubuntu command line?

 

ctrl + J    ----   not working

vMX

Re: vMX on Ubuntu 16.04 LTS

a week ago

try ctrl+]  and then type quit at telnet prompt..

-
VR
# Please mark my solution as accepted if it helped, Kudos are appreciated as well.
vMX

Re: vMX on Ubuntu 16.04 LTS

a week ago

Thanks - looks like ctrl+j in the docs  Smiley Happy