Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with latest versions of vQFX (18.x) #221

Open
DalianisDim opened this issue Apr 12, 2020 · 6 comments · May be fixed by #234
Open

Issues with latest versions of vQFX (18.x) #221

DalianisDim opened this issue Apr 12, 2020 · 6 comments · May be fixed by #234

Comments

@DalianisDim
Copy link

I cannot make vQFX 18.x version work with the existing code.

Issues:

  • Regex needs updating as Juniper has changed the naming significantly. Some filenames can be found below:
cosim-18.1R3-S2.5_20180212.qcow2
jinstall-vqfx-10-f-18.1R3-S2.5.vmdk

vqfx-18.4R2-S2-2019010209-pfe-qemu.vmdk
jinstall-vqfx-10-f-18.4R2-S2.3.vmdk
  • Images are now mostly qcow / qcow2. Looks like Juniper is moving away from vmdk
  • I tried renaming images to match what's expected by regex. Also tried to update regex to match new naming convention. qcow / qcow2 images converted to vmdk as well. Result: booting is stuck as below:
root@dev-vrnetlab-vqfx-1:~# docker logs 74f5bff301ea --follow
2020-04-11 20:17:59,780: vrnetlab   DEBUG    Creating overlay disk image
2020-04-11 20:17:59,803: vrnetlab   DEBUG    Creating overlay disk image
2020-04-11 20:17:59,855: vrnetlab   DEBUG    Starting vrnetlab VQFX
2020-04-11 20:17:59,856: vrnetlab   DEBUG    VMs: [<__main__.VQFX_vcp object at 0x7fd16ca1de10>, <__main__.VQFX_vpfe object at 0x7fd16ca1df28>]
2020-04-11 20:17:59,862: vrnetlab   DEBUG    VM not started; starting!
2020-04-11 20:17:59,862: vrnetlab   INFO     Starting VQFX_vcp
2020-04-11 20:17:59,863: vrnetlab   DEBUG    ['qemu-system-x86_64', '-enable-kvm', '-display', 'none', '-machine', 'pc', '-monitor', 'tcp:0.0.0.0:4000,server,nowait', '-m', '2048', '-serial', 'telnet:0.0.0.0:5000,server,nowait', '-drive', 'if=ide,file=/vcp-overlay.qcow2', '-device', 'pci-bridge,chassis_nr=1,id=pci.1', '-device', 'e1000,netdev=p00,mac=52:54:00:bb:89:00', '-netdev', 'user,id=p00,net=10.0.0.0/24,tftp=/tftpboot,hostfwd=tcp::2022-10.0.0.15:22,hostfwd=udp::2161-10.0.0.15:161,hostfwd=tcp::2830-10.0.0.15:830,hostfwd=tcp::2080-10.0.0.15:80,hostfwd=tcp::2443-10.0.0.15:443', '-device', 'e1000,netdev=vcp-int,mac=52:54:00:c6:4f:01', '-netdev', 'tap,ifname=vcp-int,id=vcp-int,script=no,downscript=no', '-device', 'e1000,netdev=dummy0,mac=52:54:00:e8:db:01', '-netdev', 'tap,ifname=dummy0,id=dummy0,script=no,downscript=no', '-device', 'e1000,netdev=p01,mac=52:54:00:82:66:01,bus=pci.1,addr=0x2', '-netdev', 'socket,id=p01,listen=:10001', '-device', 'e1000,netdev=p02,mac=52:54:00:34:83:02,bus=pci.1,addr=0x3', '-netdev', 'socket,id=p02,listen=:10002', '-device', 'e1000,netdev=p03,mac=52:54:00:8d:eb:03,bus=pci.1,addr=0x4', '-netdev', 'socket,id=p03,listen=:10003', '-device', 'e1000,netdev=p04,mac=52:54:00:cb:ed:04,bus=pci.1,addr=0x5', '-netdev', 'socket,id=p04,listen=:10004', '-device', 'e1000,netdev=p05,mac=52:54:00:62:90:05,bus=pci.1,addr=0x6', '-netdev', 'socket,id=p05,listen=:10005', '-device', 'e1000,netdev=p06,mac=52:54:00:5a:de:06,bus=pci.1,addr=0x7', '-netdev', 'socket,id=p06,listen=:10006', '-device', 'e1000,netdev=p07,mac=52:54:00:c8:70:07,bus=pci.1,addr=0x8', '-netdev', 'socket,id=p07,listen=:10007', '-device', 'e1000,netdev=p08,mac=52:54:00:09:65:08,bus=pci.1,addr=0x9', '-netdev', 'socket,id=p08,listen=:10008', '-device', 'e1000,netdev=p09,mac=52:54:00:1c:87:09,bus=pci.1,addr=0xa', '-netdev', 'socket,id=p09,listen=:10009', '-device', 'e1000,netdev=p10,mac=52:54:00:4f:5a:0a,bus=pci.1,addr=0xb', '-netdev', 'socket,id=p10,listen=:10010', '-device', 'e1000,netdev=p11,mac=52:54:00:19:3f:0b,bus=pci.1,addr=0xc', '-netdev', 'socket,id=p11,listen=:10011', '-device', 'e1000,netdev=p12,mac=52:54:00:5c:d8:0c,bus=pci.1,addr=0xd', '-netdev', 'socket,id=p12,listen=:10012']
2020-04-11 20:18:05,878: vrnetlab   DEBUG    VM not started; starting!
2020-04-11 20:18:05,878: vrnetlab   INFO     Starting VQFX_vpfe
2020-04-11 20:18:05,878: vrnetlab   DEBUG    ['qemu-system-x86_64', '-enable-kvm', '-display', 'none', '-machine', 'pc', '-monitor', 'tcp:0.0.0.0:4001,server,nowait', '-m', '2048', '-serial', 'telnet:0.0.0.0:5001,server,nowait', '-drive', 'if=ide,file=/vpfe-overlay.qcow2', '-device', 'e1000,netdev=mgmt,mac=52:54:00:6d:f4:00', '-netdev', 'user,id=mgmt,net=10.0.0.0/24', '-device', 'e1000,netdev=vpfe-int,mac=52:54:00:0f:0a:00', '-netdev', 'tap,ifname=vpfe-int,id=vpfe-int,script=no,downscript=no']
2020-04-11 20:22:45,564: launch_vqfx INFO     matched login prompt
2020-04-11 20:22:45,565: launch_vqfx DEBUG    writing to serial console: root

That is running on a n1-standard-4 GCP instance on top of docker with nested virtualization enabled. It's not even remotely consuming the available instance resources.

@htj
Copy link
Contributor

htj commented Aug 6, 2020

Hi

I'm having similar problems with vqfx as well. Quick hack is to simply set the version in the makefile:

VERSION=19.4R1.10

It also uses vmdk images and converts them to qcow2 during startup, which is a bit silly when there is qcow images of vqfx available.

@htj htj linked a pull request Aug 7, 2020 that will close this issue
@htj
Copy link
Contributor

htj commented Aug 7, 2020

Hi

I have a branch that works with vqfx 19.4 over here:
https://github.com/NORDUnet/vrnetlab/tree/vqfx_qcow

Will make pull request

@kalmanoharan
Copy link

@htj I tried using your branch with vqfx 19.4 code and getting the following error. Can you please let me know whats missing here.

root@network-tools-2:/home/kalmanoharan/TESTBED/vrnetlab/vqfx# git branch
  master
* vqfx_qcow
root@network-tools-2:/home/kalmanoharan/TESTBED/vrnetlab/vqfx# ls -lrth
total 1.4G
-rw-r--r-- 1 kalmanoharan gcpusers 2.0K Aug 30 01:07 README.md
-rw-r--r-- 1 kalmanoharan gcpusers 1.5K Aug 30 01:07 Makefile
-rw------- 1 kalmanoharan gcpusers 644M Aug 30 01:28 vqfx-19.4R1.10-re-qemu.qcow2
-rw------- 1 kalmanoharan gcpusers 728M Aug 30 01:41 vqfx-19.4R1-2019010209-pfe-qemu.qcow
drwxr-xr-x 2 kalmanoharan gcpusers 4.0K Aug 30 02:37 docker
root@network-tools-2:/home/kalmanoharan/TESTBED/vrnetlab/vqfx# make
Makefile:19: warning: overriding recipe for target 'docker-pre-build'
../makefile.include:18: warning: ignoring old recipe for target 'docker-pre-build'
Makefile:26: warning: overriding recipe for target 'docker-build-common'
../makefile.include:24: warning: ignoring old recipe for target 'docker-build-common'
for IMAGE in vqfx-19.4R1.10-re-qemu.qcow2; do \
	echo "Making $IMAGE"; \
	make IMAGE=$IMAGE docker-build; \
done
Making vqfx-19.4R1.10-re-qemu.qcow2
make[1]: Entering directory '/home/kalmanoharan/TESTBED/vrnetlab/vqfx'
Makefile:19: warning: overriding recipe for target 'docker-pre-build'
../makefile.include:18: warning: ignoring old recipe for target 'docker-pre-build'
Makefile:26: warning: overriding recipe for target 'docker-build-common'
../makefile.include:24: warning: ignoring old recipe for target 'docker-build-common'
rm -f docker/*.qcow2* docker/*.tgz* docker/*.vmdk* docker/*.iso
echo "pfe     vqfx-19.4R1-2019010209-pfe-qemu.qcow"
pfe     vqfx-19.4R1-2019010209-pfe-qemu.qcow
cp vqfx*-pfe*.qcow* docker/
echo "image   vqfx-19.4R1.10-re-qemu.qcow2"
image   vqfx-19.4R1.10-re-qemu.qcow2
echo "version 19.4R1.10"
version 19.4R1.10
Building docker image using vqfx-19.4R1.10-re-qemu.qcow2 as vrnetlab/vr-vqfx:19.4R1.10
make IMAGE=$IMAGE docker-build-image-copy
make[2]: Entering directory '/home/kalmanoharan/TESTBED/vrnetlab/vqfx'
Makefile:19: warning: overriding recipe for target 'docker-pre-build'
../makefile.include:18: warning: ignoring old recipe for target 'docker-pre-build'
Makefile:26: warning: overriding recipe for target 'docker-build-common'
../makefile.include:24: warning: ignoring old recipe for target 'docker-build-common'
cp vqfx-19.4R1.10-re-qemu.qcow2* docker/
make[2]: Leaving directory '/home/kalmanoharan/TESTBED/vrnetlab/vqfx'
(cd docker; docker build --build-arg http_proxy= --build-arg https_proxy= --build-arg RE_IMAGE=vqfx-19.4R1.10-re-qemu.qcow2 --build-arg PFE_IMAGE=vqfx-19.4R1-2019010209-pfe-qemu.qcow -t vrnetlab/vr-vqfx:19.4R1.10 .)
Sending build context to Docker daemon  1.438GB
Step 1/16 : FROM debian:stretch
 ---> 6d935b41319b
Step 2/16 : MAINTAINER Kristian Larsson <kristian@spritelink.net>
 ---> Using cache
 ---> 537f6e338146
Step 3/16 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> c7d63352fd15
Step 4/16 : RUN apt-get update -qy  && apt-get upgrade -qy  && apt-get install -y     bridge-utils     iproute2     python3     socat     qemu-kvm  && rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> b154280aa597
Step 5/16 : ARG RE_IMAGE
 ---> Using cache
 ---> 9cc9e9e91c24
Step 6/16 : ARG PFE_IMAGE
 ---> Using cache
 ---> 827eba5d8676
Step 7/16 : COPY $RE_IMAGE /
 ---> Using cache
 ---> b050904c2015
Step 8/16 : COPY $PFE_IMAGE /
 ---> Using cache
 ---> 97cf1b8b1014
Step 9/16 : RUN echo $RE_IMAGE > /re_image
 ---> Using cache
 ---> f462fda3f74e
Step 10/16 : RUN echo $PFE_IMAGE > /pfe_image
 ---> Using cache
 ---> fe313a49a49e
Step 11/16 : COPY healthcheck.py /
COPY failed: stat /var/lib/docker/tmp/docker-builder101259730/healthcheck.py: no such file or directory
Makefile:26: recipe for target 'docker-build-common' failed
make[1]: *** [docker-build-common] Error 1
make[1]: Leaving directory '/home/kalmanoharan/TESTBED/vrnetlab/vqfx'
../makefile.include:9: recipe for target 'docker-image' failed
make: *** [docker-image] Error 2
root@network-tools-2:/home/kalmanoharan/TESTBED/vrnetlab/vqfx#

@htj
Copy link
Contributor

htj commented Sep 1, 2020

Yeah, it is missing healthcheck.py, which should have been copied from ../common into docker/

Either try and copy it in manually, or add:

	cp ../common/* docker/

to the docker-build-common target in the makefile. If it works, I'll patch it.

@kalmanoharan
Copy link

Thanks @htj !!
Its working perfectly now.

@htj
Copy link
Contributor

htj commented Sep 7, 2020

Thanks for the feedback. Glad that it works.

I've updated the branch and pull request.

@plajjan Any chance of a merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants