10

I have installed a vCenter 5.1 appliance (VCSA) on physical server on a particular network, and assigned it an internal IP. This server (Dell R620) then went to a remote hosting location, where it is connected to a network with has a totally different IP and subnet.

So what I need to do now is change the vCenter server's IP to one I can remotely connect to.

I can only Launch the Console of the appliance from within the Host machine itself.

enter image description here

How do I change the appliance IP using command line (logged in as root)?

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
Saariko
  • 1,791
  • 13
  • 45
  • 73

4 Answers4

18

I found a comfortable way of doing this here:

Allocate a static IP address to the VMware vCenter Server Appliance (VCSA) | Ivo Beerens' Blog

It also allows you to change hostname, DNS, default gateway and proxy.

To sum it up:

  • Open a console session of the VCSA
  • Login as: root
  • Default password is: vmware
  • Execute the following command: /opt/vmware/share/vami/vami_config_net
  • After executing the command, a menu is displayed. Within the menu It is possible to change the IP address, hostname, DNS, Default gateway and proxy server.

After allocating a static IP Address to the VCSA, the post configuration can be done by using the following URL:

https://static-ip-address:5480
Jonas Eicher
  • 296
  • 2
  • 5
  • 1
    I just had to do this twice this week. This is correct. – ewwhite Aug 13 '14 at 14:42
  • 2
    To get this to work I had go into the `http://:5480` interface and select Administration → Certificate Regeneration Enabled. I found that setting on this [VMware KB page](http://kb.vmware.com/selfservice/search.do?cmd=displayKC&docType=kc&docTypeID=DT_KB_1_1&externalId=2058430). Rebooting several times may also have helped. – andrew.n Nov 02 '15 at 17:19
  • 1
    @andrew.n I confirm multiple reboot maked it work after the ip was changed, 3 reboot to be exact in my case ... – yagmoth555 Jan 19 '17 at 02:31
4

I can't recall which specific Linix distro the VCA is built on but I think it's a RHEL variant, so just edit /etc/sysconfig/networking/devices/ifcfg-eth0 as root, it's all very obvious from there. Then just reboot or restart the networking service for the changes to come in.

Saariko
  • 1,791
  • 13
  • 45
  • 73
Chopper3
  • 100,240
  • 9
  • 106
  • 238
  • 1
    great, the file is /etc/sysconfig/networking/devices - what I do with the 'BROADCASTING' address? what is that? Gateway? – Saariko Dec 21 '12 at 10:17
  • 2
    The broadcasting address is the broadcast address of your network. You can use http://www.subnet-calculator.com/ to calculate it, if you don't know what it is. – Dan Dec 21 '12 at 10:20
  • 1
    Didn't work until I symlinked to /etc/sysconfig/network/ifcfg-eth1 as per http://vninja.net/virtualization/adding-secondary-nic-vcenter-5-1-appliance-vcsa/ – trinth Dec 04 '13 at 21:04
  • 2
    Do NOT merely edit this file when changing the IP! You will receive errors with the Inventory and STS (secure token service, part of the SSO suite). These components must re-register under the new URL. The much better way is the way the vendor supports, in Jonas' answer below. – Tohuw Oct 31 '14 at 04:22
2

The correct way of changing vCenter IP is indeed running: /opt/vmware/share/vami/vami_config_net from the console of the vCenter. Another way is from the VAMI itself (https://vcenter:5480) if you have access. Make sure to perform certificate regeneration after the IP change. One of the SANs (subject alternative names) of the certificate is the IP itself, hence you have to regenerate it even if the name does not change.

Login to VAMI , go to "admin" and tick "certificate regeneration enabled" to "yes". Reboot and give it some time to finish the certificate regeneration. Could take 15-20 mins. You can track the progress in the console. Once the process of certificate regeneration is finished and the console gets to the login screen, login to the VAMI again, go to "admin" and set "certificate regeneration enabled" to "no".

Alternative certificate regeneration method is described in Regenerating Self-Signed SSL Certificates in VMware vCenter Server appliance 5.1 or 5.5 (2070603) | VMware Knowledge Base

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
0

You can also do this from the GUI on the actual appliance. You use your browser to log into the appliance, then go to the "network" section and you can set it all there.

enter image description here

HBruijn
  • 72,524
  • 21
  • 127
  • 192
jlkansascity
  • 151
  • 1
  • 1
    A nice command line interface. Glad to see you've read the question carefully. – Deer Hunter Dec 02 '15 at 07:14
  • 1
    I was offering this as an alternate, in case other users had similar but not identical questions. You can tell that because I started by "you can also..." I'll have to keep in mind that this site is perhaps much more rigid, and not add anything beyond the very specific question. – jlkansascity May 03 '16 at 20:46