Adding a new guest os type using the APIs

Discussion about using the VirtualBox API, Tutorials, Samples.
Post Reply
JimBob227
Posts: 3
Joined: 17. Dec 2015, 20:49

Adding a new guest os type using the APIs

Post by JimBob227 »

This might be a basic question, but I can't seem to find documentation on it. If there is any out there please feel free to just direct me to it.

I currently know how to use the APIs to create a machine of guest os such as Ubuntu, Linux, etc. What I need to do now is make a new machine type for my own unique os.

I can see that for the current guest os types there are different values of the recommended properties (e.g. recommended ram). Is it as simple as creating a class somewhere for my new os with recommended parameters, or is it more complicated than I am thinking?
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Adding a new guest os type using the APIs

Post by noteirak »

You cannot do it via the API. To do it you need to edit VirtualBox source code, add a new type and compile.
Such task and related discussion are best located in the VirtualBox OSE subforum.

However from experience, I think you are confusion OS Type and configuration template.
Requiring a new OS Type means it is not related in any way to existing ones, a highly unlikely fact. The OS Type affects the internal workings of VirtualBox to optimize virtualization itself.
Configuration template is simply providing different values for the "recommendedXYZ" fields, which is most likely what you want.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
JimBob227
Posts: 3
Joined: 17. Dec 2015, 20:49

Re: Adding a new guest os type using the APIs

Post by JimBob227 »

How do I set a new configuration template?
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: Adding a new guest os type using the APIs

Post by socratis »

Source code again: https://www.virtualbox.org/browser/vbox ... Global.cpp You cannot set it on the fly AFAIK. But it wouldn't be such a bad idea...
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.
noteirak
Site Moderator
Posts: 5229
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Adding a new guest os type using the APIs

Post by noteirak »

JimBob227 wrote:How do I set a new configuration template?
You don't set one, you simply apply each specific setting like if it was a guest OS Type.
What you are looking for does not exist basically, you need to do it manually.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply