Run VM guest on seL4 using CAmkEs
Hello, I am trying to run VM guest on seL4 using CAmkEs. I have setup my linux machine and installed dependencies. I have run seL4 hello world example. What do I need to do run VM guest in seL4? I have serached online to see. The documentation says that to create VM guests and applications on seL4, I need to use CAmkES. I followed this link: https://docs.sel4.systems/Tutorials/camkes-vm-linux.html. What do I need to create VM on top of seL4 using CAmkES? Also, I want seL4 to run as hypervisor. I have found a tutorial on how to run it from these links. https://github.com/seL4/camkes-vm-examples/blob/master/README.md https://docs.sel4.systems/Tutorials/camkes-vm-linux But, I did not understand the following: You can boot the tutorial on an x86 hardware platform with a multiboot boot loader, or use the QEMU https://www.qemu.org/ simulator. *Note if you are using QEMU it is important to ensure that your host machine has VT-x support and KVM https://www.linux-kvm.org/page/Main_Page installed. You also need to ensure you have enabled nested virtulisation with KVM guests as described here https://www.linux-kvm.org/page/Nested_Guests.* After building is completed with ninja, how do I excute the following: Then boot images/kernel-x86_64-pc99 and images/capdl-loader-experimental-image-x86_64-pc99 (or *.ia32-pc99 if built for 32-bit) with the multiboot boot loader of your choice. -- Regards, Khalid Ameen
What do I need to create VM on top of seL4 using CAmkES? Also, I want seL4 to run as hypervisor.
In order to compile our CAmkES VM projects you will need to additionally install the host dependencies for CAmkES (https://docs.sel4.systems/HostDependencies.html - under 'CAmkES Build Dependencies'). As you've identified, we have two resources regarding how to setup a CAmkES VM project (the vm-examples README & tutorial). You can follow the build instructions described in either resource to build an example system for getting started. >You can boot the tutorial on an x86 hardware platform with a multiboot boot loader, or use the QEMU simulator. Note if you are using QEMU it is important to ensure that your host machine has VT-x support and KVM installed. You also need to ensure you have enabled nested virtulisation with KVM guests as described here. In order to run the CAmkES VM you can either boot the images on hardware or within a emulated environment. If running on hardware, this would usually involve making the images available on a hard drive or through a network such that the multiboot compliant bootloader (e.g grub) can access them. This greatly varies depending on your hardware setup of course. I generally recommend using qemu if you want quickly run and test the VM images. Expanding on the note about QEMU, our x86 VMM relies on using hardware virtualization support (VT-x) to run. Thus your host machine needs to have VT-x enabled/supported (which can usually be determined by cat-ing your '/proc/cpuinfo' and grep-ing for the 'vmx' flag). In addition you need to have KVM installed and nested virtualization enabled (since we are running our VMM in a virtualized environment, https://wiki.archlinux.org/index.php/KVM#Nested_virtualization has instructions for enabling), As shown in the VM tutorial (https://docs.sel4.systems/Tutorials/camkes-vm-linux.html), there's an example command to run the CAmkES VM: sudo ./simulate --machine q35,accel=kvm,kernel-irqchip=split --mem-size 2G --extra-cpu-opts "+vmx" --extra-qemu-args="-enable-kvm -device intel-iommu,intremap=off -net nic,model=e1000 -net tap,script=no,ifname=tap0" Or if running the images built in the camkes-vm-examples project (since this doesn't generate a simulate script): qemu-system-x86_64 -machine q35,accel=kvm,kernel-irqchip=split -cpu Nehalem,+vme,+pdpe1gb,-xsave,-xsaveopt,-xsavec,-fsgsbase,-invpcid,enforce,+vmx -nographic -serial mon:stdio -m size=2G -enable-kvm -device intel-iommu,intremap=off -net nic,model=e1000 -net tap,script=no,ifname=tap0 -kernel images/kernel-x86_64-pc99 -initrd images/capdl-loader-image-x86_64-pc99 Hope this answers your questions.
participants (2)
-
Felizzi, Alison (Data61, Kensington NSW)
-
Khalid Amen