VMware Cloud Community
Foxdemon
Enthusiast
Enthusiast

Losing network adapter connectivity after restore with Veeam

Hi all,

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,

Henri

0 Kudos
6 Replies
scott28tt
VMware Employee
VMware Employee

Moderator: Moved to vSphere


-------------------------------------------------------------------------------------------------------------------------------------------------------------

Although I am a VMware employee I contribute to VMware Communities voluntarily (ie. not in any official capacity)
VMware Training & Certification blog
0 Kudos
Alex_Romeo
Leadership
Leadership

Hi,

There is probably some reason why you do it via code, otherwise using the "Restore wizard" from the console is simpler.

Step 1. Launch Full VM Restore Wizard - Veeam Backup Guide for vSphere

pastedImage_1.png

----------------------------

This command restores data for all machines or for the selected machine from the backup file.

Restoring VMs from Backup - Veeam Backup Guide for vSphere

ARomeo

Blog: https://www.aleadmin.it/
Foxdemon
Enthusiast
Enthusiast

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.

0 Kudos
Alex_Romeo
Leadership
Leadership

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:

pastedImage_0.png

As soon as they reply, I write to you

ARomeo

Blog: https://www.aleadmin.it/
Alex_Romeo
Leadership
Leadership

Hi,

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:

Start-VBRRestoreVM - Veeam Backup PowerShell Reference

ARomeo

Blog: https://www.aleadmin.it/
0 Kudos
Foxdemon
Enthusiast
Enthusiast

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,

Henri

0 Kudos