I am useing PowerShell doing VM Restores. It works pretty well. The only thing, that is not working for me, is to place the Target Network. I am restoreing VMs in an different target.
If I understand the documentation correct, I need to Get the ViServerNetwork Info from my host. So I put this information in a varible like this:
I'm not sure about this, but do you also have to add the SourceNetwork parameter?
SourceNetwork
For restore to another location.
Specifies the source site network. Veeam Backup & Replication will map it to the target network.
False
Named
False
False
TargetNetwork
For restore to another location.
Specifies the target site network. Veeam Backup & Replication will map it with the source network.
Never tried this before. But I would check the $target-object. Is it the object-type (VBRViNetworkInfo) you need? Maybe it is a array insteat of a single object? and what is the exact error-message?
Never tried this before. But I would check the $target-object. Is it the object-type (VBRViNetworkInfo) you need? Maybe it is a array insteat of a single object? and what is the exact error-message?
I tried both. I just used the variable, in my testing $network also tried to use it as array “$network.Name” for example. Script ist woring fine without -TargetNetwork.
Picture 1: $network.Name
Picture 2: $network
Never tried this before. But I would check the $target-object. Is it the object-type (VBRViNetworkInfo) you need? Maybe it is a array insteat of a single object? and what is the exact error-message?
That is the error message When I am using just the variable:
Thats the error Message, when I am choosing one single objcet. $network.Name for example. I get the same error message form any kind of objects that I can choose.
And yes, I guess VBRViNetworkInfok] is needed, when I understand the documentation correctly.
Never tried this before. But I would check the $target-object. Is it the object-type (VBRViNetworkInfo) you need? Maybe it is a array insteat of a single object? and what is the exact error-message?
I am confused, last posts gone wrong. Hopefully this one will work.
So when I understand the docu correctly I need VBRViNetworkInfof].
I get different errors useing the variable or one item from the array. See both screenshots.
can you run $network.gettype() and show the answer?
can you run $network.gettype() and show the answer?
object type seems to be correct. In a screenshot I just saw you wrote $network.name as parameter. This is definitely wrong, because this will be a string-type. You need to replace be $network only.
The other screenshot shows the error error in parameter source.
object type seems to be correct. In a screenshot I just saw you wrote $network.name as parameter. This is definitely wrong, because this will be a string-type. You need to replace be $network only.
The other screenshot shows the error error in parameter source.
Thanks for your answers :-)
But useing only $network will not work. The greenline is, whats in the varaible $network. The Start-VBRRestoreVM Task is working fine, without -TargetNetwork $network .
I guess I need to enter a -SorceNetwork $sourcenetwork as well. Thats why he is asking for source. So how do I get the source network from the backup file? I quess than I have anything I need.
Just read the source network like the target network. so the task will map the specified source network to the specified target network.
Just read the source network like the target network. so the task will map the specified source network to the specified target network.
That’s the challenge. The use case is disaster recovery.
There is no source network anymore. It’s a direct vm recovery from s3 to vmware cloud on aws.
I will try to rebuild the network in the destination an use it as „source“ maybe that’s working. I will report. Thx so far
Ok, I could resolve the problem.
So you have to give the -TargetNetwork AND the -SourceNetwork
If your Source environment is destroyed, as it is during disaster, you need to create a dummy-network in the target vCenter. The network doesn´t matter. The name, should be the same, like in the source site.
Step 1: Create a Dummy Network in the Target vCenter to use it for the -SourceNetwork
I’d need to validate this in the lab but when you back up your VMs, Veeam would learn the source network information, this is handy in scenarios whereby you have multiple NICs such as a DMZ and a LAN interface so you can change the correct one.
I wouldn’t expect the source network to still have to exist, because as you say, in a DR this network may no longer exist.
If I get some time to lab this I’ll report back my findings by backing up a VM with a port group and then delete the port group.
Hi @Hartmut,
I’d need to validate this in the lab but when you back up your VMs, Veeam would learn the source network information, this is handy in scenarios whereby you have multiple NICs such as a DMZ and a LAN interface so you can change the correct one.
I wouldn’t expect the source network to still have to exist, because as you say, in a DR this network may no longer exist.
If I get some time to lab this I’ll report back my findings by backing up a VM with a port group and then delete the port group.
It would be great If you could find an easier way.
During my testing a vailid source network was needed. The name of the portgroup must equal the name of the source network from the vm in the backupfile. Veeam puts an array of networking informationes in the variable. So just entering the name for -SourceNetwork will not work too.
If you restore via the GUI the source network is populated automatically. So, a source network has to be given.
I think it is implemented this way to be sure to catch the correct network on the VM when there is more than one network defined. And yes, the existing network could be the default for this command if there is one network only.
Thanks for posting the solution @Hartmut. The documentation isn't that clear about both parameters; at least my guesswasn't that wrong
But what happens if you have multiple networks in a VM? How would those match with only a single network parameter?
perhaps you can specify several source and target network pairs?
Ok, I could resolve the problem.
So you have to give the -TargetNetwork AND the -SourceNetwork
If your Source environment is destroyed, as it is during disaster, you need to create a dummy-network in the target vCenter. The network doesn´t matter. The name, should be the same, like in the source site.
Step 1: Create a Dummy Network in the Target vCenter to use it for the -SourceNetwork