2

I would like to access the disk of a VM from host or even better from LAN. The VM runs a Windows XP. The easiest way would be an access to the c$ share.

Peace,

Ice

Update: Upon the several answers i want to refine my question: Host OS is Linux (Ubuntu). To 'see' the windows partition (c$) inside the vm a want to use the smb protocoll. How (\computername\c$ or ip-adress\c$) works the access?

Update 2: The target of this question is: How to route the smb-protocoll on a linux-box?

Ice
  • 679

6 Answers6

5

If you want to share the C$ drive to a LAN, then it doesn't matter whether you're using a physical server or a VM -- just use the normal Windows [In]Security model to share the drive via CIFS.

[Edit: If you need to access a CIFS network share from Ubuntu, see the Ubuntu wiki.]

If you want the host to be able to read a VM's drive, then the answer depends upon what OS the host is running, what version of VM-hosting software the host is running, and what OS and version the VM is running AND if the VM is running.

Quoting from the vmware-mount documentation:

VMware Disk Mount is a utility for Windows and Linux hosts that allows you to mount an unused virtual disk as a separate drive or partition without needing to connect to the virtual disk from within a virtual machine. You can mount specific volumes of a virtual disk if the virtual disk is partitioned.

After you mount a virtual disk, you can read from and write to the mounted virtual disk as if it were a separate file system with its own drive letter or mount point on your computer. For example, you could scan the disk for viruses or transfer files between the host system and a powered off virtual machine. When you are finished using a mounted virtual disk, you should unmount it so the virtual machine can use its virtual disk again.

If you're not using VMware Workstation, or not using the right version of VMware or Windows or Linux, you'll need to find a different approach.

0

It is not exactly an answer to this question but it is interessting enough to present it here. look at this article on how to mount a vmware-disk under linux:

http://legroom.net/2007/08/05/how-mount-vmware-disk-images-under-linux

If the disk is mounted and the mountpoint can be reached from network thats a valuable solution for this question too.

Ice
  • 679
0

You can add the Virtual HD to a sharing folder, then you can access it from other computers at the same workgroup, then when you get at the other computer with VMWare, you can browse to the path where is the virtual HD file.

0

Does VmWare Workstation not support drag and drop? This is limited to Workstation only far as I know, as it does not work on VmWare Server.

KdgDev
  • 5,758
0

You have a few options for transferring files from host to guest. (This goes a bit more ahead of your question, but also covers it).

If you are running Windows on the guest, or a supported Linux Distribution, by far the easiest solution is simply to drag and drop the files either to or from the Virtual Machine.

If however (as your question says) You want to access over the network via a c$ share, you need to set up networking properly. The easiest way is to turn off the sharing wizard (tools > Folder options) Then set the location to home or make sure that file sharing is on and you should be able to access remotely. Sometimes I spend far to long trying to debug this and it is easy to run the wizard as it sets all the security and shares for you.

Lastly, if you are having trouble, sometimes it is easier just to mount the VMDK file. The easiest way to do this is to shut down the guest operating system, then double click on the hard drive in the specification of the virtual machine and click Utilities > Map. Uncheck the read only box and it should map to a drive letter and you can copy files either way without any problems.

William Hilsum
  • 117,648
0

Just to save you a lot of hassle, apparently there are issue's with Gnome's file manager (Nautilus) when it comes to resolving Windows share names. You may have to use the ip address (ie smb://192.168.1.100/c$) instead of the server name in the address bar of Nautilus.

Another option is to use a KDE-based file manager, such as Krusader, which will also require the package kdebase-kio-plugins to support the smb protocol.

Joe Internet
  • 5,355