Page 1 of 1

Learn virtualbox via source code

PostPosted: 13. Mar 2019, 19:24
by white hat
I want to learn about virtual box by reading its source code, Purpose to increase the level of C ++ programming. But the source code of virtualbox is too big, there are too many files. So I don't know where to start reading from. Can you guide the reading process so that it is easy to understand?
Thank you

Re: read source code

PostPosted: 13. Mar 2019, 19:27
by mpack
Are you asking that someone writes you a guide to the source code? I wouldn't hold my breath waiting for that to happen!

Besides, working out the structure of the build folders is part of the learning process. And I dare say that even some of the devs don't know what's in every nook and cranny. Look for comments in the source code and header files for clues as to what purpose each module serves, I think that's the only guidance you're going to get, that and the folder names which I think are quite easy to understand.

If you don't understand C++ then perhaps you'd do better to start with a smaller project first - Github should be bursting at the seams with suitable small projects that would interest you.

Re: Learn virtualbox via source code

PostPosted: 14. Mar 2019, 16:57
by socratis
If you manage to get the source code built, one of the "key" commands is
Code: Select all   Expand viewCollapse view
kmk docs

There's a lot of reading there...

Re: Learn virtualbox via source code

PostPosted: 15. Mar 2019, 08:17
by Yurii.Ch
I will also add to Socratis answer, surprisingly a lot of information about the project structure could be found in Virtualbox User Guide, which you can download by the link (current version 6.0.4): ... Manual.pdf

I'm talking about the Chapter 10, Technical Background, and especially 10.2, Oracle VM VirtualBox Executables and Components.
You can find there list of the product components, and then find it in the source tree by simple text search, because Virtualbox source code at least structured very well. You also can find a lot about components and code structure from the Makefile.kmk, located in the project root directory.

You can read just Chapter 10, however, if you're going to contribute into Virtualbox OSE, or use it as a part of your opensource solution, you'd better read all the User Guide, it has tons of useful information about Virtualbox and virtualization technology itself.

If you're interested in contributing to the project, you can contact me personally, I have some experience in using it and our team has open positions for people with Virtualbox contributing experience.