VMware Cloud Community
yannara
Contributor
Contributor

VM´s hard disk corrupted, need help fast!

I moved .vmdk file from 1 datastore to another during the night, it was 200gb big. The host is the same. Now, the .vmdk file is with blank icon, and when I try to add it on VM settings, it is not displayed. What should I do?

Reply
0 Kudos
17 Replies
Dave_Mishchenko
Immortal
Immortal

What process did you use to move the virtual disk?  If you access the console, could you get a directory listing for both the source and destination folders?

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

Have you verified that no snapshots were present in the vmdk?

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
yannara
Contributor
Contributor

Dave Mishchenko wrote:

What process did you use to move the virtual disk?  If you access the console, could you get a directory listing for both the source and destination folders?

Open vCenter - navigate to host - open configuration tab - browse source datastore - open source vm wolder - select source .vmdk - move to destination datastore's folder.

I saw when 93% was complete with no errors and go to bed to sleep.

Reply
0 Kudos
yannara
Contributor
Contributor

Andrew Mauro wrote:

Have you verified that no snapshots were present in the vmdk?

No snapshots. The disk is in a "no snapshots for this one" - mode Smiley Happy

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal

So you do not have vCenter Server... correct?

Check in the original folder if some missing file are still there.

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
yannara
Contributor
Contributor

Andrew Mauro wrote:

So you do not have vCenter Server... correct?

Check in the original folder if some missing file are still there.

I have vCenter 5.0 with ESXi 5.0, and movement of .vmdk is done via vCenter console. Datastore A was short of space and I had to move that big virtual hard disk to wider Datastore B.

Reply
0 Kudos
helltejas
Enthusiast
Enthusiast

copy that .vmdk to the original vm folder and then clone that VM

afterthat if still that .VMDK data not visible then try to attech that .vmdk to cloned VM

I had a simillar type of problem but my vm had a snapshot....:Smiley Happy

Reply
0 Kudos
yannara
Contributor
Contributor

Tejas wrote:

copy that .vmdk to the original vm folder and then clone that VM

afterthat if still that .VMDK data not visible then try to attech that .vmdk to cloned VM

I had a simillar type of problem but my vm had a snapshot....:Smiley Happy

Did the copying back to original location really worked for you? Did vmdk´s icon became visible after moving back?

Thanks, I´ll try this later. Good idea about cloning Smiley Happy

Reply
0 Kudos
admin
Immortal
Immortal

move back the vmdk to orginal vm folder, since you have vCenter server 5.0 you can migrate the vm datastore by right clicking the vm and migrate, where you have option to migrate the datastore.

Reply
0 Kudos
Dave_Mishchenko
Immortal
Immortal

Before you start changing the source datastore, I would suggest a directory listing for both the source and destination.  If you change the source, you might take an action that can't be reversed.

Reply
0 Kudos
yannara
Contributor
Contributor

Let me clarify couple of things:

Before the corruption, I had this situation.

I had VM1 in Datastore A which contained 200gb .vmdk named like VM1.

I had VM2 in Datastore B, which contained empty 40gb .vmdk and was pointed to VM1's 200gb .vmdk in Datastore A.

This is config file of VM2:

.encoding = "UTF-8"
config.version = "8"
virtualHW.version = "8"
pciBridge0.present = "true"
pciBridge4.present = "true"
pciBridge4.virtualDev = "pcieRootPort"
pciBridge4.functions = "8"
pciBridge5.present = "true"
pciBridge5.virtualDev = "pcieRootPort"
pciBridge5.functions = "8"
pciBridge6.present = "true"
pciBridge6.virtualDev = "pcieRootPort"
pciBridge6.functions = "8"
pciBridge7.present = "true"
pciBridge7.virtualDev = "pcieRootPort"
pciBridge7.functions = "8"
vmci0.present = "true"
hpet0.present = "true"
nvram = "SCCM.nvram"
virtualHW.productCompatibility = "hosted"
powerType.powerOff = "soft"
powerType.powerOn = "hard"
powerType.suspend = "hard"
powerType.reset = "soft"
displayName = "SCCM"
extendedConfigFile = "SCCM.vmxf"
scsi0.present = "true"
scsi0.sharedBus = "none"
scsi0.virtualDev = "lsisas1068"
memsize = "4096"
scsi0:0.present = "true"
scsi0:0.fileName = "/vmfs/volumes/4db72fcd-97785818-e6c4-0007e913b680/Windows 2008 R2 SP1 Standard/Windows 2008 R2 SP1 Standard.vmdk"
scsi0:0.deviceType = "scsi-hardDisk"
sched.scsi0:0.shares = "normal"
sched.scsi0:0.throughputCap = "off"
ide1:0.present = "true"
ide1:0.fileName = "/vmfs/devices/cdrom/mpx.vmhba0:C0:T0:L0"
ide1:0.deviceType = "atapi-cdrom"
ethernet0.present = "true"
ethernet0.virtualDev = "e1000"
ethernet0.networkName = "VMNET"
ethernet0.addressType = "vpx"
ethernet0.generatedAddress = "00:50:56:97:5b:4a"
svga.vramSize = "8388608"
chipset.onlineStandby = "false"
disk.EnableUUID = "true"
guestOS = "windows7srv-64"
uuid.bios = "42 17 a7 cc 72 02 b0 65-2e 81 69 75 7b 2a 0c b1"
vc.uuid = "50 17 ca 9e 82 f8 b5 21-96 b2 fc b7 8a a4 9e 18"
log.fileName = "vmware.log"
snapshot.action = "keep"
sched.cpu.min = "0"
sched.cpu.units = "mhz"
sched.cpu.shares = "normal"
sched.mem.min = "0"
sched.mem.shares = "normal"
tools.upgrade.policy = "manual"
ethernet0.pciSlotNumber = "32"
evcCompatibilityMode = "FALSE"
guestCPUID.0 = "0000000a756e65476c65746e49656e69"
guestCPUID.1 = "000006f600010800800022010febfbff"
guestCPUID.80000001 = "00000000000000000000000120100800"
hostCPUID.0 = "0000000a756e65476c65746e49656e69"
hostCPUID.1 = "000006f6000208000004e3bdbfebfbff"
hostCPUID.80000001 = "00000000000000000000000120100800"
pciBridge0.pciSlotNumber = "17"
pciBridge4.pciSlotNumber = "21"
pciBridge5.pciSlotNumber = "22"
pciBridge6.pciSlotNumber = "23"
pciBridge7.pciSlotNumber = "24"
replay.filename = ""
replay.supported = "FALSE"
scsi0.pciSlotNumber = "160"
scsi0.sasWWID = "50 05 05 6c 72 02 b0 60"
scsi0:0.redo = ""
userCPUID.0 = "0000000a756e65476c65746e49656e69"
userCPUID.1 = "000006f6000208000004e3bdbfebfbff"
userCPUID.80000001 = "00000000000000000000000120100800"
vmci0.pciSlotNumber = "33"
vmotion.checkpointFBSize = "8388608"
unity.wasCapable = "TRUE"
numvcpus = "2"
scsi0:0.mode = "independent-persistent"
vmci0.unrestricted = "TRUE"
floppy0.present = "FALSE"
vmci0.id = "2066353329"
tools.syncTime = "FALSE"
uuid.location = "56 4d 38 9f ee da 15 91-db 7a 2a 8c 2a d2 9a a0"
cleanShutdown = "FALSE"
bios.forceSetupOnce = "FALSE"
sched.swap.derivedName = "/vmfs/volumes/4f7c4d6f-b5060230-244c-0007e913b680/SCCM/SCCM-4becee65.vswp"
checkpoint.vmState = ""

The "Windows 2008 R2 SP1 Standard/Windows 2008 R2 SP1 Standard.vmdk" was located in Datastore A, in directory of VM1. This is the file which is 200gb big and I moved it from Datastore A to B last night. Now I´m moving it back.

If this file won´t turn out as supporded hard disk, is there something which could be done in this configuration file?

Reply
0 Kudos
a_p_
Leadership
Leadership

In ESXi a virtual disk consists of two files. The header/descriptor file (e.g. Windows 2008 R2 SP1 Standard.vmdk) which is mapped to the VM and the data file (e.g. Windows 2008 R2 SP1 Standard-flat.vmdk). Did you move both files to the new datastore? If both files exist, you will only see the header file in the datastore browser, the -flat.vmdk file is hidden. If you can see the -flat.vmdk file in the datastore browser then the header file is either missing or corrupt.

André

yannara
Contributor
Contributor

André Pett wrote:

In ESXi a virtual disk consists of two files. The header/descriptor file (e.g. Windows 2008 R2 SP1 Standard.vmdk) which is mapped to the VM and the data file (e.g. Windows 2008 R2 SP1 Standard-flat.vmdk). Did you move both files to the new datastore? If both files exist, you will only see the header file in the datastore browser, the -flat.vmdk file is hidden. If you can see the -flat.vmdk file in the datastore browser then the header file is either missing or corrupt.

André

This is probably what happend. The end result is, that I lost the header file. I had only flat.vmdk after first movement, and I renamed it to .vmdk.

Reply
0 Kudos
a_p_
Leadership
Leadership

VMware provides a KB article for how to rebuild a missing header file at http://kb.vmware.com/kb/1002511

If you are unsure, please provide the exact size of the virtual disk file and whether it is thin or thick provisioned and post (attach) a vmware.log file (if you still have one in the VM's folder) from the time the VM was still running, to see what can be done.

André

yannara
Contributor
Contributor

Okay, thankx you all guys for help, I´ll reinstall the system this time. In a hurry, I might delete some config files of VM and not thinking straight. For the future lession, I think the best practise is - never move, copy or delete anything from VM folders manually? Only use cloning features via vCenter, right?

I had similar case once before, when I hadn´t vCenter. Then, I just cloned VM by copying and rename them manually, until one day I wipe out one usless VM, and half of my VMs was gone... :smileyblush:

Reply
0 Kudos
nielse
Expert
Expert

Always play safe and use the clone option or storage vmotion if you want to move data Smiley Happy

@nielsengelen - http://foonet.be - VCP4/5
Reply
0 Kudos
continuum
Immortal
Immortal

> I´ll reinstall the system this time. In a hurry ...

the fastest way out of this is to provide the data Andre asked for.

We can recreate the lost vmdk file in a matter of minutes ....


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos