在使用vmware server时,创建data store,提示FileNotFound: A file was not found,折腾了很久,原来都是权限惹的祸。
1、情况描述
环境: win7 64bit + vmware server
在D盘中创建有VM文件夹,下面包含多个虚拟机,由于下面其文件夹下的虚拟机最近很少使用,因此未发现有任何问题。
最近需要用到该路径下的虚拟机,在添加data store时,一直提示文件没有找到。
起初以为是vmware的几个服务没有启动,一看都处于启动状态,重启几次,问题依旧,看来应该排除服务异常的情况。
Google了N多网页,才找到罪魁祸首,下面是截图
2、为虚拟机所在驱动器添加权限
上面的图示表明D盘VM文件夹下的权限仅仅robinson.cheng域用户有完全控制的权限
同样,从上面的图中也可以看出D盘之下的所有内容也只有robinson.cheng域用户有完全控制的权限
我们下面为D盘添加新的权限,如果仅仅修改VM文件夹的权限是不够的。
点击change permision
点击add,选择locations,指定为当前的计算机名,同时通过advanced按钮寻找到Administrators组,最终结果如下:
为刚刚加的administrator组添加full control完全控制权限
接下来一路点击Ok即可。再次添加data store成功。
注意,如果不成功,请查看该用户是否也属于__vmware__用户组。
更多有关vmware的错误:
Symptoms
- You cannot add a datastore
- You may experience one of the following errors when trying to add a datastore:
-
- FileNotFound: A file was not found.
- DuplicateName: The name already exists.
Purpose
This article provides troubleshooting steps to eliminate factors that may prevent you from adding a datastore.
Resolution
Please validate each troubleshooting step below. Each step will provide instructions in order to eliminate possible causes and take corrective action as necessary. The steps are ordered in the most appropriate sequence to isolate the issue and identify the proper resolution. Please do not skip a step.
Note: If you perform corrective action in any of the following steps, try to add the datastore again.
- Confirm that you have the correct permissions. Depending on the operating system of the VMware host installation computer, authenticate as either the local Administrator user or as root.
- Verify that the value entered in the Name field is not already in use by an existing datastore.
- Verify that the value entered in the Directory Path field exists on the filesystem. This value must point to an existing directory.
Note: If CIFS is selected (as opposed to Local Datastore), verify that the file share location can be accessed from the computer where the VMware host is installed using the same information that has been entered in the datastore creation wizard.
- Confirm that you are not using a subdirectory of a directory path already that is directly defined by an existing datastore.
For example:
Name Directory Path Notes Datastore1
Datastore2D:\Datastore
D:\Datastore\NewDatastoreInvalid. The directory path D:\Datastore is already in use by Datastore1 and cannot be used by Datastore2. Datastore1
Datastore2D:\Datastore
D:\NewDatastoreValid. The directory path D:\NewDatastore is not in use by any existing datastore and is available for use. Datastore1
Datastore2D:\Datastores\Datastore1
D:\Datastores\Datastore2Valid. Both datastores use a common D:\Datastores directory path, but neither one point directly to it.
Note: If your problem still exists after trying the steps in this article, please:
- Gather the VMware Support Script Data. For more information, see Collecting diagnostic information for VMware products (1008524).
- File a support request with VMware Support and note this KB Article ID in the problem description. For more information, see How to Submit a Support Request.