VMware vSphere

 View Only
  • 1.  Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 11:17 AM

    I have ESXi installed onto HP BL460c G6 blades. I enabled SSH on a test system that had a physical keyboard on it, however I have seem to run into a problem with the blades.

    I can get to the "hidden" console, and I can get into vi as I need to edit /etc/hosts however once I am in vi I can not get back out. Escape just does not work nor any combination of commands, I have tried it via ILO and through the console with the adaptor supplied by HP

    So any idea how I can get round this?

    Thanks



  • 2.  RE: Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 11:29 AM

    You can't edit the host file from the VI client, you can modify the DNS settings under configuration or via the console and F2.

    To edit and the hosts file use the unsupported mode Alt-F1 (sounds like you can get there) type unsupported, login with the root or another user.

    Enter the command vi /etc/hosts and then make your changes.

    To get out of the console type quit or exit and then press F1 or F2 can't remember which to return the main screen.



  • 3.  RE: Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 12:41 PM

    The problem is once I have loaded up vi, I can NOT exit out of it

    Kimbie



  • 4.  RE: Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 01:09 PM

    By "loaded up vi" you mean the VI client/vSphere client right?

    To exit simply close it with, it the application is not responding for whatever end task it.

    To exit unsupported console access press Alt+F2, this returns you to the DCUI mode.

    Otherwise please be more specific as to what you are trying to do.



  • 5.  RE: Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 03:24 PM

    I am logged onto the remote console of my blade server through ILO, I have the grey and yellow screen.]

    I do Alt-F1 to get to the black screen, type "unsupported" put in root password then get the prompt

    I then type "vi /etc/hosts

    I then add the entries I need to.

    This is the bit I am having problems with...

    Now I should be able to push the Escape key, get the vi command line type :wq and it will save and quit vi.

    I get the exact same problem when doing this in front of the server with a physical keyboard

    Kimbie



  • 6.  RE: Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 05:29 PM

    use Ctrl-[ instead of Esc



  • 7.  RE: Cant exit vi to edit my hosts file

    Posted Jan 14, 2010 05:35 PM

    You could also use vifs from the vCLI to edit the file - http://www.vm-help.com/esx/esx3i/esx_3i_rcli/vifs.php.




    Dave

    VMware Communities User Moderator

    Now available - vSphere Quick Start Guide

    Do you have a system or PCI card working with VMDirectPath? Submit your specs to the Unofficial VMDirectPath HCL.