Discussions specific to the VMware vSphere hypervisor
Post Reply
Morgenstern72
Enthusiast
Posts: 74
Liked: 11 times
Joined: Jan 30, 2014 3:37 pm
Full Name: Joachim
Contact:

How to shut down a VM before backup and the power on again?

Post by Morgenstern72 » Aug 10, 2016 7:40 am

We use ESX 5.5 and 6.0
I just upgraded our VMWare Mirage server to a cluster, but this makes backup much more difficult. It would be much easier (and has no impact on users) to shut down both VMS, make a (SAN) snapshot, power them on again and backup just that snapshot. Is there an easy way to do that with veeam?

Any help with details on how to do would be very appreciated :)

eshteinman
Novice
Posts: 4
Liked: 2 times
Joined: Dec 09, 2014 10:54 am
Full Name: Evgeny Shteynman
Contact:

Re: How to shut down a VM before backup and the poer on agai

Post by eshteinman » Aug 10, 2016 8:05 am 2 people like this post

you need install VMware powercli on veeam server and run veeam process from user that have permissions to start and shutdown VM

Then in veeam job configure pre-job script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -executionpolicy Remotesigned -Command Add-PSSnapin VeeamPSSnapIn; Add-PSSnapin VMware.VimAutomation.Core; Connect-VIServer -Server "you vcenter server name"; Shutdown-VMGuest -VM "you vm name" -Server lbn-vc4-01 -Confirm:0; do{$vm=Get-VM -Name "you vm name"}while ($vm.PowerState -eq \"PoweredOn\")
and post-job script:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -executionpolicy Remotesigned -Command Add-PSSnapin VeeamPSSnapIn; Add-PSSnapin VMware.VimAutomation.Core; Connect-VIServer -Server "you vcenter server name"; Start-VM -VM "you vm name" -Server "you vcenter server name"; Start-Sleep -s 90

Morgenstern72
Enthusiast
Posts: 74
Liked: 11 times
Joined: Jan 30, 2014 3:37 pm
Full Name: Joachim
Contact:

Re: How to shut down a VM before backup and the poer on agai

Post by Morgenstern72 » Aug 10, 2016 10:43 am

Does the post-script start after the snapshot is done or after the backup job is finished?

v.eremin
Product Manager
Posts: 16160
Liked: 1320 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: How to shut down a VM before backup and the poer on agai

Post by v.eremin » Aug 10, 2016 11:02 am 1 person likes this post

This is an English-speaking forum, so, kindly please avoid using any languages but English.

And answering your question - post-job script starts after a job is finished, post-thaw script (also available in GUI) takes place as soon as a snapshot is removed.

Thanks.

Morgenstern72
Enthusiast
Posts: 74
Liked: 11 times
Joined: Jan 30, 2014 3:37 pm
Full Name: Joachim
Contact:

Re: How to shut down a VM before backup and the poer on agai

Post by Morgenstern72 » Aug 11, 2016 8:10 am

I find before and after scripts, but no post-thaw. Where can I find this?

Gostev
SVP, Product Management
Posts: 24022
Liked: 3257 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: How to shut down a VM before backup and the power on aga

Post by Gostev » Aug 11, 2016 12:55 pm

Guest Processing step.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 16 guests