Make Visual Studio work with VMWare Fusion Shares

VMWare Fusion allows Mac users to run virtualized operating systems. The “Shared Folder” feature allows for sharing profile folders on the Mac (Desktop, Documents, Music, Pictures) with virtualized operating systems. Having a shared work space eliminates the need for duplication of files that need to be used in both operating systems.

I run a virtualized Windows XP operating system so that I can code in Visual Studio on my Mac. I prefer to do design (HTML, CSS) on the Mac side of things. Having shared storage for use in my projects eliminates the need to copy back and forth. It also allows me to backup my Visual Studio projects using Time Machine without having to make a copy of my VM every time. However, to make Visual Studio happy with the shared Documents folder, there some settings that need changed.

Change the Documents folder location to be a mapped drive

When working with web projects located on shared storage, Visual Studio doesn’t like the .host location shared by VMWare because of the dot in front of the share name. This is resolved by mapping the .host share to a network drive, and setting the My Documents folder in Windows to be located on the network drive. VMWare automatically maps its shares to the Z drive.

Get rid of the “failed to start monitoring changes” build error

Visual Studio’s default behavior is to monitor folders in web projects for changes. Because the Documents folder is on a UNC share, this behavior prevents web projects from building. The only solution I have found is to disable this behavior.

  1. Open regedit and navigate to HKLM\Software\Microsoft\ASP.NET\
  2. Create a new DWORD value named FCNMode
  3. Set FCNMode to have a decimal value of 1

Get rid of the “Project location not trusted” error

By default, the .NET configuration will not trust the shared folders from VMWare for projects. You will see an error when opening projects from the shared folder.

DotNet Trust Issue

You must tell .NET to trust the location. Install the .NET Framework 2.0 SDK.When installing, you will only need “Tools and Debugger”; uncheck everything else. After the install, you will have a new tool under Administrative Tools for .NET 2.0 configuration.

DotNet SDK Install

  1. Open the .NET configuration tool
  2. Expand the tree on the left side to My Computer > Runtime Security Policy > Machine > Code Groups > All Code > LocalIntranet_Zone
  3. Right click on LocalIntranet_Zone and select the “new” option to create a new code group
  4. Name the code group “.host” (without the quotes) and click next
  5. Change the condition type dropdown to URL and enter “file:\\.host\*” (without the quotes) in the URL text box type and click next
  6. Choose “Full Trust” as the existing permission set, click next, then click finish. You should see a .host in the LocalIntranet_Zone as shown below. Save and close all windows.
Netconfig

 

You will now need to tell Internet explorer that .host is a trusted zone.

  1. Open up IE and go to Tools –>Internet Options
  2. Go to the Security tab, highlight Local Intranet and click the sites button
  3. Click the advanced button. In the “Add this website to zone” text box, type “file://..host/*” without the quotes and click add. Save and close all windows.

You’re all set. Visual Studio will now work with VMWare Fusion’s shared folders. Happy coding.

 

Build an ESXi server on the Cheap

If your a network admin, and you’re not using virtualization in your disaster recovery, then you’re probably being negligent. VMware ESXi is free. You can’t do all of the fancy stuff, like VM motion, but it is the same bare-metal hypervisor as ESX. You can register, download, and obtain a free license for ESXi here.

ESXi is pickier when it comes to hardware than its pricier counterpart ESX. However, if your hardware works with the drivers it does have, you can add your hardware IDs to the configuration files and use your hardware. If you use a system, motherboard, and/or NIC listed on the community maintained list and download and use the community maintained configthen you can forgo a lot of tinkering. If you are going to use local storage, you won’t be able to use RAID with a SATA drive, or at least I haven’t figured it out; that would probably slow things down anyway. ESXi can use storage on NFS file shares, SANs, and some NAS devices as well. I am going to look at using FREENAS to hold some VMs instead of shelling out boo koo bucks for fiber. Whatever you decide to do, make sure you get an Intel NIC listed on the HCL; I had no luck with anything else.

For now, I am using a newly built device for DR testing and proof of concept. I went to my local Micro Center, friggin love that store, and purchased an ASUS PQ5 SE2 ($95), 4 GB 800mhz DDR2 Corsair RAM ($70), a 45nm 2.6 Ghz 8mb Core 2 Quad ($189),  and a 1TB WD SATA HD with a dual IO controller ($139). I happened to have a case/power supply, DVD drive, and compatible Intel NIC laying around. So I spent about $480 for the parts I needed.

I elected to install ESXi on a bootable flash drive.  VMware made a video  and pdf showing how. Here are the steps on how to do this on a Windows machine per yellowbrick.com:

  1. First get the following tools: 7-Zip(Free), WinImage(Demo)
  2. Download the ESXi ISO
  3. Open the ISO with 7-Zip
  4. Extract “install.tgz”
  5. Open “install.tgz” with 7-Zip
  6. Click on “install.tar”
  7. Browse to “usr\lib\vmware\installer\”
  8. Open “VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd.bz2″
  9. Extract “VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd”
  10. Open WinImage and go to Disk, click on “Restore Virtual Harddisk Image on physical drive”
  11. Select a physical drive
  12. Select “VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd”
  13. Click “yes” to write the DD image to the USB Disk

After building an ESXi bootable flash drive, I downloaded the community maintained config, renamed it to oem.tgz, and pasted into the bootable partition on the flash drive – overwriting the existing one.

Time to boot it. After inserting my USB ESXi, I had to go into the BIOS of my board and set the USB drive to be bootable. I also had to change my SATA drive configuration to be AHCI instead of RAID or IDE.  After saving, I was eventually greeted by the ESXi system.

You will need to adjust your network settings to be appropriate for your network, which you won’t have the option for unless you have a compatible NIC (get a listed Intel NIC). Once ESXi is network capable, you can go to your server’s IP address (http) and download VMware Infrastructure Client to manage it. I went to VMware’s site and downloaded VMware Converter (also free) to convert an existing workstation VM to ESX format; took a while but I did it over wireless.  You can also use the converter to convert an existing physical computer to VM. The converter uploads directly to your ESXi server, and it will complain about using a login without a password, so add a password to your ESXi root user account and use that.

esxi server

So far, its working like a champ. The next step is to set up a FREENAS iSCSI target server via crossover cable to a dedicated NIC.  If you have any pointers, let me know. Cheers.