I am trying to make some code work. I made it so we can call a restore from Veeam. VM gets powered off, restored and Powered on. But after the power on it loses the connection to its vNetwork adapter. After restore the checkbox for connect at power on gets unchecked. Is there a reason for this?
My code checks for IP after the restore, so now it fails because there is no network adapter.
Version is 6.5.0 btw.
Thanks in Advance,
Moderator: Moved to vSphere
There is probably some reason why you do it via code, otherwise using the "Restore wizard" from the console is simpler.
This command restores data for all machines or for the selected machine from the backup file.
Yeah the reason I do it via code is because its a custom web-app which the end-user uses to maintain there own VMs.
So I just build in a Restore Functionality, which works in veeam etc, but in the end the Network adapter dont automatically connect, when powering back on the VM after restore.
Then when it does health and tool checks, the vm doesnt return an IP address, so this part fails.
I was looking for a reason, why this happens. And of-course a possible solution.
This behavior doesnt happen when for example I power off and on the VM, then the check-boxes dont uncheck automatically.
So to me it seems it has to do with the way vSphere handle the restore action.
It could be a desired setting ... let me explain better, if you restore a VM in the same environment, you could hypothetically have an IP conflict, therefore not enabling the network card the problem does not exist.
If you analyze the recovery screen through the wizard, you can see that there is an option to enable the network connection. you need to insert the command in the script that enables the network ... that I am looking for in the Veeam forum.
Step 9. Verify Instant VM Recovery Settings:
As soon as they reply, I write to you
You can enable the network of the VM in which you are performing the "Restore" using the "veeampssnapin" commands in the script.
Follow the examples in the "VMRestore -> Start-VBRRestoreVM" section:
So i made a few advancements,
Our webapp is in Django so I cant use the scripting.
We use Full VM restore to original location.
I found out in "well hidden" logs that Veeam: 'forcibly disconnects all Network adapters due to VM options'
This only happens when calling the restore via the codebase, and not when doing a Full VM restore in Veeam B&R. (then everything works how intended)
I made it so that through the vSphere API, we connect the vNIC after the vm_restore function.
Now the problem arise that the network adapter losses his Static IP address that we need for validation. The Edge Gateway just gives it a new "random" IPv6 address.
So my next question is: Can we do something about that? Can we do that via API, can we change back the IP this way? Or can we send something that specifies the static IP?
Thanks for your answers and in advance,