VMware Communities
art_yomov
Contributor
Contributor
Jump to solution

One of rhe disks in this virtual machine is already in use by a virtual machine or by a snapshot

Hi all.

A apologize for my poor English.

I have VmWare 10 installed on Linux Centos 5.

I worked with virtual machine Windows 7 and suspend off it.

Now when i try to run this virtual machine, i get this message:

"One of rhe disks in this virtual machine is already in use by a virtual machine or by a snapshot"

I try to fix it this way:

Re: Unable to open .vmdk file. One of the disks in this virtual machine is already in use by a virtu...

mkdir ./clone

vmware-vdiskmanager -r "Windows 7 x64-000008.vmdk" -t 0 "Windows 7 x64.vmdk" 

mkdir /backup

mv *.* ./backup/

cp ./backup/*vmx ./

cp ./backup/*vmxf ./

But after that i've got the error: "Unable to change virtual machine power state: Unable to open "/******/Windows 7 x64-000008.vmdk. The system cannot find the file specified.

Please, help me to solve the problem.

Apologize for my English again:)





Tags (3)
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

I don't really see what could be causing the issue, except there are some .lck files in the "lock" sub-directory!?

Anyway, if you don't care about the forked snapshots and the current state is what you need, you may follow these steps (which are close to what you already did) to merge the virtual disk snapshots to and use this virtual disk for the VM:

  • close VMware Workstation
  • create a new sub-directory and move all the VM's files and folders to it for backup purposes
  • from this sub-directory run: vmware-vdiskmanager -r "Windows 7 x64-000008.vmdk" -t 1 "../Windows 7 x64.vmdk"
  • copy the .vmx file to the parent directory and edit it as follows:
    scsi0:0.fileName = "Windows 7 x64-000008.vmdk" --> scsi0:0.fileName = "Windows 7 x64.vmdk"

Now you should be able to start the VM with the cloned virtual disk.

André

View solution in original post

6 Replies
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

I'm a little bit confused about the commands you posted, and it would be helpful if you could provide a list of files in the VM's folder (e.g. ls -lisa) to get an overview.

Firstly the vmware-vdiskmanager command you ran may - if it didn't error out - have overwritten the base virtual disk!? And secondly you didn't mention whether you edited the VM's configuration file after copying the files, to point it to the correct/current .vmdk file.

If you backed up the vmware.log files after you received the error message about the virtual disk file being already used, please attach this .log file to a reply post.


André

0 Kudos
art_yomov
Contributor
Contributor
Jump to solution

Hello

Thanks for answer.

I have attached list of files of directory of virtual machine and vmware.log file.

And secondly you didn't mention whether you edited the VM's configuration file after copying the files, to point it to the correct/current .vmdk file.

To tell the trust, I didn't edit configuration file. I didn't know that this is necessary.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

The files somehow don't match what I expected from the commands you posted earlier!?

To understand the current situation please compress/zip the following files and attach them to a reply post:

  • *.vmx
  • *.vmsd
  • *.vmdk (only the small text files without "...-s0xx.vmdk" in their names)
  • *.log (the log file you attached earlier only contains rather old data)

In addition to this run ls -lisa > filelist.txt in the VM's folder and add the filelist.txt to the archive too.

André

0 Kudos
art_yomov
Contributor
Contributor
Jump to solution

Hello, a.p.

I have returned all files to their source folders after those commands. I decided, it is better to try to solve the problem from original states of vmware files.

I have attached files you asked.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I don't really see what could be causing the issue, except there are some .lck files in the "lock" sub-directory!?

Anyway, if you don't care about the forked snapshots and the current state is what you need, you may follow these steps (which are close to what you already did) to merge the virtual disk snapshots to and use this virtual disk for the VM:

  • close VMware Workstation
  • create a new sub-directory and move all the VM's files and folders to it for backup purposes
  • from this sub-directory run: vmware-vdiskmanager -r "Windows 7 x64-000008.vmdk" -t 1 "../Windows 7 x64.vmdk"
  • copy the .vmx file to the parent directory and edit it as follows:
    scsi0:0.fileName = "Windows 7 x64-000008.vmdk" --> scsi0:0.fileName = "Windows 7 x64.vmdk"

Now you should be able to start the VM with the cloned virtual disk.

André

art_yomov
Contributor
Contributor
Jump to solution

André, thank you very much. It helped for me!

Now virtual machine works fine.

0 Kudos