Host-based backup of Microsoft Hyper-V VMs.
Post Reply
acidvenom
Influencer
Posts: 11
Liked: 6 times
Joined: Jun 09, 2015 12:47 pm
Contact:

Backup of self-VMs on Hyper-V Server

Post by acidvenom » 4 people like this post

Hi everyone!

Of course you know that Veeam B&R on Hyper-V Server can be used only as on/off-host. No GUI, no PowerShell scripts, just no!
You should install B&R on another PC or VM and start any action on it, aiming to Hyper-V Server.

That's no good, I don't want to act like that. I want to make Hyper-V (Free one) to backup VMs itselt by trigger in scheduller.
And here it is my howto:

First of all you should install Veeam B&R v8 (I use Free version) with all components included. In addition install VeeamHvIntegration.msi and VeeamTransport.msi, ypu can get it in Packages folder.
The second step is installing Patch #2b, because only Patch 2 grants you access to PowerShell snapin.
But if you just install the Patch, it won't be applied as it should be. Why? Because of this:
After installing the update, please start the Veeam services, open the console and allow Veeam B&R to update its components.
There's no way to start console in Hyper-V and that's why we should use a hint - Unattended Mode installation.

Steps:
1) Change all Veeam services start states to Disabled
2) Reboot Hyper-V (next time I'll use just "Reboot")
3) Download Patch, unpack it using command line

Code: Select all

%PatchFullPath% /q /c /t:<path_to_tmp_folder>
4) Start installation in Unattended Mode

Code: Select all

 %path_to_tmp_folder%\HotFixRunner.exe noreboot log <log_path> [color=#FF0000]VBR_AUTO_UPGRADE=1[/color]
Do not use silent key, you don't want to read logs, don't you?
5) Change all Veeam services start states to Automatic and DO NOT start any service!
6) Reboot

After rebbot you'll get fully working Veeam B&R with latest patch.

Next step is registering PSSnapin via PowerShell because it's not registered automaticly upon the installation (why? I don't know, ask Veeam).
To do this start PowerShell and do next:

1) Check if it's registered

Code: Select all

get-pssnapin -registered
2) If none is registered do next

Code: Select all

set-alias installutil $env:windir\Microsoft.NET\Framework64\v4.0.30319\installutil.exe
installutil "c:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.PowerShell.dll"
3) Check if it's registered again

Code: Select all

get-pssnapin -registered
Next step - add host (self-one).

Code: Select all

Add-VBRHvHost -Name "*name*" -User *DOMAIN\user* -Password *password* -Description "*Paste_your_description*"
To chech if it is OK do this:

Code: Select all

Get-VBRServer -Name "*name*"
You should get a list of all your VMs.

Now you can use PowerShell scripts with Veeam in Hyper-V!!!
I use a script by Vladimir Eremin. Thanks a lot, Vladimir!

Schedulling is not so hard to do neighter script editing.
Thanks everyone for reading this post! Keep backup!
acidvenom
Influencer
Posts: 11
Liked: 6 times
Joined: Jun 09, 2015 12:47 pm
Contact:

Re: Backup of self-VMs on Hyper-V Server

Post by acidvenom » 1 person likes this post

You can read this article in Russian here.
veremin
Product Manager
Posts: 20413
Liked: 2302 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Backup of self-VMs on Hyper-V Server

Post by veremin »

Thank you for posting such an informative post; much appreciated.

By the way, I've read the article in Russian and am glad to hear that you've found my script useful and pretty convenient. :)

Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests