Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Nov 8 '09 at 21:06

This question came from our site for professional and enthusiast programmers.

    
Is this question more a network issue? –  Ice Nov 17 '09 at 23:22
    
I want to programm a route for smb-protocoll to the gest-os. This is port 145 or smething like that? –  Ice Dec 6 '09 at 16:55

6 Answers 6

up vote 5 down vote accepted

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.

share|improve this answer
    
Please explain how i link to the vm from lan? assuming the host has a ip like 192.168.1.10 and we all know that the vm inside this host has a ip like 172.16.x.x ? There must be a route, isn't it? –  Ice Nov 17 '09 at 23:16
    
If you set up the VM to share the host's network connection (with its own IP address), instead of using NAT, then it looks just like a regular server on your main network. –  Craig Trader Nov 24 '09 at 21:51
    
Yes, thanks. It is my fault not to declare that the VM is configured with NAT. This way it is a network issue in routing the appropriate protocoll around, isn't it? –  Ice Dec 6 '09 at 16:48

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.

share|improve this answer
    
That's backwards: you use sharing folders (host filesystem directories) to share data between VMs and the host system; they appear as networked drives to the VM and a simple directory to the host. –  Craig Trader Nov 8 '09 at 20:59

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.

share|improve this answer
    
I'm playing around with vmware player (the free thing-a-magic) and drag 'n drop goes like a charm. But that's not my question. –  Ice Nov 17 '09 at 23:08

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.

share|improve this answer

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.

share|improve this answer
    
As allways if no DNS-Server is configurred, yes thats a known issue. The questions target is: how to route the smb-protocoll. –  Ice Dec 6 '09 at 16:51

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.