VMware {code} Community
arthurdent78
Contributor
Contributor

Extract files from a VM in vsphere

Hi all,

Please could someone point me in the right direction. I have a VM (windows) that I want to get some files off. However this VM can not be connected to the same network as the rest of the infrastructure for security reasons. Is there a API I can use to get into the file system? What I have in mind is somthing like the shared folders option in workstation.

Any help will be much appreshiated.

Reply
0 Kudos
5 Replies
lamw
Community Manager
Community Manager

VMware VIX can be used for guestOS management including uploading/downloading files to a specific VM or executing scripts withinthe guest, the problem is it'll need to be able to communicate with your management network which hosts either your vCenter or ESX(i) host.

You could also look into some Windows scripting that uses WMI calls to interact with the OS, as you might with a physical Windows host.

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

arthurdent78
Contributor
Contributor

Thanks William,

I have not used VIX before but I will have a look at it. I am not a programmer so itl be a challange.

Thanks,

Reply
0 Kudos
lamw
Community Manager
Community Manager

Well the cool thing about VIX is not only does it expose this as an API so you can create an application against it but if you're looking for a quick way to run some simple operations such as uploading/downloading, executing, some power operations,etc. you can use vmrun which is a pre-compiled binary that has all the basic functionality of what VIX provides. You can easily wrap this in a shell, vb/bat script.

Here are some additional examples on my site, take a look and hopefully it'll give you some ideas on how to get started: http://www.engr.ucsb.edu/~duonglt/vmware/#vmware_vix

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Comuunity

Twitter: @lamw

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos
jnhall
Enthusiast
Enthusiast

What do you mean by not connected to the same network? What network are you going to connect the VM to? And what machine/location/whatever do you want to access the files from?

Reply
0 Kudos
mackemftm
Enthusiast
Enthusiast

Joseph,

I used to use the arthurdent78 name but had to change it.

sorry its took so long but i didnt know you had replyed and i no longer have access to that email account.

I situation was that the vms were on a isolated network and not routed. This meant that say from your corprate devloper PC you couldnt connect to the VM via the network. ill not go any further than that as its a old request and the situation has gone away.

thanks for getting back to me though.

David

Please click the answered or helpful buttons to give me points. Thanks vMackem
Reply
0 Kudos