Thursday, December 10, 2009

Copying files to a VMWare Server

I am using VMWare a lot for my Oracle activites. To be specific I use the VMWare Server. Now one of the missing features of the VMWare Server is that the drag and drop of files does not work.
Typically with a Linux I use WinSCP from my Windows Vista host. With a Windows guest I often use the feature of the Remote Desktop to connect my local drive.
Another possibility exists, although it is a little awkward and almost cumbersome if you need to transport a lot of files.
In the VMWare Server a utility exists which will copy a file into the guest OS. This utility is called vmrun and it works as follows.
Go to the directory where the file that you want to copy is located. Then execute the vmrun command with the following switches:
-T server
-h https://yourVMWareServerName:port/sdk (typically the port is 8333)
-u username_of_the_vmware_server
-p password_of_the_vmware_server
-gu username_of_the_vmware_guest
-gp password_of_the_vmware_guest
copyFileFromHostToGuest
“VMWare Configuration File”
source_file_name target_file_name
In the following screenshot you can see this command in action.



If you don’t know the VMWare configuration file location go to the summary page of the VMWare image and click on the “Configure VM”. This will bring up the following dialog box. The VMWare configuration file location is in the second part of the dialog box.