Introduction to VMware vsphere virtual machine files

Source: Internet
Author: User
Tags file system root directory myvm

What are the files that make up the virtual machines in the VMware vsphere virtualization platform? What is the meaning of composing a file separately? What are the areas of attention when excluded?

There is a virtualization expert Eric Siebert's article, introduced the virtual machine file composition, write very detailed, although ESXi has upgraded several versions, but still use, here reference the following figure, at the same time I take vcenter products as an example of the corresponding instructions. (Black for original, blue for description)

If you use a file browser built in VI client such as WINSCP or Datastore browser to view the root directory of the virtual machine on the ESX host, you will see a list of files associated with the virtual machine. Most files start with the real name of the virtual machine, and there are different file extensions based on the type of file. You cannot see all the possible file types unless your virtual machine is in a certain state. For example, only the. vswp file appears when the virtual machine is turned on, and only the. vmss file appears when the virtual machine is paused.

The small file ". nvram files" includes the Phoenix BIOS, which is part of the virtual machine boot process. It is similar to a physical server that has a BIOS chip and is able to set hardware configuration options. A virtual machine should also have a virtual BIOS in the NVRAM file. When the virtual machine first starts, press the F2 key to access the BIOS. No matter what happens to the virtual machine's hard disk configuration, it will be saved in the NVRAM file. This file is binary and, if deleted, will be recreated automatically when the virtual machine is started.

(If you install a Mac OS virtual machine, one step is to replace the virtual machine's NVRAM file.) )

The file ". vmx file" includes all configuration information and hardware settings for the virtual machine. No matter what kind of edits you make to the virtual machine settings, all the information is stored in the file in text form. This file includes a variety of information about virtual machines, such as special hardware configurations (such as RAM size, network interface card information, hard drive information and serial and parallel information), Advanced energy and resource settings, VMware Tool options, and energy management options. Although you can edit this file directly to modify the virtual machine configuration, you are not recommended to do so unless you know what you want to do. If you are editing this file directly, it is best to back up the file first.

(in the previous version of ESXi5.0, individuals feel that the VMware vcenter Management Cloud Platform environment, in the frequent shutdown of virtual machines, often to take snapshots of virtual machines, and other operations under the influence of the virtual machine is very likely to be unable to open, edit and manage, then the following operations may help you.)

Select the virtual machine in the Vcenter list of managed items, right-click to select from < remove from the list, and then enter the host file for the virtual machine in Datastore, right-click the Vmx file, select < add to the list, and then see if you can operate on the virtual machine. )

All virtual disks in the VMDK file are made up of two files. A large data file and a small text disk description file that is equal to the size of the virtual disk, which describes the size and shape of the virtual disk file, also points to large data files, as well as the virtual disk-drive sector, the number of heads, The number of cylinders and information about the disk adapter. In most cases, these files have the same name as their associated data files (such as MYVM_1.VMDK and MYVM_1-FLAT.VMDK). You can match a descriptive file with a data file by checking the extent description area in the file.

(When you fail to open the virtual machine, with the vmdk file, when you connect to the vcenter, you can create a new virtual machine in the steps of the link on the VMDK, you can try to make the virtual machine normal. )

Three different types of virtual disk data files can be used in the following virtual machines:

· –FLAT.VMDK file: This is a large default virtual disk data file, created when you add a virtual hard drive to a virtual machine, not a RDM. When you use a thick disk, the size of the file is the size you specify when you create a virtual hard drive.

· –DELTA.VMDK files: These virtual disk data files are used only when creating virtual machine snapshots. When a snapshot is created, all writes to the original FLAT.VMDK are stopped and become read-only, and then these changes to the virtual disk are written to the delta file. The initial size of these files is 16MB, and then grows at 16MB with the need for changes to the virtual machine virtual disk. Because these files are bitmaps for changes made by the virtual disk, a single DELTA.VMDK file cannot exceed the size of the original FLAT.VMDK file. Each create a snapshot of the virtual machine generates a delta file, and their filenames are incremented by numbers (such as MYVM-000001-DELTA.VMDK and MYVM-000002-DELTA.VMDK). These files are automatically deleted when the snapshot is merged into the original –FLAT.VMDK file and then deleted.

· -RDM.VMDK file: This is a RDM mapping file that is used to manage mapping information for RDM devices. The mapping file is presented to the ESX host as a generic disk file and can be used for general file system operations. However, for virtual machines, the storage virtualization layer renders the mapping device as a virtual SCSI device. The metadata for the mapping file includes the location of the mapped device (name resolution) and the lock state of the mapping device. If you make a list of directories, you can see that the files are using the same size as the actual LUNs they mapped in the VMFS, but in fact they are only presented in such a way that they are actually very small. Each creation of a RDM on the virtual machine generates a-RDM.VMDK file.

". vswp file" When the virtual machine is started, a memory exchange file is created to replace the physical host memory if the ESX host consumes its physical memory because of excessive use. The size of these files is equal to the amount of memory allocated to the virtual machine, minus any memory reserve (default is 0), for example, 4GB virtual machine reserved 1GB, will create 3GB interchange file. These files are typically created in a virtual machine, but are used only if the host is running out of all physical memory. Because the virtual machine memory reads or writes to the disk does not have the physical host Ram fast, if the virtual machine starts to use this file, the performance can reduce. These files consume very large disk space on the VMFS volume, so make sure there is enough free space, because the virtual machine will not start if there is not enough space to create the file. These files are deleted when the virtual machine is turned off or paused.

The. VMSs file is used when the virtual machine is paused to save the contents of the virtual machine so that it can continue to run when it restarts. The size of this file is the same size as the RAM assigned to the virtual machine. When the virtual machine is run again, the contents of this file are written back to the host server's physical memory, but this file is not automatically deleted unless the virtual machine is shut down (the operating system reboots). When the virtual machine pauses again, the file will be reused without deleting and recreating if the previous paused file exists. When the virtual machine is paused, the file is deleted, and the VM starts normally, not from the paused state.

The. vmsd file is used with snapshots to store information about each snapshot of the metadata and other activities in the virtual machine. The initial size of this text file before the snapshot is created is 0 bytes, and the information is updated each time a snapshot is created or deleted. There is only one file in these existing files, regardless of the number of snapshots running, because all information is updated in this single file. The snapshot information in this file consists of the name of the VMDK and the Vmsn file, display name and description used for each snapshot, and the user ID of the snapshot. Once all the snapshots have been removed, the file retains the old snapshot information, but it does hate the snapshot uid used by the new snapshot. It also renames the first snapshot as "consolidate Helper", assuming it is used to consolidate the backup.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.