PowerShell script exchange
Post Reply
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Changing IP of vCenter

Post by flavor4real »

Hello,
We are planning to switch/upgrade our current vCenter. Now since the vCenter is added over IP to the Veeam Backup Environment, do we have to remove and add the new vCenter with its new IP on the Veeam Backup environment? All of our VM's will be moved over without issues and we'll not be able to keep the IP of the existing vCetner to use on the new vCenter.

Thx
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Changing IP of vCenter

Post by Sethbartlett » 1 person likes this post

If you have powershell installed, can do the following:

Code: Select all

$server = Get-VBRServer | ?{$_.name -eq "IpOfVC"}
$server.SetName("NewIP")
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Re: Changing IP of vCenter

Post by flavor4real »

yup i got powershell installed

so if i type

$server = Get-VBRServer | ?{$_.name -eq "IpOfVC"} <<<< existing IP (IpOfVC)
$server.SetName("NewIP") <<<<< new IP (NewIP)

that should work?
I do a bit of PS but not that much ...
flavor4real
Expert
Posts: 205
Liked: 5 times
Joined: Nov 22, 2010 7:57 pm
Full Name: DS
Contact:

Re: Changing IP of vCenter

Post by flavor4real »

I found out that our VM Admin will change the vCenter name/ip, so the solution would be..

$Server = Get-VBRServer | ?{$_.name -eq "VCName/IP"}
$Server.SetName("NewVCName/NewIP")

Thanks for the help ...
vmbackupuser
Enthusiast
Posts: 48
Liked: 2 times
Joined: Nov 09, 2009 5:18 pm
Contact:

Re: Changing IP of vCenter

Post by vmbackupuser »

Is the above powershell procedure the only way to change the hostname/ip of the vcenter in VeeamBackup in order to point existing backups to a new vcenter?

I'm sure not many of your customers (SMB) would be familiar nor comfortable with Powershell scripting to make config changes to Veeam.
In the shorter term, would your Tech Support be able to perform this change (via Webex) for customers who are not powerhsell savvy?

We are planning our vSphere5 upgrade, and would need migrate our 32bit VC4 DB to a new 64bit VC5 server. I believe that in the coming months a number of your customers would have this same requirement.

FEATURE REQUEST: In an upcoming v6 service release, would it be possible to provide a GUI method for changing the name/ip of the vCenter in Veeam to facilitate users that want to point their existing backups to the new vcenter.

NB. I have also seen other forum posts that suggest re-using the old VC ip in the hosts file of the Veeam server etc, but we do not have that luxury in this situation > Changing VC IP/address
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Changing IP of vCenter

Post by Sethbartlett »

Can you go ahead and make a ticket and come back here with the ticket # and request that I go ahead and take the case?
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
vmbackupuser
Enthusiast
Posts: 48
Liked: 2 times
Joined: Nov 09, 2009 5:18 pm
Contact:

Re: Changing IP of vCenter

Post by vmbackupuser »

Thanks for the offer of assistance Seth. I'll have to defer this until our planned vSphere 5/Veeam 6 upgrade in a couple months. I'm just documenting the steps reqd now, so as to be aware of any potential issues.

Thanks again.
Sethbartlett
Veteran
Posts: 282
Liked: 26 times
Joined: Nov 10, 2010 6:51 pm
Full Name: Seth Bartlett
Contact:

Re: Changing IP of vCenter

Post by Sethbartlett »

Sure :) It's very simple and only those two commands and you're good. But if you're still concerned in a few months, please don't hesitate to make a ticket.
Skype: Sethbartlett88 - Make sure to label who you are and why you want to add me ;)
Twitter: @sethbartlett
If my post was helpful, please like it. Sometimes twitter is quicker to hit me up if you need me.
vmbackupuser
Enthusiast
Posts: 48
Liked: 2 times
Joined: Nov 09, 2009 5:18 pm
Contact:

Re: Changing IP of vCenter

Post by vmbackupuser »

Hi Seth, would you be able to assist me with this today? My case ref is ID#5180227

We upgraded to vCenter5 on a new VM lastnight, and now need to change the name of our vCenter server in Veeam VBR5 without losing our backups or Veeam config.

Also, can you advise if its safe to change the User Account that Veeam uses to connect to vCenter?

regards,
greendx
Influencer
Posts: 13
Liked: never
Joined: May 18, 2011 2:06 pm
Full Name: Eugene Lipsky
Location: New York
Contact:

Re: Changing IP of vCenter

Post by greendx »

So in my case I have 3 vCenters (prod, lab and DR) in my environment and 3 Veeam 5 servers with multiple jobs each with multiple VMs. There are some jobs that have VMs from different vcenters. I'm about to upgrade my prod to vsphere 5. Most of my VMs across all veeam servers are prod VMs that will be affected by this upgrade. Any suggestions on how to avoid re-creating all of my jobs? Maybe a modified powershell script to use on specific jobs rather than on veeam servers?
ahmsafeer
Novice
Posts: 5
Liked: never
Joined: Jan 22, 2013 10:00 am
Full Name: Ahamed Safeer
Contact:

Re: Changing IP of vCenter

Post by ahmsafeer »

Hi I am getting an error when running the script.

PS C:\PoweShell Script> $Server = Get-VBRServer | ?{$_.name -eq "xxxxxx"}
PS C:\PoweShell Script> $Server.SetName("yyyyyy")
You cannot call a method on a null-valued expression.
At line:1 char:16
+ $Server.SetName <<<< ("yyyyy")
+ CategoryInfo : InvalidOperation: (SetName:String) [], RuntimeEx
ception
+ FullyQualifiedErrorId : InvokeMethodOnNull
ahmsafeer
Novice
Posts: 5
Liked: never
Joined: Jan 22, 2013 10:00 am
Full Name: Ahamed Safeer
Contact:

Re: Changing IP of vCenter

Post by ahmsafeer »

Hi All,

I was successfully to change the VC name.
But the Problem now is the backup job is getting failed.
Its showing error as "the object is not found"
Vitaliy S.
VP, Product Management
Posts: 27377
Liked: 2800 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Changing IP of vCenter

Post by Vitaliy S. »

Ahamed, please contact our technical support team for backup debug logs review.
Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests