Sunday, March 4, 2012

Virtual Machine

A virtual machine is a set of hardware on which a supported guest oprating system and its applications run. The virtual machine is a set of discrete files. The virtual machine's configuration file describes the virtual machine's configuration , which includes the virtual hardware, such as CPU, memory, disk, network interface, Optical Drive and floppy drives etc. While naming virtual machine avoid use of special characters including spaces etc.

Files that make up a Virtual Machine

The table lists the files that make upa VM. Except for the log files, the name of each file starts with the VM's name . A virtual machine consists of the following files



  • Configuration file (.vmx)


  • One or more virtual disk files. The first virtual disk has files .vmdk and -flat.vmdk.


  • A file contiaining the VM's BIOS (.nvram).


  • A VM log file (.log) and a set of files used to archive old log entries (-#.log). Six of these files are maintained at any one time.


  • A swap file (.vswp).


  • A snapshot description file (.vmsd). This file is empty if the virtual machine has no snapshots.

If the virtual machine is converted to a template, a virtual machine template configuration file (.vmtx) replaces the virtual machine configuration file (.vmx).


If the virtual machine has more than on disk file, the file pair for the second disk file and later is named (VM_name>_#.vmdk and (VM_name>_#-flat.vmdk, where # is the next number in the sequence, starting with 1.


Six of the archive log files are maintained at any one time. e.g. -1.log to -6.log might exist at first. The next time an archive log file is created e.g. when the virtual machine is powered off and powered back on -2.log to -7.log are maintained (-1.log is deleted), then -3.log to -8.log and so on.


A VM can have other files e.g. if one or more snapshots were taken or if raw device mappings were added. A VM will have an additional lock file if it resides on an NFS datastore. A VM will have a change tracking file if it is backed up with the VMware data recovery appliance.


The configuration files of a VM can be displayed by going to Configuration > Datastore; right click datastore and browse. The another option to VM configuration files is by going to Configuration > Datastore > View and select 'Show All Virtual Mahine Files'


Virtual Machine Hardware


A VM uses virtual hardware. Each guest OS sees ordinary hardware devices. It does not know that these devices are virtual. All virtual machines have uniform hardware (except for a few variations that the system Administrator can apply). Uniform hardware makes virtual machines portable across VMware virtualization platforms. We can add and configure VM's CPU, Memory, HDD, CD/DVD, Floppy, SCSI devices etc. But we can't add video devices, but can configure existing video devices. A USB connected to physical host can be made available to one VM at a time. To make it available to another VM it should first be disconnected from existing VM.



CPU and Memory: VMware Virtual SMP allows you to take advantage of configuring a VM with upto 8 vCPU and Memory upto 255 gb.


Virtual Disk: The VM should have atleast one virtual disk. Adding the first virtual disk implicitly adds a virtual SCSI adapter for it to be connected. The ESX/ESXi host offers a choice of adapters: BusLogic Parallel, LSI Login Parallel, LSUI Logic SAS, and VMware Paravirtual. The VM creation wizrd in the vSphere client selects the type of virtual SCSI adapter, based on the choice of guest OS. By default Virtual disk is thick provisioned but this can be changed to thin-provisioned disk if needed. There is special disk mode call independent. The independent mode has two options: persistent and non-persistnet. If we want changes to disk written immediately and permanently then persistent is chosen. Non-persistnent option is chosen to discard changes when the VM is powered off or reverted to a snapshot. In most cases there is no need to change the disk mode for virtual disks.


vNetwork Interface Card: The network cards available for Virtual machine are Flexible (vlance & vmxnet), e100, vmxnet2 (enhanced vmxnet) and vmxnet3.


Other Devices: A VM can have CD/DVD drive or Floppy drive on the physical host. The CD-ROM, DVD drives either connect to physical drive or to an ISO file. We can also add generic SCSI devices, such as tape libraries to VM. These devices can be connected to the virtual SCSI adapters on a VM.


Virtual Machine Console: From console we can send power changes to a VM. The VM's guest OS can be accessed from it. The Ctr+Alt+Del is sent from console. If VM tolls are not installed then to release pointer VM's Console Ctr+Alt.

No comments:

Post a Comment