Manually creating a virtual machine

From b0rken.org
Jump to: navigation, search

Contents


To manually create a virtual machine, create a new directory in one of your datastores, then create a new .vmx file inside that:

# cd /vmfs/volumes/datastore1
# mkdir testvm
# cd testvm
# vi testvm.vmx

Add the required configuration from the following:

Basic hardware

Virtual motherboard, CPU and RAM. No storage devices. VM will power up but won't boot any OS.

.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "8"
numvcpus = "2"
guestOS = "freebsd-64"
memsize = "2048"
displayname = "Test VM"

VNC console access

Enable VNC access to VM console:

remoteDisplay.vnc.enabled = "TRUE"
remoteDisplay.vnc.port = "5900"
remoteDisplay.vnc.keymap = "uk"

Virtual hard disk

Create a virtual disk file with:

# vmkfstools -c 20G -a ide testvm.vmdk

Then add the following to the vmx file:

ide0:0.present = "TRUE"
ide0:0.deviceType = "disk"
ide0:0.filename = "testvm.vmdk"

Virtual CD-ROM

Virtual CD-ROM drive mapped to an ISO image:

ide1:0.present = "TRUE"
ide1:0.deviceType = "cdrom-image"
ide1:0.filename = "/vmfs/volumes/datastore1/iso/FreeBSD-8.2-RELEASE-amd64-dvd1.iso"
ide1:0.startConnected = "TRUE"

Ethernet

Virtual Intel gigabit ethernet adapter:

ethernet0.present = "TRUE"
ethernet0.virtualDev = "e1000"
ethernet0.startConnected = "TRUE"
ethernet0.networkName = "VM Network"


Other

A virtual floppy drive is enabled by default. Add the following to remove it:

floppy0.present = "FALSE"
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox