-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Aug 20, 2014 1:00 pm
- Contact:
Script to disable "connect at power on" on the replica
I'm trying to find the job setting or a post job script to disable the NIC's "connect at power on" on the replica. I do not want the replica's NIC to be enabled.
thanks
thanks
-
- Product Manager
- Posts: 14844
- Liked: 3086 times
- Joined: Sep 01, 2014 11:46 am
- Full Name: Hannes Kasparick
- Location: Austria
- Contact:
Re: Script to disable "connect at power on" on the replica
Hello,
what do you think about using VMware powercli? Because a failover just starts a VM.
Best regards,
Hannes
what do you think about using VMware powercli? Because a failover just starts a VM.
Code: Select all
Set-NetworkAdapter -Connected:$false -Confirm:$false
Hannes
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Script to disable "connect at power on" on the replica
Neither replication job nor replication failover has "Connect VM to network" as configurable setting, so, there is no way to modify it via Veeam PowerShell Snap-in. So, PowerCLI proposed by Hannes seems like the only option. Thanks!
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Aug 20, 2014 1:00 pm
- Contact:
Re: Script to disable "connect at power on" on the replica
Hi, thanks for the suggestions. The problem is we re-run the replication job each night to keep them in sync until we failover to the replica (using this for v2v migrations). So if I set it on the replica, it will be overwrite after each job.
If I create a script and set it to "Run the following script after the job",so it's set after each run, how do I pass it the vm name?
thanks again.
If I create a script and set it to "Run the following script after the job",so it's set after each run, how do I pass it the vm name?
thanks again.
-
- Product Manager
- Posts: 20415
- Liked: 2302 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Script to disable "connect at power on" on the replica
You might set vm names as static values, if the list of replicated VMs does not change much.
Otherwise, you can use Get-VBRJobObject cmdlet to get replication job source objects. The objects will have name property.
Thanks!
Otherwise, you can use Get-VBRJobObject cmdlet to get replication job source objects. The objects will have name property.
Thanks!
-
- Enthusiast
- Posts: 39
- Liked: 4 times
- Joined: Aug 20, 2014 1:00 pm
- Contact:
Re: Script to disable "connect at power on" on the replica
thank you, I will give that a try
-
- Enthusiast
- Posts: 36
- Liked: 7 times
- Joined: Sep 07, 2021 5:37 pm
- Full Name: TW
- Contact:
Re: Script to disable "connect at power on" on the replica
I know it's an old post, but in case anyone else ends up here looking for an answer like me -
Using the code described by tsightler at the link below works on a pre or post script to get a list of VM's in the running job.
powershell-f26/powershell-cmd-let-to-ge ... 64181.html
Starting with that script and then feeding the list of VM's into PowerCLI your pre or post script can help you manipulate VM's in vcenter.
Using the code described by tsightler at the link below works on a pre or post script to get a list of VM's in the running job.
powershell-f26/powershell-cmd-let-to-ge ... 64181.html
Starting with that script and then feeding the list of VM's into PowerCLI your pre or post script can help you manipulate VM's in vcenter.
Who is online
Users browsing this forum: No registered users and 2 guests