-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Aug 10, 2021 2:02 pm
- Contact:
Start-VBRHvRestoreVM Specify Hyper-V Switch
Hi Guys,
When restoring a server using the UI it lets you select the Hyper-V virtual switch you want to attach the restored VM to. I can't seem to find any reference in the doc on how to do this.
I have seen Get-VBRHvServerNetworkInfo and that lets me see the switch but no way to set it.
Any ideas?
Case #04958873
When restoring a server using the UI it lets you select the Hyper-V virtual switch you want to attach the restored VM to. I can't seem to find any reference in the doc on how to do this.
I have seen Get-VBRHvServerNetworkInfo and that lets me see the switch but no way to set it.
Any ideas?
Case #04958873
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Start-VBRHvRestoreVM Specify Hyper-V Switch
I don‘t find it either.
You could use as a workaround a hyperv command to connect the vm to a virtual switch after restoring the vm. Something like that:
https://docs.microsoft.com/en-us/powers ... ver2019-ps
You could use as a workaround a hyperv command to connect the vm to a virtual switch after restoring the vm. Something like that:
https://docs.microsoft.com/en-us/powers ... ver2019-ps
Code: Select all
Get-VMNetworkAdapter -VMName Test1 | Connect-VMNetworkAdapter -SwitchName InternetAccess
Product Management Analyst @ Veeam Software
-
- Veeam Software
- Posts: 2010
- Liked: 670 times
- Joined: Sep 25, 2019 10:32 am
- Full Name: Oleg Feoktistov
- Contact:
Re: Start-VBRHvRestoreVM Specify Hyper-V Switch
Hi @QoX8x,
Currently there is no way to specify virtual switch during Hyper-V Entire VM Restore through PS.
The workaround would be to connect network adapters after restore as Fabian showed above.
Thanks,
Oleg
Currently there is no way to specify virtual switch during Hyper-V Entire VM Restore through PS.
The workaround would be to connect network adapters after restore as Fabian showed above.
Thanks,
Oleg
-
- Novice
- Posts: 7
- Liked: 1 time
- Joined: Aug 10, 2021 2:02 pm
- Contact:
Re: Start-VBRHvRestoreVM Specify Hyper-V Switch
All my VM's connect to the same switch, so I was using
It's just a bit of a pain when all my VM NIC's are on different VLAN's.
Thank you for your help.
Code: Select all
get-vm | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName "Switch01"
Thank you for your help.
-
- Product Manager
- Posts: 9848
- Liked: 2607 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: Start-VBRHvRestoreVM Specify Hyper-V Switch
Glad it helped
Yes, it could be a pain.
You could filter the name of the adapter in the output of the Get-vmnetworkadapter command, if you have multiple vlan/switches.
Yes, it could be a pain.
You could filter the name of the adapter in the output of the Get-vmnetworkadapter command, if you have multiple vlan/switches.
Product Management Analyst @ Veeam Software
Who is online
Users browsing this forum: No registered users and 4 guests