VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
1 Replies Last post: Oct 29, 2009 7:39 AM by lamw  

How can i copy vm to local PC with cli? posted: Oct 29, 2009 7:32 AM

Click to view RalfT74's profile Lurker 1 posts since
Oct 29, 2009

Hi all,

i use ESXi 4 and cli (Windows-PC) to stop and start some vm for automation.
Now i need a copy one vm to my local PC.
I try with:
vifs.pl --server myVMServer --username root --password xxxxxxx --get "SQLLog SRV-Reports/SRV-Reports_1.vmdk" .
But in this case i can copy only single Files and the target directory is the "actual" folder.

How can i make a complete copy of my VirtualMachine to my local PC (example: d:\VMBackup\SRV-Reports) ?

Second Question:
Is possible to convert an ESXi 4.0 Image to VMWare Workstation 6.5 with CLI ?

thanx,
Ralf


Re: How can i copy vm to local PC with cli?

1. Oct 29, 2009 7:48 AM in response to: RalfT74
Click to view lamw's profile Champion 2,813 posts since
Nov 27, 2007
As you know you can export a VM using the vSphere Client, if you're trying to use vifs, then you'll wan to query all files under the VM you're trying to export which can be done using one of the vSphere SDK for Perl Utilities and then just download each file to your local system, there is no 'copy all' function. You probably also know that your VM must either be offline or have a snapshot so you can backup the disks.

Regarding converting, you can accomplish this using the free VMware Converter which can convert from various formats including from WS->ESX and ESX->WS (Converter has a CLI but not sure how well it works and not sure if its part of the free version)


=========================================================================
William Lam
VMware vExpert 2009
VMware ESX/ESXi scripts and resources at: http://engineering.ucsb.edu/~duonglt/vmware/
vGhetto Script Repository
VMware Code Central - Scripts/Sample code for Developers and Administrators
VMware Developer Comuunity
Getting Started with the vMA (tips/tricks)
Getting Started with the vSphere SDK for Perl
Twitter: @lamw

http://engineering.ucsb.edu/~duonglt/vmware/vexpert_silver_icon.jpg

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

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities