Learn virtualbox via source code

Discussions related to using the OSE version of VirtualBox.
Post Reply
white hat
Posts: 5
Joined: 6. Mar 2019, 10:52

Learn virtualbox via source code

Post by white hat »

Hi
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
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: read source code

Post 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.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Learn virtualbox via source code

Post by socratis »

If you manage to get the source code built, one of the "key" commands is

Code: Select all

kmk docs
There's a lot of reading there...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Yurii.Ch
Posts: 31
Joined: 16. Oct 2018, 08:47
Primary OS: Mac OS X other
VBox Version: OSE self-compiled
Guest OSses: Windows 7-10, Linux

Re: Learn virtualbox via source code

Post 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):
https://download.virtualbox.org/virtual ... 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.

Regards,
Yurii
Post Reply