VM Configuration Templates

This is for discussing general topics about how to use VirtualBox.
Post Reply
bknonix
Posts: 10
Joined: 15. Jan 2011, 18:18
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: WinXP, Ubuntu

VM Configuration Templates

Post by bknonix »

Are the "default" settings for each OSTYPE stored anywhere that can be user edited?

I am building myself a script to create new VMs, call...
1. VBoxManage clonehd
2.. VBoxManage createvm
3. VBoxManage modifyvm
(lots of times - to get all the settings correct)...

But, what I would like is to change some of the defaults, like "no floppy disk", memory allocation, etc
HubTou
Posts: 93
Joined: 24. Nov 2009, 11:01
Primary OS: FreeBSD
VBox Version: OSE other
Guest OSses: FreeBSD, OpenSolaris, and several Linuxes

Re: VM Configuration Templates

Post by HubTou »

Hello,
bknonix wrote:Are the "default" settings for each OSTYPE stored anywhere that can be user edited?
To my knowledge :
  • there are no default settings per OSTYPE, but generic default settings
  • these default settings are documented in the user manual
  • some of them are available through "VBoxManage list systemproperties"
  • the list of OSTYPES is available through "VBoxManage list ostypes"
bknonix wrote:I am building myself a script to create new VMs, call... [...] But, what I would like is to change some of the defaults, like "no floppy disk", memory allocation, etc
I did something like that in vboxhost (http://www.projet-hev.org/dist/vboxhost.tar.bz2).

Have a look at:
  • ./Scripts/vboxhost.libsh for default configurations (in the register function)
  • ./vboxhost for the top level user command
  • ./ToutesLesVm/Modele.rc for a usage example (a template, in fact)
Best regards,

Hubert
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: VM Configuration Templates

Post by mpack »

HubTou wrote:there are no default settings per OSTYPE, but generic default settings
Au contraire. In fact the only reason you need to select an OS type at all is so VBox can choose an appropriate set of defaults for that OS. In the GUI you pick the OStype from a list. For the "createvm" command you use the --ostype switch. I doubt the defaults can be modified though, short of rebuilding the OSE code (i.e. I expect I'd find a table if I dug in the code long enough).
HubTou
Posts: 93
Joined: 24. Nov 2009, 11:01
Primary OS: FreeBSD
VBox Version: OSE other
Guest OSses: FreeBSD, OpenSolaris, and several Linuxes

Re: VM Configuration Templates

Post by HubTou »

Hello mpack,
mpack wrote:
HubTou wrote:there are no default settings per OSTYPE, but generic default settings
Au contraire. In fact the only reason you need to select an OS type at all is so VBox can choose an appropriate set of defaults for that OS [...] I doubt the defaults can be modified though, short of rebuilding the OSE code
You're right but we are not talking about the same "settings" :-)

I was taking "settings" literally as "things that you can set", for instance with "VboxManage modifyvm", as seems to be the case in dot 3 in the original email.

In this light, I don't think that the default values are OS dependent.

Best regards,

Hubert
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VM Configuration Templates

Post by Perryg »

From what I can see/tell setting the ostype primarily sets up the icon, suggested amount of minimal RAM, and the typical HDD controller. Since the controller is able to be over-written using VBoxManage as well as the amount of RAM, the only advantage that I can find is the GUI icon. Of course I could be missing something as the code that ostype is used against is all over the frontend, widgets, Etc.. but as far as I can tell the only advantage for the ostype is the icon.

I have setup a Windows guest using Linux as the ostype, changed all of the required fields and it worked as if I had selected Windows but with the Linux icon. Go figure!

But to answer the OP I don't know of any "templates" as such.
HubTou
Posts: 93
Joined: 24. Nov 2009, 11:01
Primary OS: FreeBSD
VBox Version: OSE other
Guest OSses: FreeBSD, OpenSolaris, and several Linuxes

Re: VM Configuration Templates

Post by HubTou »

Hello,

I recall reading somewhere that the OS type enabled some internal tweakings inside VirtualBox.

One example that springs to mind is for OS/2.

As the manual says:
Guest operating system (guest OS):  the operating system that is running inside the virtual
machine.   Theoretically, VirtualBox can run any x86 operating system (DOS, Windows,
OS/2, FreeBSD, OpenBSD), but to achieve near-native performance of the guest code on
your machine, we had to go through a lot of optimizations that are speci?c to certain
operating systems. So while your favorite operating system may run as a guest, we of?cially
support and optimize for a select few (which, however, include the most common ones).
Best regards,

Hubert
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VM Configuration Templates

Post by Perryg »

AFAIK This is referring to what guests will run the best in VirtualBox, not that the default settings have anything to do with it.
I am sure that there must be some other tweaks in the code depending on the ostype it is just that I have not found anything that I could not override.
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: VM Configuration Templates

Post by Leak »

Perryg wrote:AFAIK This is referring to what guests will run the best in VirtualBox, not that the default settings have anything to do with it.
I am sure that there must be some other tweaks in the code depending on the ostype it is just that I have not found anything that I could not override.
According to the docs (chapter 3.1.2, point 3) you have to select a 64-bit operating system type for your VM if you want to run a 64-bit guest on a 32-bit host, and there's no other setting you could tweak to get that same effect.

np: Isan - Waves (Blue Skied An' Clear (Disc 1))
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VM Configuration Templates

Post by Perryg »

VBoxManage sets that as well.
  • --hwvirtex on|off
Leak
Posts: 242
Joined: 31. Mar 2009, 13:00
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Debian Testing, Windows XP, Windows Server 2003/2008 R2

Re: VM Configuration Templates

Post by Leak »

Perryg wrote:VBoxManage sets that as well.
  • --hwvirtex on|off
I don't think that's the same - or why would 3.1.2 point 2 say

"you must enable hardware virtualization for the particular VM for which you want 64-bit support; software virtualization is not supported for 64-bit VMs."

immediately followed by point 3 saying

"If you want to use 64-bit guest support on a 32-bit host operating system, you must also select a 64-bit operating system for the particular VM. Since supporting 64 bits on 32-bit hosts incurs additional overhead, VirtualBox only enables this support upon explicit request."

if it all just hinged on turning on hardware virtualization, which point 2 would already accomplish?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: VM Configuration Templates

Post by Perryg »

I appreciate that you are reading the manual. It is really refreshing to see. But you have not gotten to the section that talks about creating the guest on a headless server that does not have a GUI. Trust me when I say that everything that can be done in the VirtualBox main GUI can be accomplished at the command line. Actually I know of a lot of things that can *only* be accomplished using the command line.
Post Reply