Solved

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

Posted on 2012-03-23
10
3,340 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
  • 6
  • 4
10 Comments
 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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
Comment Utility
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 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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
 

Author Comment

by:bergquistcompany
Comment Utility
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 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
So you did not Solve your Previous Question with Hot Add?
0
 
LVL 117

Expert Comment

by:Andrew Hancock (VMware vExpert / EE MVE)
Comment Utility
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
Comment Utility
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 117

Accepted Solution

by:
Andrew Hancock (VMware vExpert / EE MVE) earned 500 total points
Comment Utility
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
Comment Utility
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 to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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.
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…
Teach the user how to edit .vmx files to add advanced configuration options Open vSphere Web Client: Edit Settings for a VM: Choose VM Options -> Advanced: Add Configuration Parameters:
Teach the user how to configure vSphere Replication and how to protect and recover VMs Open vSphere Web Client: Verify vsphere Replication is enabled: Enable vSphere Replication for a virtual machine: Verify replicated VM is created: Recover replica…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now