2008-09-21

VMX-CONFIG File explained

A very short vmx-file only needs 3 lines - I call them the identity-lines. This minimal vmx is enough to start a VM. It is the equivalent of starting a legacy-real-metal box with nothing more than the main-board with 32MB RAM and one CPU plugged in.



guestOS = "winxppro"
config.version = "8"
virtualHW.version = "4"

The version above can be used for VMplayer, Workstation 5.5 and VMserver.
For ESX 2.5 or WS 4.5 you need something like

guestOS = "winxppro"
config.version = "6"
virtualHW.version = "3"

It doesn't matter wether you use upper or lower cases - but always make sure to use " " for values.

If you forget one of this critical parameters or misconfigure it the VM will not start and give an error-message.



guestOS = "dos 397"

causes error-message

Guest operating system `dos 397' is not supported.
Please select a guest operating system from the General page on the Options tab of Virtual Machine Settings.



Autogenerated Identity-lines



Once you start such a minimal VM VMware generates another two lines to identify the virtual machine. Whenever you change the path to the vmx-file - either by renaming or moving to a different path VMware wants to update this lines.


uuid.location = "56 4d ee 3c 52 06 a3 de-be 4a 73 9c cc 99 15 1f"
uuid.bios = "56 4d ee 3c 52 06 a3 de-be 4a 73 9c cc 99 15 1f"


Memory



You can change the amount of RAM that a VM will use like this

memsize = "128"



If you don't assign a value for memory VMware will use the default-setting which is 32MB

memsize = "32"





Whenever you assign RAM manually make sure the value is a multiple of 4 - otherwise the VM will not start:

memsize = "255"

causes this error-message:

Memory size 255 not a multiple of 4
Displayname



You can assign a displayname for your virtual machine by adding

displayName = "VMX-Test"



If you don't assign a nicname VMware will autogenerate one- useing the path and name of the vmx-file

displayName = "X:\home\moon\Desktop\vmx.sammler\minimal.vmx"




PCI-slots



Lets populate the PCI-slots.

A VM has 6 PCI-slots.

The first slot is always used by the VMware-SVGA II.
You can fill the next 5 slots with these devices:


Buslogic-SCSI-controller

LSI-logic-SCSI-controller

AMD-ethernet
VMX-ethernet
e1000-ethernet
Soundcard


To add one of max. 4 Buslogic-SCSI-controllers add this lines:

scsi0.present = "TRUE"

scsi0.virtualDev = "buslogic" "vmxbuslogic" for ESX



To add one of max. 4 LSIlogic-SCSI-controllers add this lines:

scsi0.present = "TRUE"

scsi0.virtualDev = "lsilogic" "vmxlsilogic" for ESX



To add one of max. 4 AMD-ethernet-cards add this lines:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "vlance"



To add one of max. 4 VMXnet-ethernet-cards add this lines:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "vmxnet"





To add one of max. 4 e1000-ethernet-cards add this lines:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "e1000"




To add a soundcard - either a Soundblaster or a ES1371 - add this lines:

sound.present = "TRUE"
sound.virtualDev= "sb16"

or

sound.present = "TRUE"
sound.virtualDev= "es1371"



What happens if I add more than 5 PCI-devices?
In case you order
scsi0.present = "TRUE"
scsi1.present = "TRUE"
scsi2.present = "TRUE"
scsi3.present = "TRUE"
ethernet0.present = "TRUE"
ethernet1.present = "TRUE"
ethernet2.present = "TRUE"
ethernet3.present = "TRUE"
sound.present = "TRUE"

you will get

scsi0.present = "TRUE"
scsi1.present = "TRUE"
scsi2.present = "TRUE"
scsi3.present = "TRUE"
ethernet0.present = "TRUE"

The free 5 PCI-slots are assigned following this priority-list:

1. Buslogic-SCSI-controller

2. LSI-logic-SCSI-controller

3. AMD-ethernet
4. VMX-ethernet
5. e1000-ethernet
6. Soundcard


In case you don't get the results you expect, please keep in mind that sometimes VMware uses silent-defaults.
If you order
ethernet0.present = "TRUE"
ethernet1.present = "TRUE"
ethernet2.present = "TRUE"
ethernet3.present = "TRUE"
sound.present = "TRUE"

you will get

scsi0.present = "TRUE"
ethernet0.present = "TRUE"
ethernet1.present = "TRUE"
ethernet2.present = "TRUE"
ethernet3.present = "TRUE"

The reason for this strange behaviour is simple: VMware assumes

scsi0.present = "TRUE"

for every VM. If you want no SCSI-controller you have to specify

scsi0.present = "FALSE"

Don't worry - the list with exceptions from the rule like is short.


IDE



A VMware-computer has the usual primary and secondary IDE-ports. To enable the primary port use this liine:

ide0.present = "TRUE"



To enable the secondary port use:

ide1.present = "TRUE


Actually IDE-ports are another example for silent defaults. This means you don't need to do anything if you want to use both ports.


Ports



To add one of max. 3 parallel ports add this line:

parallel0.present = "TRUE"



To add one of max. 4 serial ports add this line:

serial0.present = "TRUE"


To add 2 USB-ports (useing USB 1.1) add this line:

usb.present = "TRUE"






Syntax



You can use # for comments.
The sequence of line doesn't matter.
Parameters with *.present work like a main-switch.
If parameter scsi0.present is activated every parameter in the sub-category is used. So if you have

scsi0.present = "TRUE"

then lines like

scsi0.virtualDev = "lsilogic"

are used.
If you have

scsi0.present ="FALSE"

all lines starting with scsi0 are ignored.


ESX Server, by default, doesn?t allow NICs in guest operating systems to be in promiscuous mode.

The fix is this:

PromiscuousAllowed yes

Replace ?vmnic0? in this command with whatever virtual switch or NIC team the virtual machine in question is using.


What happens if you use unknown or mis-spelled lines? A line like
zoo.number_of_elefants = "387"

causes an error-message and VMware-player will not start - this doesn't mean that there are no VMversions that count the number of elefants. Maybe a future version will ignore this line or even use it. So don't count on it. Better go with the rule:

Unknown or mis-spelled lines are ignored or give error-messages.

No comments: