?
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,813 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 122
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 122
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 122
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 122
ID: 37759839
So you did not Solve your Previous Question with Hot Add?
0
 
LVL 122
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 122

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

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

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

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
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…
Teach the user how to use vSphere Update Manager to update the VMware Tools and virtual machine hardware version Open vSphere Client: Review manual processes for updating VMware Tools and virtual hardware versions: Create a new baseline group in vSp…
Suggested Courses

771 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