Power On VM ไม่ได้เพราะหา .vmdk ไม่เจอ
เคยนี้เคยเจอมาสองรอบแล้วตอนย้าย VM server หรือ Create new VM ขึ้นมาจากการ Clone
หาก Browse Datastore ไปแล้วเจอ xxx-flat.vmdk แล้ว power on ไม่ได้ คุณมาถูกที่แล้ว
ถ้าดูใน vmware.log แล้วเจอหน้าตาประมาณนี้
2016-12-14T10:19:51.445Z| Worker#0| I120: Unable to find file xxx.vmdk
2016-12-14T10:19:51.445Z| Worker#0| I120: OBJLIB-FILEBE : FileBEOpen: can't open 'xxx.vmdk' : Could not find the file (393218).
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-DSCPTR: DescriptorOpenInt: failed to open 'xxx.vmdk': Could not find the file (60002)
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-LINK : "xxx.vmdk" : failed to open (The system cannot find the file specified).
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-CHAIN : "xxx.vmdk" : failed to open (The system cannot find the file specified).
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-LIB : Failed to open 'xxx.vmdk' with flags 0xa The system cannot find the file specified (25).
หาก Browse Datastore ไปแล้วเจอ xxx-flat.vmdk แล้ว power on ไม่ได้ คุณมาถูกที่แล้ว
ถ้าดูใน vmware.log แล้วเจอหน้าตาประมาณนี้
2016-12-14T10:19:51.445Z| Worker#0| I120: Unable to find file xxx.vmdk
2016-12-14T10:19:51.445Z| Worker#0| I120: OBJLIB-FILEBE : FileBEOpen: can't open 'xxx.vmdk' : Could not find the file (393218).
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-DSCPTR: DescriptorOpenInt: failed to open 'xxx.vmdk': Could not find the file (60002)
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-LINK : "xxx.vmdk" : failed to open (The system cannot find the file specified).
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-CHAIN : "xxx.vmdk" : failed to open (The system cannot find the file specified).
2016-12-14T10:19:51.445Z| Worker#0| I120: DISKLIB-LIB : Failed to open 'xxx.vmdk' with flags 0xa The system cannot find the file specified (25).
วิธีการตอนแรกต้องเปิด SSH ที่ vsphere ก่อน เนื่องจาก security ตัวนี้จะไม่ได้ default enable
1.ไปที่ Host เลือก Manage แล้วก็ไปที่ Security Profile
2.ไปที่ service แล้ว start 2 ตัว ESXi shell , SSH
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2004746
3. เปิด Putty แล้ว Connect SSH เข้าไป ใส่ login , password ให้เรียบร้อย
4.แล้วก็ตามนี้เลย
https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511
4.1 ตรวจสอบว่าไฟล์ขนาดเท่าไร
ls -l xxx-flat.vmdk
4.2.จากนั้นสร้าง Disk หลอกขึ้นมาให้ขนาดเท่ากับของเดิมต้องเท่ากันเป๊ะเลยนะ
vmkfstools -c 4294967296 -a lsilogic -d thin temp.vmdk
4.3.เวลาสร้างจะมีไฟล์มาสองไฟล์ คือ temp.vmdk กับ temp-flat.vmdk
ก็ลบตัว -flat ทิ้ง
rm -i temp-flat.vmdk
4.4 รีเนมตัว temp ให้เป็นตัว .vmdk เดิมของเรา
mv -i temp.vmdk xxx.vmdk
4.5 เปิดตัว Editor แก้ไขข้อมูลใน xxx.vmdk ตามนี้ vi xxx.vmdk
- Under the Extent Description section,
- Use command "Shift + r" to enter replace mode.
- Locate and change the name of the .flat file to match the orphaned .flat, Press "Esc" to exit replace mode.
- Find and remove the line ddb.thinProvisioned = "1" if the original .vmdk was not a thin disk. If it was, retain this line. Use command "Shift + zz" to save and exit "vi" editor.
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfs"
# Extent description
RW 8388608 VMFS "xxx-flat.vmdk"
# The Disk Data Base
#DDB
ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"
ddb.thinProvisioned = "1"
The virtual machine is now ready to power on. Verify your changes and ensure Disk chain is consistent before starting the virtual machine.
- Under the Extent Description section,
- To check the disk chain for consistency, run this command against the disk descriptor file:
For ESXi 6.0 and 5.x:
# vmkfstools -e filename.vmdk
เสร็จเรียบร้อยก็ power on ขึ้นมา น่าจะใช้ได้ตามเดิม

ความคิดเห็น
แสดงความคิดเห็น