What is the preferred way to access physical drives from VMware virtual machines?

5

3

I have several virtual machines running Windows XP using VMware (v.6) which I use to install and use applications I don't want on the main host OS (WinXP). I need to access data on the physical drives on the host OS from the virtual machine.

I have tried using these "Edit virtual machine settings":

  • Hardware > Hard Disk > Add > Use a physical disk (for advanced users)
  • Options > Shared Folders > Always Enabled

But since I started accessing files outside the virtual machine, WinXP started detecting file errors on the host OS (and running DiskChk to fix them). I don't know if the VM is causing the corruption but I wanted to get some feedback about the correct way to do this.

Robert Cartaino

Posted 2009-07-24T14:56:19.263

Reputation: 6 444

Answers

7

I believe that when you configure "use a physical disk", it assumes the VM has exclusive use of that disk—which it doesn't if the host system is also using it. This can lead to corruption, as both "machines" can have different views about what is really on the disk due to each one doing caching.

I think you want to look into "Shared Folders", where one or more folders you want to use from the host are shared to the guest VM. There they can either be mapped as a drive letter or accessed via a UNC path. (Both read-only and read-write sharing is possible.)

A notable advantages of Shared folders over solutions like "real" Windows sharing is that they don't actually depend on network (not even from guest point of view). This sharing will work even if you disable/firewall/disconnect all adapters on the guest machines (which can become handy when dealing with applications you don't trust.)

David Mackintosh

Posted 2009-07-24T14:56:19.263

Reputation: 3 728

1Yeah, 'use physical disk' is not what the OP wants to be using. I'd wonder how much damage could be happening to the host operating system. – romandas – 2009-07-24T16:19:20.237

Yes, I assume the corruption is from some sort of sharing conflict. But I'm not clear on how (or why) a "shared folder" would cause any less conflict than a "shared physical disk." Unless a "shared folder" uses something like Windows Network Sharing and Security interface. Is that it? – Robert Cartaino – 2009-07-24T16:34:45.697

The "shared folder" from the host means that the raw disk is only directly accessed from the host itself; therefore the host itself can control the consistency. Requests from the guest pass through the host OS. – David Mackintosh – 2009-07-24T16:54:33.110

@JayR. Not exactly. Although the access interface to Shared Folders does look like SMB, it works perfectly without any network. You can un-install/firewall/disable/disconnect adapters all you want, but the folders will still work. – Alois Mahdal – 2012-03-14T16:40:19.013

The shared folders options make use of a virtual network between the host and the guest and use windows file sharing. At least, that is how it works when the guest is windows. – Jay R. – 2009-10-02T21:01:37.670

0

Its working as explained here in sysprobs

dinesh

Posted 2009-07-24T14:56:19.263

Reputation: