In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to restore the vmdk file of the ESXI virtual machine". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to restore the vmdk file of the ESXI virtual machine".
Error description
On vSphere, the vmdk virtual disk file could not be found when the virtual server was restarted
Cause analysis
Looking at the summary information of this virtual server and comparing with other virtual machines available on datastore, it is found that a vmdk disk file is indeed missing on the damaged server, but you can see a 50G xxx-flat.vmdk file, while the normal server has only xxx.vmdk and no xxx-flat.vmdk, both files exist after shutdown, and the real disk capacity has been transferred from vmdk to xxx-flat.vmdk.
When the virtual host is running, it is actually using xxx-flat.vmdk, but the xxx.vmdk can be deleted at the same time, which leads to the problem.
It is important to note that each disk drive of the virtual machine contains a pair of .vmdk files. One is a text file that contains descriptive data about the virtual hard disk; the other is the actual content of the disk. For example, a virtual machine named examplevm is connected to a hard disk. The disk consists of the following two files: an examplevm.vmdk description file smaller than 1KB and a 10GB-sized examplevm- flat.vmdk plane (data) file, which contains the actual data of the virtual machine, which is stored on the physical disk in binary form. The examplevm.vmdk description file describes this mapping relationship. .
Solution.
\ 1) Log in to the vsphere host with ssh, find the location and directory of the xxx-flat.vmdk file, and record the size of the file
~ # find /-name "New Virtual Machine-flat.vmdk" / vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine / New Virtual Machine-flat.vmdk~ # ls-l / vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine / New Virtual Machine-flat.vmdk-rw- 1 root root 53687091200 Apr 16 09:13 / vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine / New Virtual Machine-flat.vmdk
Note that ESXi5 does not enable ssh by default. You need to log in to the server through vsphere client and manually enable it by * * configuration * *-> * * Security profile * *-> * * Service-Properties * *.
\ 2) rename xxx-flat.vmdk file
~ # cd / vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine / / vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine _ 1 # mv New Virtual Machine-flat.vmdk tmp_ New Virtual Machine-flat.vmdk/vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine # ls-ladrwxr-xr-x 1 root root 1680 Apr 21 05:47. Drwxr-xr-t 1 root root 2660 Apr 18 03:16.-rw-r--r-- 1 root root 102076 Apr 18 10:05 vmware.log-rw- 1 root root 96468992 Apr 18 05:43 vmx- New Virtual Machine-578288005-1.vswpLaut RW-1 root root 2147483648 Apr 18 05:43 New Virtual Machine-2277f985.vswpLay RW- 1 root root 53687091200 Apr 21 05:47 New Virtual Machine-flat.vmdk-rw- 1 root root 8684 Apr 21 05:47 New Virtual Machine. NVram-rw- 1 root root 503 Apr 18 05:44 New Virtual Machine .vmdk-rw-r--r-- 1 root root 0 Apr 16 09:13 Virtual machine .vmsd-rwxr-xr-- 1 root root 3690 Apr 18 05:43 new virtual machine .vmx-rw- 1 root root 0 Apr 18 05:43 new virtual machine .vmx.lck-rwxr-xr-- 1 root root 3690 Apr 18 05:43 new virtual machine .vmx ~
\ 3) create a xxx.vmdk file in the virtual machine directory with the same size as xxx-flat.vmdk
/ vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine # vmkfstools-c 53687091200-a lsilogic New Virtual Machine. Done./vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine # ls-la * vmdk-rw- 1 root root 53687091200 Apr 21 05:49 New Virtual Machine-flat.vmdk-rw- 1 root root 503 Apr 18 05:44 New Virtual Machine .vmdk
\ 4) overwrite the original (tmp_) xxx-flat.vmdk with the same size xxx-flat.vmdk that you just created
/ vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/ New Virtual Machine # mv tmp_ New Virtual Machine-flat.vmdk New Virtual Machine-flat.vmdk
The rename operation is completed quickly, and starting the virtual machine can be restored. (after renaming, create a new virtual machine-the flat.vmdk file is gone)
Thank you for reading, the above is the content of "how to restore the vmdk file of the ESXI virtual machine". After the study of this article, I believe you have a deeper understanding of how to restore the vmdk file of the ESXI virtual machine, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.