VMware ESX is an enterprise-level computer virtualization tool.
It is a component of VMware's larger offering, VMware Infrastructure, which adds management and reliability services to the core server product.
It is recommended to migrate from earlier ESX architecture to the newer ESXi.
It runs on host server hardware without an underlying operating system.
ESX is apparently derived from "Elastic Sky X", which is not mentioned by VMware. See wikipedia.
VMware ESXi is a smaller footprint version of ESX that does not include the ESX Service Console. It is available without the need to purchase a vCenter license as a free download from VMware with some features disabled.
ESX runs on bare metal, without running an operating system, unlike other VMware products. It includes its own kernel; a Linux kernel is started first, and is then used to load a variety of specialized virtualization components, including VMware's vmkernel component.
Since running on bare metal, it is type I hypervisor.
Thus, at normal run-time, the vmkernel is running on the bare computer and the Linux-based service console runs as the first virtual machine. VMWare dropped development of ESX at version 4.1, and uses ESXi, which does not include a Linux kernel.
ESX uses a Linux kernel to load additional code: often referred to by VMware, Inc. as the "vmkernel".
vSphere Client (formerly VMware Infrastructure Client), enables monitoring and management of a single instance of ESX or ESXi server. After ESX 4.1, vSphere Client was no longer available from the ESX/ESXi server, but must be downloaded from the VMware web site.
A hypervisor or virtual machine monitor (VMM) is a piece of computer software, firmware or hardware that creates and runs virtual machines.
A computer on which a hypervisor is running one or more virtual machines is defined as a host machine. Each virtual machine is called a guest machine.
VMware VMotion enables the live migration of running virtual machines from one physical server to another with zero downtime, continuous service availability, and complete transaction integrity. It is transparent to users.
In a nutshell, this all related to how the VMDK behaves when a virtual machine snapshot is taken. VMDKs, by default, are said to be dependent. In other words, when the virtual machine is snapshot’ed, this disk is included in the snapshot.
You can think of Independent as meaning ‘Independent of snapshots’.
Independent Persistent Mode
No delta file is associated with this disk during a snapshot operation. In another words, snapshot has no effect on disks in Independent Persistent Mode.
All changes to the disk are preserved when the snapshot is deleted.
Independent Non-persistent Mode
A redo log is created to capture all subsequent writes to that disk. However, if the snapshot is deleted, or the virtual machine is powered off, the changes captured in that redo log are discarded for that Independent Non-persistent VMDK.
Let’s take a virtual machine which hosts a web service, but it is primarily a read-only web site with content that rarely changes. This VM has three disks. Disk 1 contains the Guest OS and web application (e.g. Apache). Disk 2 contains the web pages for the web site. Disk 3 contains all the logging activity.
A monolithic disk: a virtual machine disk contained in a single file.
A split disk: a virtual machine disk split into 2GB files.
Disadvantages of monolithic disks:
If you delete snapshots and need to consolidate unused .vmdk files, if you need to defragment .vmdk files, etc., then your host needs as much free space as the entire .vmdk file. In contrast, if you use split disks, then your host needs only as much free space as one of the individual .vmdk extents.
If you want to copy or back up a VM, you might be copying it to a file system that doesn't support such large files.
If you're in the middle of copying or backing up a VM but need to cancel the operation and to resume it later, using split disks is much less painful.
Advantages of monolithic disks:
Less file system clutter (and in that sense it's easier to manage).
The VM will require fewer open file handles. Some host operating systems have a somewhat low limit on the maximum number of open file handles, and this can matter if you take a lot of snapshots.
kb.vmware.com: convert a monolithic disk to sparse disks. To change from a monolithic disk to a split disk, you must copy the virtual disk data from the monolithic disk to a new split disk. After copying the data, you must then associate the virtual machine with the new split disk. You may then delete the old monolithic disk.
Thin. VMDKs only consume blocks when data is written to disk from within the VM/Guest OS. The amount of actual space consumed by the VMDK starts out small, but grows in size as the Guest OS commits more I/O to disk, up to a maximum size set at VMDK creation time.
Thick (aka LazyZeroedThick). These disks reserve space on the VMFS filesystem but there is an interesting caveat. Although they are called thick disks, they behave similar to thinly provisioned disks. Disk blocks are only used on the back-end (array) when they get written to inside in the VM/Guest OS.
EagerZeroedThick. These virtual disks reserve space on the VMFS filesystem and zero out the disk blocks at creation time.
Size: 4294967296 Blocks: 3502080 IO Block: 131072 regular file
Device: c2b73def5e83e851h/14030751262388250705d Inode: 163613572 Links: 1
Access: (0600/-rw——-) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-02-29 13:04:53.000000000
Modify: 2012-03-01 15:29:11.000000000
Change: 2012-02-22 00:12:40.000000000
# This is a thinly provisioned 200GB VMDK (4294967296 * 512) but only ~ 1.8 GB (3502080 * 512) used.
Run a disk defragmentation utility inside the virtual machine (guest OS).
Power off the virtual machine, then defragment its virtual disks from the virtual machine settings editor (VM - Settings). Select the virtual disk you want to defragment, then click Defragment. Note: This capability works only with virtual disks, not physical or plain disks.
Run a disk defragmentation utility on the host computer.
Large single virtual disk file has a problem in defragmentation. The defragmentation process requires free working space on the host computer's disk. If your virtual disk is contained in a single file, for example, you need free space equal to the size of the virtual disk file.
Host disks, virtual disks and guest disks all affect the performance of VMware Workstation.
It is strongly recommended that you defragment using a guest operating system mechanism before taking the first snapshot (or linked clone):
Workstation makes all its changes to the redo log, not to the original disk, when you run a defragmenting program on the guest after a snapshot. You lose the ability to defragment inside the original disk forever.
Every sector that moves is copied to the redo log, making the virtual machine redo log extremely large when the disk is heavily fragmented and you run defragmentation after a snapshot.
Performance Impact of Defragmenting Snapshots and Linked Clones
There may be a performance impact when you defragment a linked clone or a virtual machine with a snapshot. Exact performance degradation depends on:
The fragmentation of the parent virtual machine disk when you created the snapshot or linked clone.
The nature of the subsequent updates to the parent virtual machine disk.
Defragmentation tends to make the redo file grow. The redo file itself can become defragmented with respect to the host file system. If your use of virtual machines is strongly performance oriented, you should avoid defragmenting - or using - linked clones and snapshots.
Is is possible to create shared VMDK for two VMs? Simply put, yes it is but not recommended (even dangerous to data!).
Now what you have to consider is that there is no magic here, it literally is the same as a physical environment. The same as attaching a single SCSI disk to two hosts. We used to do this decades ago, but it comes with risks.
Just like any shared block storage, you need a clustered file system to handle the access. So you can't just take NTFS and attach it to two hosts at once. And even if you have a clustered filesystem, you can't share a SQL database between two systems just by attaching it to them.
What's dangerous? shared disk in general or to use it with SQL? Both. NTFS can't be shared. It is not a clustered file system. SQL on a clustered file system can't just be shared either. Just because a filesystem is clustered doesn't mean that a database file is. You need both a clustered file system and then you need your application (SQL Server in this case) to be clustered too.
The time synchronization checkbox controls only whether time is periodically resynchronized while the virtual machine is running. Even if this box is unselected, by default VMware Tools synchronizes the virtual machine's time after a few specific events that are likely to leave the time incorrect.
For VM ESXI, edit /vmfs/volumes/datastore_name/vm_name/vm_name.vmx. Set these options to zero. If the entries do not exist, add them.
Note: In GSX, VMware Fusion, VMware Player and VMware Workstation, you must use "FALSE" instead of "0".
vmnet0, vmnet1, vmnet8
These are VMware virtual network interfaces on the local machine when running VMware Workstation or VMware Fusion.
vmnet1 is for host-only communication and vmnet8 for Nat the physical network. quora.com.
The Bridged network adapter is known as vmnet0. In Fusion 3.x and later, it uses the vmnet-bridge and vmnet-netifup services.
The Host-only network adapter is known as vmnet1. In Fusion 3.x and later, it uses the vmnet-dhcpd service.
The NAT network adapter is known as vmnet8. In Fusion 3.x and later, it uses the vmnet-natd, vmnet-dhcpd, and vmnet-netifup services.
When usingF5 Big-IP Edge Client, it hijacks all your routings and you can't SSH into your guest VM anymore. The only way to access your VM is to configure port forwarding in VMWare Network Configurations and ssh to localhost.
---------- Change NAT configure file.
sudo vi /Library/Preferences/VMware\ Fusion/vmnet2/nat.conf
-- find [incomingtcp] part
# Use these with care — anyone can enter into your VM through these…
# The format and example are as follows:
#<external port number> = <VM’s IP address>:<VM’s port number>
#8080 = 172.16.3.128:80
# It means we map virtual machine 80 port to host machine 8080 port.
-- Restart network service of VMware Fusion.
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --stop
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli --start
Note: The config files you changed will be reset after VMWare Fusion upgrade, please backup it at some where.
Taking a snapshot saves the current state of the virtual machine, so you can return to it at any time. Snapshots are useful when you need to revert a virtual machine repeatedly to the same state, but you don't want to create multiple virtual machines.
If you simply want to save the current state of your virtual machine temporarily, so you can continue work later from the same state, use Suspend and Resume.
To take snapshots of multiple virtual machines — for example, taking snapshots for all members of a team — requires that you take a separate a snapshot of each team member.
netappKB: SCSI reservation. SCSI reservations are used to control access to a shared SCSI device such as a disk or tape drive. An initiator sets a reservation on a Logical Unit Number (LUN) in order to prevent another initiator from making changes to the LUN. This is similar to the file-locking concept.
When a snapshot is created, it is comprised of these files:
"vm"-"number".vmdk and "vm"-"number"-delta.vmdk
A collection of .vmdk and -delta.vmdk files for each virtual disk is connected to the virtual machine at the time of the snapshot. These files can be referred to as child disks, redo logs, or delta links. These child disks can later be considered parent disks for future child disks. From the original parent disk, each child constitutes a redo log pointing back from the present state of the virtual disk, one step at a time, to the original.
Note: The "number" value may not be consistent across all child disks from the same snapshot. The file names are chosen based on filename availability. If the virtual disk is larger than 2TB in size, the redo log file is of "vm"-"number"-sesparse.vmdk format.
The .vmsd file is a database of the virtual machine's snapshot information and the primary source of information for the Snapshot Manager. The file contains line entries which define the relationships between snapshots as well as the child disks for each snapshot.
The .vmsn file includes the current configuration and optionally the active state of the virtual machine. Capturing the memory state of the virtual machine lets you revert to a turned on virtual machine state. With nonmemory snapshots, you can only revert to a turned off virtual machine state. Memory snapshots take longer to create than nonmemory snapshots.
A clone is a copy of an existing virtual machine. The existing virtual machine is called the parent of the clone. When the cloning operation is complete, the clone is a separate virtual machine.
Why Make a Clone?
Installing a guest operating system and applications can be time consuming. With clones, you can make many copies of a virtual machine from a single installation and configuration process.
Clones are useful when you must deploy many identical virtual machines to a group.
Full clones vs Linked clones
A full clone is an independent virtual machine, with no need to access the parent. Because a full clone does not share virtual disks with the parent virtual machine, full clones generally perform better than linked clones. However, full clones take longer to create than linked clones.
A linked clone is made from a snapshot of the parent. Ongoing changes to the virtual disk of the parent do not affect the linked clone, and changes to the disk of the linked clone do not affect the parent.
A linked clone must have access to the parent. Without access to the parent, a linked clone is disabled.
Linked clones are created swiftly, so you can easily create a unique virtual machine for each task you have.
You can also easily share a virtual machine with other users by storing the virtual machine on your local network, where other users can quickly make a linked clone. This facilitates collaboration: for example, a support team can reproduce a bug in a virtual machine, and an engineer can quickly make a linked clone of that virtual machine to work on the bug.
Un-cloning linked cloned VM
wcfNote: my method, in linked cloned VM, make a full clone, then remove the linked clone.