4

I am trying to change a vCenter Server Appliance static IP address.

If I follow VMware documentation here I get the following message

IPv4 configuration for nic0 of this node cannot be edited post deployment.

Logging in through console doesn't allow me to change the address.

Editing /etc/sysconfig/networking/devices/ifcfg-eth0 will cause permission issues.

Executing /opt/vmware/share/vami/vami_config_net in shell gives the error ImportError: No module named libxml2mod

I have tried to install libxml2mod with Zypper but can't find this specific package and already have libxml installed.

How can I change my IP address?

vCSA is version 6 build 2562643

minus8
  • 72
  • 1
  • 1
  • 7

2 Answers2

6

It sounds as though you may have used an IP address rather than a FQDN for the vCenter name during installation. If that is indeed the case, you may be out of luck:

Prerequisites

To change the IP settings of the vCenter Server Appliance, make sure that the system name of the appliance is an FQDN. If, during the vCenter Server Appliance deployment, you set up the appliance to use an IP address as a system name, you cannot change the IP settings.

(From: Configuring the vCenter Server Appliance by Using the Direct Console User Interface )

Brandon Xavier
  • 2,022
  • 13
  • 15
  • 1
    I just wanted to add . . . if this is in fact the case, you might as well bite the bullet now and reinstall vCenter. You *might* be able to circumvent VMware's protections against changing the IP, but you'll forever be running into troubles where the original IP was written into various obscure configuration files. (whereas with a FQDN, you'd just update DNS) – Brandon Xavier Aug 23 '15 at 03:08
  • Thanks for this, you're right, I did use an IP address. VMware documentation is awful- unless I'm missing something, the link I posted in the question doesn't mention that. – minus8 Aug 23 '15 at 11:25
  • 1
    You're not missing anything (this fact is not mentioned in THAT section) and the documentation is awful. IMHO, VMware should STRESS this limitation in all the documentation referring to the system name, including the ramifications of using an IP rather than a FQDN (not just " , , , a FQDN is recommended . . .") – Brandon Xavier Aug 23 '15 at 13:12
  • (and reverse DNS is helpful, too) – ewwhite Aug 23 '15 at 15:47
2

I didn't feel like redeploying vCenter Server Appliance, so I took a risk and edited the raw linux networking config. Not the approved solution, but it seems to be working fine. If it stops working, then I'm right back where I started (needing to redeploy).

Go to the appliance management page and enable the SSH login and Bash shell:

https://static-ip-address:5480

enter image description here

Then ssh to the appliance. Login as root, and the default password is vmware. If you set a password for the appliance for the web client, then use that password with the root username.

Connected to service

    * List APIs: "help api list"
    * List Plugins: "help pi list"
    * Enable BASH access: "shell.set --enabled True"
    * Launch BASH: "shell"

Command>

Launch the shell by typing the command "shell"

shell

edit the interfaces config in linux

 vim /etc/sysconfig/networking/devices/ifcfg-eth0

and you should see something like this

DEVICE=eth0
BOOTPROTO='static'
STARTMODE='auto'
TYPE=Ethernet
USERCONTROL='no'
IPADDR='10.8.3.11'
NETMASK='255.255.255.0'
BROADCAST='10.8.3.255'

Make the changes you want, then restart the networking service.

localhost:~ # service network restart
Shutting down network interfaces:
    eth0      device: VMware VMXNET3 Ethernet Controller                    done
Shutting down service network  .  .  .  .  .  .  .  .  .                    done
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
    eth0      device: VMware VMXNET3 Ethernet Controller
    eth0      IP address: 10.8.3.11/21                                      done
Setting up service network  .  .  .  .  .  .  .  .  .  .                    done
steampowered
  • 633
  • 2
  • 11
  • 25