vSphere Client Hostname Issue

Discussion in 'General Server' started by Rory Glenn Pascua, Mar 8, 2012.

  1. Rory Glenn Pascua

    Rory Glenn Pascua New Member

    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    I can access some of my stacks via hostname and some via IP address like so:
    1. ssh root@stack1.vm.org.net
    2. ssh root@130.72.86.13


    What config changes do I need to make so I can access all my stacks via Hostname? I get this error message when trying to access a stack using option 1 above. "Could not resolve hostname stack1.vm.org.net: Name or service not known"

    Here's what I've done so far:

    1. I looked at an old stack and compared network settings with a new stack
    2. I checked firewall settings
  2. Akendo

    Akendo New Member

    Messages:
    136
    Likes Received:
    7
    Trophy Points:
    0
    Where do you think is this name set? The problem here is quite easy. Set a entry in your /etc/hosts that point to your VM.

    so far
    akendo
  3. Rory Glenn Pascua

    Rory Glenn Pascua New Member

    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    0
    Thank you Akendo. I fixed the problem by manipulating DNS (forward and reverse). It's the hard way to fix this type of problem, but lucky me I have rockstar co-workers.
  4. Akendo

    Akendo New Member

    Messages:
    136
    Likes Received:
    7
    Trophy Points:
    0
    That would my next point ;-). Glad you could solve it by yourself.

    so far
    akendo
  5. mrnothersan

    mrnothersan New Member

    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    0
    You should need to edit /etc/hostname although I'm not sure if that would work for you. Sometimes you need to edit the sysconfig network settings I believe.
  6. Stefano Messicano

    Stefano Messicano New Member

    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    0
    You could try with this:Run this command to set the IP address:[root@server root]# esxcfg-vswif -i a.b.c.d -n w.x.y.z vswif0
    where a.b.c.d is the IP address and w.x.y.z is the subnet mask.
    Note: In this example, vswif0 is the Service Console adapter that is the interface to which you are applying the IP address change.
    Open the /etc/hosts file with a text editor and modify it so that it reflects the correct IP address and hostname.Note: You may also need to verify and change the file /etc/vmware/esx.conf file for the hostname and IP address.
    To change the default gateway address and the hostname, edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values.
    For the changes to take place, restart the network service with the command:[root@server root]# service network restart
  7. Famous

    Famous New Member

    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    Connect to your host using vSphere client, go to the configuration and then select "DNS and Routing" option.

    You would see your host name and domain under "Host Identification" section.

    Press "Properties" and change your host name.

    Related screen shot has been attached.

Share This Page