Discussion:
[vbox-dev] Usage of GuestOSType
Karoline Haus
2014-06-02 12:24:19 UTC
Permalink
Hi, can anyone explain how to properly use the GuestOSType property of the IMachine interface?

I'm using the Python2 API and I'm trying to configure my VM as either Windows XP, Windows 7 or Linux, and I don't quite understand how to go about this. I seem to only be able to set the string OSTypeId on the IMachine interface, but what kind of string is that supposed to be, and how to I check whether or not my VBox implementation supports that GuestOSType?


Anyone got a good idea on how to use this capability? Basically what I want to do is configure network adapter, audio controller, and so on, depending on the OS the user has installed inside the VM, as otherwise the user might have trouble with the virtual hardware configured.
Is using this property the right way of doing things?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20140602/59b7b48a/attachment.html
Frank Mehnert
2014-06-02 13:23:22 UTC
Permalink
Hi Karoline,
Post by Karoline Haus
Hi, can anyone explain how to properly use the GuestOSType property of the
IMachine interface?
The GuestOSType can be specified when a VM is created and it can be modified
as part of the VM settings. This property is used to change certain default
parameters for the VM but only a few parameters like IOAPIC enabled. The
majority of parameters is initialized by the frontend when the VM is
created. The property can also be changed for an existing VM but in that
case no other setting is changed.
Post by Karoline Haus
I'm using the Python2 API and I'm trying to configure my VM as either
Windows XP, Windows 7 or Linux, and I don't quite understand how to go
about this. I seem to only be able to set the string OSTypeId on the
IMachine interface, but what kind of string is that supposed to be, and how
to I check whether or not my VBox implementation supports that GuestOSType?
The available OS types can be listed with 'VBoxManage list ostypes'. They are
named like this: 'Ubuntu_64'.
Post by Karoline Haus
Anyone got a good idea on how to use this capability? Basically what I want
to do is configure network adapter, audio controller, and so on, depending
on the OS the user has installed inside the VM, as otherwise the user might
have trouble with the virtual hardware configured. Is using this property
the right way of doing things?
The GuestOSTYpe provides a number of getter methods like recommendedRAM,
is64Bit and so on. 'VBoxManage list ostypes' shows a few of these properties,
the Qt GUI makes heavy use of these properties, see

src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

Hope that helps,

Frank
--
Dr.-Ing. Frank Mehnert | Software Development Director, VirtualBox
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt, Germany

Hauptverwaltung: Riesstr. 25, D-80992 M?nchen
Registergericht: Amtsgericht M?nchen, HRA 95603
Gesch?ftsf?hrer: J?rgen Kunz

Komplement?rin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Gesch?ftsf?hrer: Alexander van der Ven, Astrid Kepper, Val Maher
Loading...