VMware Communities
masplin
Contributor
Contributor

Cloning of vmdk

I'm reporting this as didnt get an answer and by adding addiitonal info maybe people think I did. Plus I know a bit more

I have been using vmware player on my Win 7  Pro 64-bit pc. I have  installed a 64-bit Win 7 OS and been happily using it for 3 months. In  the last few days I have started getting sporadic errors after the  windows desktop has loaded.

"The operation on the file U:\Users\Mike\Documents\Virtual Machines\Windows 7 x64\windows 7 x64.vmk" has failed"

I now know that one of the HD in my RAID 1 assembly is failing.  I am now working just off the good disk, but still getting the error above.  My question now is any point trying to clone the vmdk or if there is a problem with the file I'm just duplicating it and therefore need ot do a fresh install?  if I can try cloning can someone give me simple instructions as got really confused reading the info I found on the site.

Thanks for any advice

Mike

0 Kudos
10 Replies
WoodyZ
Immortal
Immortal

masplin wrote: I'm reporting this as didnt get an answer and by adding addiitonal info maybe people think I did. Plus I know a bit more

In the context of this thread alone this makes no scene at all and if you're refering to a different thread you started you might want to include a relevant link, like operations on .vmk failed error and cras as an example! Smiley Wink

Anyway, generally speaking, a normal file based Virtual Machine is just a collection of files in a folder.  Some of these files have an absolute interdependency so assuming this is just a normal file based Virtual Machine that has no dependencies outside of the folder in which the files that comprise the target Virtual Machine then simply properly* making a copy of the target folder makes a clone of the target Virtual Machine.

* Properly in this context means the target Virtual Machine is shutdown, from within the Guest OS, not suspended and VMware Player closed.

Also note that when making a copy of a Virtual Machine in this manner it is literally an exact copy and if one needs to run the original and the copy at the same time it requires having an additional or proper license where applicable, like with Windows OSes.  Additionally one copy will need to be made uniquely different if run on the same Network at the same time, things like Computer Name, MAC Address, IP Address if not using DHCP, etc.  When starting a clone for the first time one should be prompted asking if iy was moved or copied, answering copied automatically changes the MAC Address.

0 Kudos
masplin
Contributor
Contributor

So is copying differnet to cloning as have seen reference to cloning a machine?  Do you think that just copying the existing file is going to work if I have problems opening the original?

Thanks

Mike

0 Kudos
a_p_
Leadership
Leadership

The error you mentioned looks like an issue with physical disk access. If you are able to copy the VM's folder to another disk, the at least this error should be gone.

Does trying to power on the VM create a new vmware.log file in the VM's folder? If yes, please see whether this file contains any additional hints and/or post (attach) the file in a reply post.


André

0 Kudos
WoodyZ
Immortal
Immortal

masplin wrote: So is copying differnet to cloning as have seen reference to cloning a machine?

Well it depends to what cloning reference you're referring to, however one general definition of clone is "make an identical copy of" and since VMware Player does not have a cloning feature, like VMware Workstation as an example, then manually making an identical copy of the files that comprise a normal file based virtual machine is accurately technically a clone.  That said the difference between the literal copy/clone, yet accurate in the context of the lack of cloning capabilities in VMware Player, and a clone produced by VMware Workstation is that with a Full Clone the copy is made uniquely different from the perspective of how VMware Workstation will work with it however not the installed Guest OS and as such applying some of the previously mentioned settings still need to be made uniquely different where/when applicable.  It is also independent of the source from which it was copied unlike a Linked Clone which is and remains dependent on the source.

0 Kudos
masplin
Contributor
Contributor

Hi Andre. So I had 2 disks in a RAID1 assembly and one of them has bad sectors.  I'm assuming RAID1 means that the vmdk file is identical on both discs so you would think that if I only read the good disc the file should load.  Wondering if some corruption in the file caused by the bad disc. I've attached the last log from the folder with the problem vm.

I'll try copying the folder ot another idsc and see if it launches, but expect not.

mike

0 Kudos
a_p_
Leadership
Leadership

This is more a guess, since I don't have a documentation which explains the errors in the log file.

Did you run chkdsk for the U: drive after you discovered the issue with the second disk? IMO this could be a logical error on the file system!?

Anyway, copying the files to another disk and powering on the VM from the new location should work if it is an issue with the file system.

André

0 Kudos
masplin
Contributor
Contributor

Initially I couldn't run chkdsc as it said the file system was RAW. I used partition wizard to recover the partiitions and then was able to run chkdsk /f /r on the full RAID and it took over 24 hours to run. At that point I ran the manufacturers disk checking software which said bad sectors on one disc. So I disconnected the offending drive and rebooted. The machine now thinks I have a degraded RAID assembly of just one disk. Everything seems to work fine except the vm.  I again tried to run chkdsk on the single HDD, but get the same files system is RAW message. I tried the  partition wizard again but this hasn't cured it.  I also cannot open disk management. What I don't know is if its the degaded RAID that is the problem and it will go away when I replace the 2nd disc and rebuild or I also have a problem with what I think is the good disc.  It passes all the tests. I'll speak to Del ltomorrow to get a replacement disc as in warranty.

for an experiment I installed a new VM from scratch and seems to be working fine.  However I havent installed everything.  I'll now try the old vm from a different location.

Can I ask a generla question. What is the best way of taking a backup of the vm in case something happens to it in future?  Do I just literally keep a copy of the folder on another drive or something more sophisiticated?

Thanks

Mike

0 Kudos
WoodyZ
Immortal
Immortal

Can I ask a generla question. What is the best way of taking a backup of the vm in case something happens to it in future?  Do I just literally keep a copy of the folder on another drive or something more sophisiticated?

A normal ordinary disk file copy, when properly made, is all that is necessary however if you need/want to save space a compressed copy can be made.

0 Kudos
a_p_
Leadership
Leadership

To add to what WoodyZ said. The copying has to be done with the VM powered off, to ensure the files are unlocked (not in use), i.e. in a consistent state!

André

0 Kudos
WoodyZ
Immortal
Immortal

I already mentioned that in my original reply, Re: Cloning of vmdk. Smiley Happy

0 Kudos