In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to use flat.vmdk file to recover ESXI virtual machine vmdk file", the explanation content in this article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "how to use flat.vmdk file to recover ESXI virtual machine vmdk file"!
error description
On vSphere, when you restart the virtual server once, you will get a "Do not start" message, indicating that the vmdk virtual disk file cannot be found.
cause analysis
Check the summary information of this virtual server and compare it with other available virtual machines on the datastore. It is found that the damaged server does lack a vmdk disk file, but you can see a 50G xxx-flat.vmdk file; while the normal server only has xxx.vmdk, no xxx-flat.vmdk. After shutdown, both files exist, and the real disk capacity is transferred from vmdk to xxx-flat.vmdk.
When the virtual host is running, it is actually xxx-flat.vmdk, however xxx.vmdk can be deleted at the same time, which causes the problem.
It should be noted that each disk drive of a virtual machine contains a pair of.vmdk files. One is a text file containing descriptive data about the virtual hard disk; the other is the actual contents of the disk. For example, a virtual machine named examplevm has a hard disk attached to it. This disk consists of two files: an examplevm.vmdk description file of less than 1KB and a 10GB examplevm-flat.vmdk flat (data) file containing the actual data of the virtual machine stored in binary form on the physical disk. The examplevm.vmdk description file describes this mapping.
solutions
1)Log in to the vsphere host with ssh, find the location and directory of the xxx-flat.vmdk file, and record the file size
~ # find / -name "New VM-flat.vmdk"/vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM/New VM-flat.vmdk~ # ls -l /vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM/New VM-flat.vmdk-rw------ 1 root root 53687091200 Apr 16 09:13 /vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM/New VM-flat.vmdk
Note that ESXi5 does not have ssh enabled by default. You need to log in to the server through vsphere client. Configure, Security Configuration File, Service-Properties are enabled manually.
2)Rename xxx-flat.vmdk file
~# cd /vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM//vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM_1 # mv New VM-flat. vmdk tmp_New VM-flat. vmdk/vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM #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 VM-578288005-1.vswp-rw----- 1 root root 2147483648 Apr 18 05:43 New VM-2277f985.vswp-rw----- 1 root root 53687091200 Apr 21 05:47 New VM-flat.vmdk-rw----- 1 root root 8684 Apr 21 05:47 New VM.nvram-rw------ 1 root root 503 Apr 18 05:44 Create a new virtual machine.vmdk-rw-r--r-- 1 root root 0 Apr 16 09: 13New Virtual Machine.vmsd-rwxr--xr-- 1 root root 3690 Apr 18 05:43 New VM.vmx-rw------ 1 root root 0 Apr 18 05: 43New Virtual Machine.vmx.lck-rwxr--xr-- 1 root root 3690 Apr 18 05:43 New virtual machine.vmx~
3)Create an xxx.vmdk file in the virtual machine directory as large as xxx-flat.vmdk
/vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM # vmkfstools -c 53687091200 -a lsilogicNew VM.vmdkCreate: 100% done./ vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM # ls -la *vmdk-rw----- 1 root root 53687091200 Apr 21 05:49 New VM-flat.vmdk-rw----- 1 root root 503 Apr 18 05:44 Create a new virtual machine.vmdk
4)Overwrite the original (tmp_)xxx-flat.vmdk with the newly created xxx-flat.vmdk of the same size
/vmfs/volumes/50a98441-ab02c8b7-e60a-001517712dce/New VM # mv tmp_New VM-flat.vmdk New VM-flat.vmdk
The renaming operation is done quickly, and the boot virtual machine can be restored. (After changing the name, the new virtual machine-flat.vmdk file disappears)
Thank you for reading, the above is "how to use flat.vmdk file to restore ESXI virtual machine vmdk file" content, after the study of this article, I believe you have a deeper understanding of how to use flat.vmdk file to restore ESXI virtual machine vmdk file, the specific use of the situation still needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
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.