频道栏目
首页 > 资讯 > 虚拟机 > 正文

One of the disks in this virtual machine is already in use by a virtual machine

11-10-24        来源:[db:作者]  
收藏   我要投稿

One of the disks in this virtual machine is already in use by a virtual machine or by a snapsho

这是在移动vmware disk 文件时候经常碰见的问题,如果是snapshot引起的话,那得把这个snapshot删除才能恢复正常。

直接引用了,懒得翻译:

If a Virtual Machine Has Two Disks with Identical File Names, Stored in Different Locations, You Cannot Delete a Snapshot of This Virtual Machine
Details
When I'm trying to delete a snapshot of a powered on virtual machine, this operation fails. The virtual machine has two disks with the same file names, and the disks are stored in different locations. Could this cause the failure?

Solution
Yes, having two disks stored in different locations but sharing the same file name (for example, "[storage1] vm/disk.vmdk" and "[storage2] vm/disk.vmdk") causes the snapshot delete operation to fail.

Because VMware Consolidated Backup uses the snapshot functionality, backing up this type of virtual machines will fail as well.

To avoid this problem, make sure the file names for virtual disks are unique.

If your virtual machine already has two disks with identical file names, follow this procedure to rename one of the disks:

Make sure no snapshots of the virtual machine exist.

Note: If your virtual machine already has a snapshot, power off the virtual machine and delete the snapshot. You can use the Snapshot Manager to delete snapshots. From the VI Client, choose Inventory > Virtual Machine > Snapshot > Snapshot Manager.

Power off the virtual machine.

Remove one of the two disks from the virtual machine, but do not delete the disk.

Log in to the ESX Server system and use the following command to rename the disk:
vmkfstools -E <old_name> <new_name>
For example, to rename the disk foo.vmdk to bar.vmdk, enter vmkfstools -E foo.vmdk bar.vmdk.

From VI Client, add the renamed disk back to the virtual machine.
Note: In the situation where there are several virtual disks, it will be more efficient to make all the changes from the ESX Server host console.
Power off the virtual machine.

Delete any snapshots.

Log in to the ESX Server host console.

Rename the disks:
vmkfstools -E <old_name> <new_name>

For example, to rename the disk foo.vmdk to bar.vmdk, enter vmkfstools -E foo.vmdk bar.vmdk.

Use a text editor (vi or nano) to update the file names for each disk.

Power on the virtual machine from the ESX Server host command line or the Virtual Infrastructure Client connected directly to the ESX Server host. If you start the virtual machine with the Virtual Infrastructur Client, the values cached in Virtual Center will be pushed back to the ESX Server host.

相关TAG标签
上一篇:VM虚拟机上“The parent virtual disk has been modified since the child was create
下一篇:Android 动态设置控件的布局
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站