Vmware copying file to datastore

I keep getting error " specified parameter was not correct. name too long or wrong file type when copying file between datastore" when I am trying to copy vmdk file from one datastore to another datastore. The first datastore is getting slower and I am trying to move another dadtastore to fire up the vm. The new datastore has adequate space to fit vmdk, therefore space is not an issue
LVL 4
pchettriIT DirectorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cooleditCommented:
what command are you using..
if you have problemn using a command you could use Winscp..

Regards
Cooledit
0
cooleditCommented:
otherwise it should be

while on the datastore where you wanna copy from

cp filename /mainfolder/datstore
that's it.

regards
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Are you using the Datastore browser to copy the virtual machine files?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

pchettriIT DirectorAuthor Commented:
yes I am using datastore browser and that particular disk I am copying shows inflate option while others dont
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
this is because the disk is thin.
0
pchettriIT DirectorAuthor Commented:
do you think it would be useful to inflate and copy or it would do more damage to data
0
pchettriIT DirectorAuthor Commented:
I tried cp /vmfs/datastore2/"Exchange 2007"/"Exchange 2007.vmdk"  /vmfs/datastore3/"Exchange 2007" and cp "Exchange 2007.vmdk"  /vmfs/datastore3/"Exchange 2007" both ways by being in the parent directory but it only copues 0.59 kb
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
cp, is not really a command you should use, the command vmkfstools would be better.

or use the datastore browser, in the vSphere Client
0
pchettriIT DirectorAuthor Commented:
when I try vmkfstools it gives me error that file specified is not a virtual disk. I think I would need reverse conversion from thin to thick instead of standard thin to thick which most of the article points to
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay, lets re-wind, what are we trying to do.....
0
pchettriIT DirectorAuthor Commented:
the performance of datastore2 was erratic, therefore, I was trying to copy the vmdk file from datastore2 to 3. But I am running out of all option to copy as none of them is working.
I even try to mount the vmx file to inventory and tried removing vmdk and adding but now it fails to add from original datastore too, might have something to do with vmdk being thin disk at creation
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Do you not have Storage vMotion?
0
pchettriIT DirectorAuthor Commented:
this is a single ESXi host with local drives
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay.....so if you use the datastore browser, and click copy and paste do you get any error messages?
0
pchettriIT DirectorAuthor Commented:
I keep getting error " specified parameter was not correct. name too long or wrong file type when copying file between datastore"
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
can you screenshot the VM folder?

I assume the VM is off,and does power up correctly?
0
pchettriIT DirectorAuthor Commented:
VM is off and it does not power on. Somehow the vmx file was not in original location and I had to copy it from another datastore and add to inventory but it does not add vmdk as HDD, if I try to add manually from existing datastore it fails to mount it as iscsi HDD
0
cooleditCommented:
hi there

I know how frustrating copy could be.

so if your'e in SSH as I guess and you are on the folder datastore as earlier and with ls -ahl do you see your file listed.

cp just type some of the name ex. your filename is linux133.vmdk just type cp lin (hit Tab) should try to write the rest itself. then if not try Tab twice. then just type /your/full/path/destination

Give us a screenshot of the ls -ahl then if you can't get it to work.

Cooledit
0
pchettriIT DirectorAuthor Commented:
I was able to create new VM and mount the vmdk
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
VM all working now then ?
0
pchettriIT DirectorAuthor Commented:
I can start from that store. Since it is added to inventory I am now trying to export as ovf and import it back to newer datastore
0
pchettriIT DirectorAuthor Commented:
nothing is working. importing from Ovf or attaching that vmdk as secondary drive. I may have to find the copied flat file on another datastore and try to build a link using that
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
You could always complete a V2V using VMware Converter if you can start the VM.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pchettriIT DirectorAuthor Commented:
I could not start the VM. The only option is to modify and point to existing flat by creating and renaming temp.vmdk

http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=1003743
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay, lets rewind, how has he VM got in this state ?
0
pchettriIT DirectorAuthor Commented:
someone try copying VM from one datastore to another datastore, the copy operation was cancelled as it was stuck for more than two days. I got a feeling it might have been a move command otherwise I do not see vmx file been disappeared from slower source datastore. I tried adding vmx file in copied datastore to inventory, since it was pointed to vmdk on old datastore I removed and try adding from new datastore but I discover those were all flat files after that I could not  mount vmdk back.
I even try to move vmx file back to original datstaore but I still could not get vmdk mounted it was giving 15 error.
Anyways, .vmdk on slow or corrupted datastore has never worked after recent issue that why we were trying to move it
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
okay, have you tried cloning the virtual disk ?

there is no snapshot attached ?

can you screenshot the VM folder ?

If you cannot clone, the VMDK/VMFS datastore is corrupted, have you tried running VOMA if your ESXi hosts supports it ?
0
pchettriIT DirectorAuthor Commented:
Cloning and copying stops in the middle
There is not snapshots
I will try VOMA and get back to you
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Faulty datastore, or faulty VMDK.
0
pchettriIT DirectorAuthor Commented:
I tried copying two flat vmdk and both failed after 20 to 30 %. I presume it is faulty datastore or vmfs partition, as at HDD physical level of detection did not show problem with physical partition.
Do you think installing ESX 6 and upgrading to new vmfs by keeping / retaining old data would repair vmfs partition automatically?
0
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
If you have no backup, it's worth a try.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.