VMware Cloud Community
awliste
Enthusiast
Enthusiast
Jump to solution

PowerCLI to zip up a VM to a different datastore...

Howdy everybody.

I'm working on a hobby question, just to see. Anyone have any thoughts or examples on a way, using pCLI, to resolve a VM, zip it up in it's entirety to a datastore it is not resident in and continue on? I know about ghettoVCB and gVCB2, but I was curious if anyone has ever attempted this trick to backup VMs with pCLI?

Thanks for any time and thoughts you put in.

R/,

- abe






Integritas!

Abe Lister

Just some guy that loves to virtualize

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

Ain't gonna lie. I like points. If what I'm saying is something useful to you, consider sliding me some points for it!

Integritas! Abe Lister Just some guy that loves to virtualize ============================== Ain't gonna lie. I like points. If what I'm saying is something useful to you, consider sliding me some points for it!
Reply
0 Kudos
1 Solution

Accepted Solutions
DougBaer
Commander
Commander
Jump to solution

I've never tried this since VCB has been around and that works for what I need.

I did notice that there is an 'Export-VApp' cmdlet in the new PowerCLI that does what you're asking for vApps instead of individual VMs. Bonus is that you get OVFs instead of ZIPs.

Get-VApp myVApp | Export-VApp "c:\vapps\"

If you wrap your VMs in vApp wrappers, you can do it that easily.

Doug Baer, Solution Architect, Advanced Services, Broadcom | VCDX #019, vExpert 2012-23

View solution in original post

Reply
0 Kudos
4 Replies
DougBaer
Commander
Commander
Jump to solution

I've never tried this since VCB has been around and that works for what I need.

I did notice that there is an 'Export-VApp' cmdlet in the new PowerCLI that does what you're asking for vApps instead of individual VMs. Bonus is that you get OVFs instead of ZIPs.

Get-VApp myVApp | Export-VApp "c:\vapps\"

If you wrap your VMs in vApp wrappers, you can do it that easily.

Doug Baer, Solution Architect, Advanced Services, Broadcom | VCDX #019, vExpert 2012-23
Reply
0 Kudos
awliste
Enthusiast
Enthusiast
Jump to solution

I never thought of that. It might work for what I'm trying to do. Definitely worth exploring. Many thanks!

Integritas! Abe Lister Just some guy that loves to virtualize ============================== Ain't gonna lie. I like points. If what I'm saying is something useful to you, consider sliding me some points for it!
Reply
0 Kudos
DougBaer
Commander
Commander
Jump to solution

After digging a bit, I found this that may do what you want

http://xtravirt.com/powercli-simple-vm-backup-script

Doug Baer, Solution Architect, Advanced Services, Broadcom | VCDX #019, vExpert 2012-23
Reply
0 Kudos
awliste
Enthusiast
Enthusiast
Jump to solution

Doug,

Thanks for all the help. Both of your ideas punch out parts of my problem on both methods - what I need is to find a way to string them together, and that's what I'm working on ATT. I have a unique environment where I need to export the vApp into a datastore in as few files as is possible. I can come at it a different way I think (the joys of NFS), but I'd really like to be able to have a VIHost write the ovf into a datastore vice locally. Just a matter of juggling parts and pointers around I guess.

Your comments have certainly been very helpful. Many thanks for your time and attention. The work continues on... Smiley Wink

R/,

- abe






Integritas!

Abe Lister

Just some guy that loves to virtualize

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

Ain't gonna lie. I like points. If what I'm saying is something useful to you, consider sliding me some points for it!

Integritas! Abe Lister Just some guy that loves to virtualize ============================== Ain't gonna lie. I like points. If what I'm saying is something useful to you, consider sliding me some points for it!
Reply
0 Kudos