I find myself frequently needing to copy files such as application installation files from my workstation to the guest OS running inside a VM. Sure you could do this using UNC paths and shares by connecting to the VM at the guest OS layer and authenticating with the VM and then copying files with Windows Explorer but this can be a pain sometimes. It also means that those files are taking up space on the VM and if its only temporary and you’re using thin provisioning you can’t easily reclaim that space. I also find myself installing the same applications on many VMs and to have to copy the files to each VM can be time consuming.
So instead of messing with copying files through the guest OS layer using a copy utility, I prefer to copy them through the virtualization layer using an ISO file. By using an ISO file I can easily mount it on the VMs CD/DVD drive and then access the files without having to copy them to the VM’s file system. This is the same method by which VMware Tools is installed on a VM, the VMware Tools install binaries are mounted from a special mount point on the host disk partition to the CD/DVD drive of a VM so they can be installed. You’ll notice if you create a VM without a CD/DVD drive that you won’t be able to install VMware Tools and will receive an error if you try.
So you might think, creating an ISO file, isn’t that a pain in the butt as well. It’s actually very quick and easy and once you create it you can use it over and over on any VM to install applications with and copy files to VMs if needed. You can keep a collection of them on your workstation and mount them from your local disk or you can copy them to a host datastore and mount them from there. I sometimes create toolkit ISO images that contain many of the typical applications (i.e. Sysinternals, disk tools, etc.) that I use when troubleshooting problems within a VM. Windows still does not have the native ability to read or write ISO files but there are a number of free tools that you can create ISO files with such as ImgBurn, CDBurnerXP (works on Win7) and ISO Recorder. I usually use ImgBurn but ISO Recorder is even easier as you can select the files/folders that you want to include in the ISO file and launch it via the Windows Explorer menus like below.
Next you simply select a directory and a name to save your ISO file in, click Next and your ISO file will be created.
You can now mount it inside the VM using the virtual CD/DVD drive of the VM by browsing to the ISO file you just created so you can access all the files inside the ISO file from within the VM.
That’s it, quick and easy, takes less than a minute to complete and much easier then having to copy files through the guest OS of the VM.