scripting question

PowerShell script exchange

scripting question

Veeam Logoby jjvierra » Mon Jan 25, 2016 2:44 pm

I have some virtual security appliances that need to be shut down before they can be backed up.To shut them down you need to SSH to them, stop the application and then shutdown the appliance. An then restart them via vCenter. I'm looking for some ideas on a way to automate this process so i can schedule backups. Any help would be appreciated.

Thanks
jjvierra
Novice
 
Posts: 8
Liked: never
Joined: Wed Jan 20, 2016 8:16 pm

Re: scripting question

Veeam Logoby v.Eremin » Mon Jan 25, 2016 2:51 pm

Is SSH connection really necessary? I'm wondering since from my perspective everything can be done via PowerCLI.

Code: Select all
Get-VM -name "Name of your VM" | Stop-VM


Code: Select all
Get-VM -name "Name of your VM" | Start-VM


Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 968 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: scripting question

Veeam Logoby jjvierra » Mon Jan 25, 2016 3:05 pm

Just stopping the VM can cause corruption. I need to shutdown the application before I shutdown the VM.
jjvierra
Novice
 
Posts: 8
Liked: never
Joined: Wed Jan 20, 2016 8:16 pm

Re: scripting question

Veeam Logoby foggy » Mon Jan 25, 2016 3:06 pm

Also, do you really need to stop the VM at all, if you can gracefully stop the application? Have you considered using pre-freeze/post-thaw scripts to achieve that?
foggy
Veeam Software
 
Posts: 14728
Liked: 1078 times
Joined: Mon Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson

Re: scripting question

Veeam Logoby jjvierra » Mon Jan 25, 2016 3:24 pm

Good point. Let me check and see. And I'll take a look at these scripts. Thanks for the help!
jjvierra
Novice
 
Posts: 8
Liked: never
Joined: Wed Jan 20, 2016 8:16 pm


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 5 guests