Necessity of QEMU Virtualizer?
tchandramohan opened this issue · 2 comments
Hi Alex,
I successfully generated images under onie/build/images. The directory contains the ONIE kernel image, ONIE filesystem, ONIE self-update image & ONIE recovery image. I exited the docker.
On my host, in the directory onie/emulation, I proceed to run the following command that will launch a qemu virtualizer for the corresponding .iso
#################################################################################################
#################################################################################################
My questions are:
- Why do we need qemu? (I understand vaguely it is a similar platform as virtualbox or vmware)
- Can ONIE be installed without the use of qemu? If yes, how do I proceed?
- Can ONIE be made to function with a docker than a virtualizer?
You're correct in that QEMU provides the virtual hardware (x86 or arm64) for the kvm_x86_64 or qemu_armv8a images to run on. It's mainly there for QA/development purposes for ONIE functions that aren't hardware specific (proving kernels run, trying out new builds of components, making sure a patch for x86 doesn't break arm64, demonstrating the code can work with Secure Boot, etc). Virtualbox or vmware could probably be used too, but I believe QEMU was used since the licensing is a bit more open and it was easier/faster to patch than other virtualizers. I'm not sure if vmware/virtualbox will let you swap out the UEFI BIOS, either (finding a working one for arm64 was...challenging). QEMU is, however, a proper nightmare to properly configure - hence the helper scripts to get a known working configuration.
If you're building a machine target other than kvm_x86_64 or qemu_armv8a, you'll probably need the actual switch that matches the ONIE MACHINE target that it was built for, since there will be hardware like the switch ASIC that QEMU doesn't support.
Not that you couldn't build a machine target that would run on QEMU - but it would probably require not using some hardware specific settings.
Which rolls in to your second question - it should just be burning the iso image on to a usb drive and putting it in to the switch you're building for, and pointing the BIOS to boot it.
ONIE probably won't work with Docker/Podman as those still use the host system's kernel (try a uname -a and it should be the same as the host, regardless of container OS) so any kernel/BIOS stuff wouldn't apply. Some of it could probably run in a container, but I can't think of a use case that would justify the effort.
HTH
Thank you for the information you have provided. I am closing this ticket.