CMPE 283 Bonus Lab Assignment Team Members 1 Abhishek Kumar 010714808 2 Anusha Tamanampudi 010471630 1 For each member in your team provide 1 paragraph detailing what parts of the lab that member implemented researched Anusha Research on KVM and hyper call KVM hyper call implementation Abhishek Host OS creation compilation and editing the kernel source code 2 Describe in detail the steps you used to complete the lab Consider your reader to be someone skilled in software development but otherwise unfamiliar with the lab assignment Good answers to this question will be recipes that someone can follow to reproduce your development steps Steps o o Download and install the vmware workstation 12 Create a new VM using Ubuntu with RAM 4GB and Storage 100GB Setting up the Host Check the kernel version using the command uname r Download the lower version of kernel from https kernel org Extract the downloaded file using following command tar zxvf yourfile tar gz For implementing the new Hypercall following files were changed 1 vmx c 2 svm c 3 kvm host h 4 kvm para h Inside the extracted folder navigate to the arch x86 kvm and In svm c file add a new function called user define hypercall counter Refer the below screenshot This function will keep track of counter increment and maps the exit type Again Inside the extracted folder navigate to the arch x86 kvm and In vmx c file eidt the handle vmcall function Refer the below screenshot This function will inturn calls the function user define hypercall counter Again Inside the extracted folder navigate to the arch x86 kvm and In kvm host h file edit the file and call the user define hypercall counter Again Inside the extracted folder navigate to the arch x86 kvm and In kvm para h file define KVM HC USER BASED SUPERCALL1 6 define KVM HC USER BASED SUPERCALL2 7 Now After completing the kernel compilation can be done as follows The first step is to download the latest stable kernel Unzip the kernel source and navigate to the downloaded path Install the ncurses dev package o sudo apt get install ncurses dev Configure the kernel o make menuconfig Compile the main kernel o make Compile the kernel modules o make modules Install the kernel modules o make modules install Install the new Kernel o make install o To use the new kernel that you just compiled reboot the system o reboot Installing KVM and creating virtual machines 1 Use the following command to install KVM and supporting packages Virt Manager is a graphical application for managing your virtual machines you can use the kvm command directly but libvirt and Virt Manager simplify the process sudo apt get install qemu kvm libvirt bin bridge utils virt manager 2 Only the root user and users in the libvirtd group have permission to use KVM virtual machines Run the following command to add your user account to the libvirtd group sudo adduser name libvirtd 3 Now open the virtual machine manager and create a VM and install Ubuntu To assign more than 2GB of memory to a virtual machine you ll need a 64 bit Linux kernel Systems running 32 bit kernels can assign a maximum of 2 GB of RAM to a virtual machine Hypercall Create a new file guest call c in guest OS and add the following code This code runs the newly created hypercall function But due to hardware limitations we were unable to launch KVM hypercall Compilation gcc guest call c o execute supercall2 Getting the output execute supercall2 3 What limitations are present in your implementation Where could your implementation use improvement Hardware Limitations caused kernel crash
View Full Document
Unlocking...