[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Adding an existing hard drive in VMWare vSphere 5 fails to add disk scsi0:1

Posted on 2012-03-23
10
Medium Priority
?
3,963 Views
Last Modified: 2012-03-26
Hello EE
When I go into Edit Settings and add a Hard Drive choosing existing hard drive I get the following error:
Failed to add disk scsi0:1
Failed to power on scsi0:1
Reason: Failed to lock the file
Cannot open the disk '/vmfs/volumes....vmdk' or one of the snapshot disks it depends on

Some VMs I can.  Until I get these others working I can't get my backup software working.
Why can't I add these?
0
Comment
Question by:bergquistcompany
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 
LVL 123
ID: 37759663
It seems you are adding a virtual disk, that has an existing snapshot?

you need to remove (merge) the snapshot first possibly.


A snapshot is NOT a backup of a VM; that is a gross misconception.

A snap shot is a way to preserve a point in time when the VM was running OK before making changes. A snapshot is NOT a way to get a static copy of a VM before making changes.  When you take a snapshot of a VM what happens is that a delta file gets created and the original VMDK file gets converted to a Read-Only file.  There is an active link between the original VMDK file and the new delta file.  Anything that gets written to the VM actually gets written to the delta file.   The correct way to use a snapshot is when you want to make some change to a VM like adding a new app or a patch; something that might damage the guest OS. After you apply the patch or make the change and it’s stable, you should really go into snapshot manager and delete the snapshot which will commit the changes to the original VM, delete the snap, and make the VMDK file RW. The official stance is that you really shouldn’t have more than one snap at a time and that you should not leave them out there for long periods of time. Adding more snaps and leaving them there a long time degrades the performance of the VM.  If the patch or whatever goes badly or for some reason you need to get back to the original unmodified VM, that’s possible as well.  

I highly recommend reading these 2 articles on VMware Virtual Machine Snapshots:

Understanding Snapshots - http://kb.vmware.com/kb/1015180
Snaphot Best Practices - http://kb.vmware.com/kb/1025279

Also check out the following Snapshot Articles by Eric Siebert

Pt.1- http://is.gd/Lajg4p
Pt.2- http://is.gd/NdKQWC
Pt.3- http://is.gd/tp2vEK
0
 

Author Comment

by:bergquistcompany
ID: 37759817
No I am trying to mount an existing disk from VM1 to VM2 and getting this error.  I do not have any shapshots on either VM.
0
 
LVL 123
ID: 37759822
make sure vmdk is not in use.

other VM is not in use?

check using lsof at the console to check if file is in use.

also see here

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:bergquistcompany
ID: 37759830
As soon as you said that about snap shots I started reading and thinking I can't mount it if it's added to VM1 and that machine is on, but I am having an issue with Veeam and they told me that until I can mount the disk from VM1 to VM2 (Veeam server) or any other for that matter I won't be able to use Veeam hot swap and get a successful backup.

Right now none of my Windows VMs backup as they all error about hot add and I was told that through the manual add it fails so it's VMWare not Veeam.  I think they were mistaken.
I wanted to confirm as I thought it was in use, but they are more familiar with their software so wanted to make sure my virtual environment wasn't misconfigured first.  

To clarify if VM1 is on with HD added and I try to add the .vmdk from VM1 to VM2 as an existing disk it will not work unless it is powered down?  I think I may need to revisit Veeam.  Thank you!
0
 
LVL 123
ID: 37759837
you cannot add another disk to a VM if is on.

Veeam Hot Add uses the Storage API, to Hot Add a powered on VM disk to itself by leveraging vmware snapshots
0
 
LVL 123
ID: 37759839
So you did not Solve your Previous Question with Hot Add?
0
 
LVL 123
ID: 37759841
Just to clarify my last statement, you can only add virtual machine disks to a powered ON VM, if the virtual machine disk you are adding from another VM is powered OFF.

So you are still having issues with Hot Add and Veeam?
0
 

Author Comment

by:bergquistcompany
ID: 37760854
They took a snapshot of VM1 then tried adding the existing disk to the Veeam server and after the higher tier came on and said yes after you take the snapshot you should be able to mount the disk to another VM, I was premature after asking them how it was possible with VM1 powered on to believe them that it was a VM issue since our infrastructure is new.

Thank you for the clarification as it appears I prematurely closed my other question after going through the last experts link and got a couple VMs to work figured I'd better reach out to Veeam to finish with the ones that were giving problems and they successed in getting rid of me for at least the day.  Now back to Veeam.  I appreciate the clarification.  Being new to VM they had me questioning myself
0
 
LVL 123

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE^2) earned 2000 total points
ID: 37760888
that is correct, when taking a snapshot it takes the lock off the parent disk, as it writes to a new delta file.

so technically the parent should be lock free.
0
 

Author Closing Comment

by:bergquistcompany
ID: 37768421
With this I was able to go back to Veeam and get escalated up and it was mounting fine after the snapshot.  Thank you for the specifics so I had leverage to go back on.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
August and September have been big months for VMware—from VMworld last month to our new Course of the Month in VMware Professional - Data Center Virtualization. We reached out to Andrew Hancock, resident VMware vExpert, to have a more in-depth discu…
Teach the user how to delpoy the vCenter Server Appliance and how to configure its network settings Deploy OVF: Open VM console and configure networking:
Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question