Quick tip on sharing files between VMs without network connection. When you want share files between VMs which do have a restricted network access. There are two elegant ways (there might be more) to do it. One of them is the sharing possibility through a VMDK file. How it's done? Basically what you need to do is to Add second hard disk to your VM and copy all the files that needs to be shared to this disk.
Then disconnect the VMDK file from your VM by going to your vSphere client and:
Share files through VMDK disk file
Right clicking your the source VM > Edit Settings > Select the second hard disk > Remove > Remove from Virtual Machine (don't use the second radio button, since you would delete the VMDK file).
Then go to the second VM, and attach this VMDK disk file to this VM.
As I tested it in my lab with W2008R2 VMs and with VMware vSphere 5, no downtime was necessary for the second VM – I was able to hot-add (hot-remove is not supported – KB article) this VMDK file. So this is the first and convenient way to “share” files between 2 VM. Note that you can't access this VMDK file from both VMs at the same time. It's not supported and the VMDK could get corrupted.
Create an ISO from your files and connect it to your VM
The second way would be to create an ISO image, which can be connected to any VM in your infrastructure. To create an ISO image you can use any of the free tools available. I found and used a tool called Anytoiso (there is a Lite version which is Free).
And with the help of this tool you can transform an folder (in my case folder “Downloads”) to an ISO image which can be connected to a VM as a CD/DVD.
Any of those two ways helps you to share files between different VMs which are not accessible via the network. You could possibly add a second NIC and temporarily connect the VM which needs to access some files, but there might be a security policy in your entreprise which does not permit this, so those two ways can be used as a workaround.
Update: Check out the latest article about Top 4 Free Tools to create ISO files.
You can subscribe to get the latest content via RSS (If you don't know what is RSS you can have a look at my RSS page here which explains that). Or you can also subscribe via e-mail and get one weekly e-mail with the latest articles. The website is updated daily.
Ed Grigson says
You can hot remove a hard disk, both from a VMware and Windows 2008 perspective. The referenced KB article states that ESX doesn’t support it, which I believe is wrong. I think that came in with v4 but it could even have been v3.5.
Another option might be to use the PowerCLI command Copy-VMGuestFile. This lets you copy files to and from a VM even if it has no network configured, but does require VMtools to be installed.
http://www.vmware.com/support/developer/PowerCLI/PowerCLI41/html/Copy-VMGuestFile.html
Vladan SEGET says
I was just thinking on why it’s unsupported. It works like a charm… -:).
Thanks for the info Ed.