The school decided to teach us pupils C#. Great. A programming language for windows... Do i need to say more?
I do not have any version of Microsoft Windows, so i told my teacher that i am not going to buy any Microsoft product and that he had to give me any version i can run VisualStudio on. He finally gave me an "MSDN Academic Alliance" Windows XP.
I installed it into a VMWare virtual machine and after hours of "updating" it was finally ready to be used.
I wanted to save the VisualStudio projects directly on my notebook and not on the virtual hard disk of the VM because i have the apprehension of losing all my data by destroying Windows (i did not use Windows for years now...)
My idea was to create a shared Samba folder on the Notebook and mount it in the Windows VM. The Problem is that i use the notebook at work, at home, at my girlfriend and at school. Thank DHCP, my notebook has about three different IPs on a normal day. Hard to connect a mapped network drive in windows to varying IPs.
The solution is to use a host-only VMNet! In a host-only network the VM can only connect to its host.
Step 1: Check (ifconfig) if your VMWare server has a host only network (usually "vmnet1")
Step 2: Add a host-only network interface to the Windows VM
Step 3: Boot the VM, check if the new network interface has an IP (ipconfig) and if you can ping the host (ping [address of vmnet1])
Step 4: Create a shared SMB folder on the host
Step 5: Map the SMB Folder on the Windows VM (e.g. \\172.16.220.1\csharp - "csharp" is the name of the share on the host)
This is it! You should now have a drive mapped to the folder on the host.
Troubleshooting:Check you smb.conf if samba is listening on vmnet1 (Ubuntu standard is to only listen on eth0 and lo)
Did you create samba users? (sudo smbpasswd -a [username])
Check if the folder share is working (use "smbtree")