GNS3 VM on VMware Fusion tech preview for M1 #3261
Replies: 19 comments 15 replies
-
Beta Was this translation helpful? Give feedback.
-
Here are the instructions to run IOU SSH to the VM, install Qemu User Emulation
Edit
Finally, install gns3-iou which will in turn install the necessary IOU dependencies (SSL lib)
|
Beta Was this translation helpful? Give feedback.
-
Regarding Qemu and the lack of KVM support in the VM, I think the problem is even bigger because even if we have it, this would only work for ARM (qemu-system-aarch64) not for qemu-system-x86_64, the major issue is that most virtual appliances from the big companies are all x86_64 based. |
Beta Was this translation helpful? Give feedback.
-
Hello, I downloaded the experimental vm and set it up in Vmware fusion tech preview per your instructions and have observed that the vm is not booting properly. |
Beta Was this translation helpful? Give feedback.
-
Hi! I've just followed the guide and tried docker containers with amd64 images. At first, i couldn't make it work properly, but after installing qemu-user-static i was able to run amd64 images on containers.
I've tried with the following images: Idk if i misunderstand something or it just works as intended. |
Beta Was this translation helpful? Give feedback.
-
Wow thank you ! As soon as I get my hands on my m1 , I will help with testing ! |
Beta Was this translation helpful? Give feedback.
-
I got my Mac and started to compile dynamips from git . Good news it compiled, but without jit . Nevertheless , it seems the idle pc calculation is broken. I got a lot of values and none of them are working. Tested with c7200-advipservicesk9-mz.152-4.S5.bin . @grossmj Does idle pc calculation works for you ? |
Beta Was this translation helpful? Give feedback.
-
Hi, I am very new to GNS3
thanks |
Beta Was this translation helpful? Give feedback.
-
@grossmj sincerely I'm sorry but I can't add new device templates due to hash sum mismatch :( what i'd do? |
Beta Was this translation helpful? Give feedback.
-
Hello @grossmj Thanks a ton for this post and i finally managed to install GNS3 VM on my M1 (almost lost hope as vmware/VIrtual box support is still officially not there) Is there any a way i can install Cisco NXOSv/Arista VEOS appliances on this VM as they both are x86? I tried selecting the different qemu options but its stuck at waiting for the server to respond and does not proceed. Again massive applauds for releasing this post. |
Beta Was this translation helpful? Give feedback.
-
I am using a x86 server to run the vm. On my m1 I start gns3 and connect to the server it runs perfectly. Due to the lack of x86 emulation on m1 I don’t think there will be a solution to run gn3 directly on your mac. Maybe never , until all vendors are shipping vm’s for arm64 and this will take years |
Beta Was this translation helpful? Give feedback.
-
Nice solution! @grossmj |
Beta Was this translation helpful? Give feedback.
-
@grossmj Tried this with IOSv using the default QEMU binary which is /usr/bin/qemu-system-x86_64 (v4.2.1) but when the device starts it is stuck in the "Booting from Hard Disk..." stage. Now if I select to use /usr/bin/qemu-system-aarch64 (v4.2.1) it'd crash with the following in the console.
And with the following pop up. Can you comment if there are any additional steps you did? I'm running this on gns3-vm 2.2.32. |
Beta Was this translation helpful? Give feedback.
-
getting below error. GNS3 management console. => Cannot load the GNS3 VM settings in the preferences dialog: not connected to the controller |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Transport (VMDB) error -14: Pipe connection has been broken |
Beta Was this translation helpful? Give feedback.
-
Very nice! Thanks!!! Works like a charm! |
Beta Was this translation helpful? Give feedback.
-
Don't know if I am doing something wrong, but I was never able to start the gns2 vm on fusion in my MacBook M1. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
@grossmj First, Thank you for your all the work. I have followed your steps and was able to install GNS3 VM on my MacBook pro M1 chip. Now, I tried to set up some testing PJ , adding Paloalto VM on GNS3. I found one youtube tutorial about adding PA VM in GNS3 MacBook m1, https://youtu.be/OFu2WXENWdI?si=982vvU1hJD05B912, but when i about to install PA VM, the option "Install the appliance on the GNS3 VM (recommended) is grayed out. Then once i hit next then I get the error message ("The selected server doesn't support KVM.A Linux server of the GNS3 VM running in VMware is required." Please see attached screenshot. Appreciate if anyone can help!! |
Beta Was this translation helpful? Give feedback.
-
I built a GNS3 VM for ARM which can run on Apple silicon M1. You can download the disks (VMDK) here
Please note this is EXPERIMENTAL, do not expect it to work like on Intel/AMD. VMware Fusion for M1 itself is just a preview. See below for limitations, workarounds and other issues.
Installation on VMware Fusion
Create a custom virtual machine
It is not possible to import an OVA at the moment, see #3257 (comment)
Choose the operating system
The GNS3 VM is based on Ubuntu 20.04 LTS for ARM64 architecture (aarch64).
Choose a virtual disk
Select the first GNS3 VM disk.
Customize the name
Add the second hard drive
Go to the VM settings and add an additional device
Select the second disk
Configure network adapters
Go back to the VM settings and add another device
Make sure it is configured for NAT
Go to the first adapter settings and make sure it is configured to be private
Start the VM
Launch GNS3 and use the VM as a remote server
Limitations and workarounds
Docker
Trying to run a container out of the box will result in an exec format error because the busybox binary that is distributed part of the GNS3 server package is compiled for the x86_64 architecture, not ARM.
The workaround is to SSH to the GNS3 VM and type this command:
sudo cp /usr/bin/busybox /usr/local/lib/python3.8/dist-packages/gns3server/compute/docker/resources/bin/busybox
Note that this will not be needed with GNS3 version >= 3.0, the server will automatically use the host busybox: GNS3/gns3-server#1908
However, any image or container you want to run must be built for the arm64v8 architecture, most images like Ubuntu, Alpine etc. support this. You can quickly check on Docker Hub what architectures are supported, for instance https://hub.docker.com/_/ubuntu
Compare this with a container we distribute, https://hub.docker.com/r/gns3/network_automation/tags, which only supports amd64. We aim to have our containers built for multiple architectures at a later stage.
This is what happens if you want to run Ubuntu image made for amd64 architecture:
It is currently only possible to run images / containers made for other architectures on a x86_64 host, see https://www.stereolabs.com/docs/docker/building-arm-container-on-x86/ and https://github.com/multiarch/qemu-user-static#supported-host-architectures.
Conclusion it is only possible to Docker containers made for arm64/v8
Qemu
Qemu is the big issue because KVM hardware acceleration is not supported.
My understanding is that to use KVM, the firmware must start Linux in hypervisor (EL2 / HYP) mode and the kernel should print something like this:
As you can see GNS3 VM doesn't start with Hypervisor mode or EL2:
Also, I read the following
nested virtualization including the ARMv8.4 improvements are present on Apple M1. However, Apple's virtualization solution doesn't currently support those.
Also, I was successful to run the GNS3 VM using a patched QEMU leveraging Hypervisor.framework (hvf acceleration): see https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5 or https://gist.github.com/citruz/9896cd6fb63288ac95f81716756cb9aa
However, as expected, nested virtualization isn't possible even after trying to enable it on the Qemu command line (virtualization=on).
So I don't expect we will see nested virtualization until Apple or VMware does something.
I was able to manually create a template for IOSv-L2 and I had to force to not using KVM by adding
-machine accel=tcg
otherwise the server would complain that KVM is not available.Conclusion: supported but likely to be really slow
Dynamips
Dynamips seems to work okay. I only tested with a c3725 IOS image.
However, Dynamips has been compiled without JIT (Just In Time) support which may slow things down or not be as optimized.
Conclusion: supported but may be slower or unstable
IOU
It is not possible to run IOU because IOU images are compiled for i386 or x86_64. I remember of some Solaris Sparc images back in the days but nothing about ARM.
One workaround is to use Qemu User Emulation: https://wiki.debian.org/QemuUserEmulation
I was successful to manually running an IOU image:
and after installing
qemu-user-binfmt
I was able to execute IOU transparently.I will write a howto set Qemu User Emulation up in the GNS3 VM.
Conclusion: supported but may be slow since it is emulation
VPCS
No issue here since the vpcs Debian package was compiled for ARM.
Conclusion: supported, no issues detected
Beta Was this translation helpful? Give feedback.
All reactions