PowerShell script exchange
Post Reply
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Generate a VBM along with backup

Post by riahc3 »

Ive booted the Veeam recovery disk and I see it asks for a VBM file which I dont have.

The good news is that I know I can still recover from the VBK. That being said, I want to still use the recovery disk to be able to recover in a more "user friendly" matter.

My script is something like:

Code: Select all

#Lines above
$VirtualMachine = "server"
$HyperVHost = "localhost"
$VM = Get-VM -ComputerName $HyperVHost -Name $VirtualMachine
Add-PsSnapIn VeeamPSSnapIn -ErrorAction SilentlyContinue 
$Entity = Find-VBRHvEntity -Name $VirtualMachine -ErrorAction SilentlyContinue 

#Lines between
$DateFormat = Get-Date -Format yyyy-MM-dd
$BackupName = $VM.Name + "-" + $DateFormat
$Dest = "H:\PSDCBackup\WS2012R2.vhdx"

Start-VBRZip -Folder "H:\PSDCBackup" -Entity $Entity -ErrorAction SilentlyContinue
#Lines finish
What do I need to add to generate a VBM as well?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Generate a VBM along with backup

Post by veremin »

Not sure whether I follow you on that. What solution did you use to backup the given machine? Veeam Agent for Windows or Veeam Backup & Replication?
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

Powershell. All completely Powershell.

Veeam Backup and Replication for Hyper-V (8.0.0.2084)
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

Why cant I use the recovery media for a V2P or V2V restore using just the VBK?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Generate a VBM along with backup

Post by veremin »

If a backup was taken by Veeam Backup and Replication, there is no need in recovery media. All you need to do is to import a backup to a backup console, and then restore it to whatever location you want to.

However, you cannot take a backup of Hyper-V VM and restore it as VMware VM (and vice versa).

Thanks.
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

v.Eremin wrote: All you need to do is to import a backup to a backup console, and then restore it to whatever location you want to.
Could you please detail the steps?
v.Eremin wrote:

However, you cannot take a backup of Hyper-V VM and restore it as VMware VM (and vice versa).

Thanks.
Id do a backup up Hyper-V to Hyper-V or Hyper-V to bare metal.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Generate a VBM along with backup

Post by veremin »

Could you please detail the steps?
It might be worth checking corresponding sections of our User Guide: Importing Backups, Restoring backup.
Id do a backup up Hyper-V to Hyper-V
Possible.
Hyper-V to bare metal.
In order for this scenario to work you will need to backup Hyper-VM as a physical computer, using Veeam Agent for Windows. Otherwise, that would not work.

Thanks.
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

v.Eremin wrote: It might be worth checking corresponding sections of our User Guide: Importing Backups, Restoring backup.


In order for this scenario to work you will need to backup Hyper-VM as a physical computer, using Veeam Agent for Windows. Otherwise, that would not work.

Thanks.
Either you are not understanding me or...

I have in a external drive (or network location, irrevelent) with a VBK file. That VBK was done with Start-VBRZip

I should be able to hook a recovery media on a bare metal machine, select recover and it should recover to the HDDs I have installed.

To keep it simple: I have a Hyper-V VM with a 50GB and Windows installed which I did a poweroffed backup using Start-VBRZIP. I have a physical server/machine with a 100GB HDD. No OS.

I should boot with a media on that physical server, select the VBK I got from Start-VBRZIP, select restore to physical, it should say "Do you want to restore to 100GB HDD"?. Yes. Boom. Done. Restored.

Thats what I want and should be able to do.
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Generate a VBM along with backup

Post by veremin »

As I've said, that is not possible, unless you backup this machine with Veeam Agent for Windows (not Veeam Backup & Replication which you're utilizing at the moment). Thanks.
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

v.Eremin wrote:As I've said, that is not possible, unless you backup this machine with Veeam Agent for Windows (not Veeam Backup & Replication which you're utilizing at the moment). Thanks.
With Veeam Agent for Windows and Powershell, is it possible to do?
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Generate a VBM along with backup

Post by veremin »

Veeam Agent for Windows does not have any PowerShell module or snap-in. Therefore, bare metal restore cannot be automated via PS.
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

v.Eremin wrote:Veeam Agent for Windows does not have any PowerShell module or snap-in. Therefore, bare metal restore cannot be automated via PS.
So what you are saying is:

Veeam Backup & Replication which has Powershell cannot do this.
Veeam Agent for Windows which does not have Powershell can do this.

You do realize this is a problem, right? LOL
veremin
Product Manager
Posts: 20270
Liked: 2252 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Generate a VBM along with backup

Post by veremin »

Those products have been designed with different use cases in mind, so no wonder why they differ from each other in terms of feature set.

You can submit your feature request on corresponding subforum, even though the request regarding running PowerShell tasks on machine without OS sounds a bit strange to me.

Thanks.
riahc3
Expert
Posts: 110
Liked: 5 times
Joined: Oct 21, 2015 10:01 am
Full Name: John
Contact:

Re: Generate a VBM along with backup

Post by riahc3 »

You dont get it.

The Powershell task is to GENERATE a backup.

To RESTORE the backup, you read it from YOUR VBM format...
Gostev
Chief Product Officer
Posts: 31455
Liked: 6646 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Generate a VBM along with backup

Post by Gostev »

That is not correct - VBM is not a backup file, it a metadata file. VBK is the actual backup file.
I've edited your post from obscenity, if you'd like to continue participating in this community - please be polite.
foggy
Veeam Software
Posts: 21069
Liked: 2115 times
Joined: Jul 11, 2011 10:22 am
Full Name: Alexander Fogelson
Contact:

Re: Generate a VBM along with backup

Post by foggy »

The fact is you're trying to perform bare metal restore using a backup that was not created with this scenario in mind (a backup created by a completely separate product). This is not supported. The task you're trying to complete cannot be currently fully automated with PowerShell, but you can use Veeam Agent for Windows instead (the backup can be scheduled there as well, if it is the reason for using PS script, or even run from command line).
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests