Week 4 and 5 in CNCF

Hey everyone, so finally I began coding for my project last week. Last wednesday was the first time I spoke in the Kubevirt community meeting and it was a wonderful feeling when a lot of people were discussing about my project and also I had many people reviewing my proposal.

So the next step was then to start coding. As discussed in the last meeting my mentors asked me to start writing the tests first, as the actual API design may change after the review process. I started studying about how VM’s are created and how the yaml file gets converted to Libvirt XML. I looked at some code files and functions and searched for PRs which adds API features and finally concluded that I would start writing my code from the converter file which handles all the logic behind converting the vmi json to Libvirt XML. I then added the tests for the same and filed my first PR(well it was a draft one) for the same.

But after that I again had almost like no idea on what to do next and how to proceed. After discussing with mentors, we decided that I would study the lifecycle of VM and how different components come together to make create a VM. So it was again the time of brainstorming and I studied a lot about virt-launcher. So it is the virt-launcher which creates the virtual machine. The virt-launcher gets a VMI defination as a custom resource definition object inside the Kubernetes API server. Virt-launcher then uses a local libvirtd instance within its container to start the VMI. From there virt-launcher monitors the VMI process and terminates once the VMI has exited. I also studied about some validating-webhooks and some tools which helps in creation of VM. I added some more lines of code and the result was this:

A successful VMI creation?

Whao…the kernel-boot vm got created…

I then tried to access the VM through vnc as mentioned here but with no luck..and soon I realized that the vm creation had failed.

Now I still need to figure out how this happened and where can we find the logs for the same. Also there’s a concept of containerDisk in VMs which I am not able to understand clearly till now. So next up would take out time on brainstorming about this and also about the causes of the kernel-boot vm failing.

A lot more to do and learn...isn't it? Have a good day then and I am now going to try to debug this. Oh, Debugging isn't that bad.. :P