How to sort the MUI’s list of Virtual Machines

This week I found out a way of sorting the list of VMs as it appears in the ESX MUI. By default the list of VMs in the MUI are sorted by the order of the VMs created or by the order they are registered (which can be the same thing). You can sort the VMs alphabetically or re-order them based on your own preference by using the Service Console

  1. Logon to the Service Console as ROOT
  2. Sort the vmlist – by using the sort command piped to a new file, and then copy sorted vmlist over the original vmlist with:

    sort /etc/vmware/vm-list > /etc/vmware/vm-listsorted


    cp /etc/vmware/vm-listsorted /etc/vmware/vm-list

  3. Press [ENTER] to over-write the original file
  4. Restart the vmware-serverd and vmware httpd daemons with

    service vmware-serverd restart
    service httpd.vwmare restart

    If you are using vCenter restart the ccagent service from the vCenter client instead using

    Right-click the ESX Host
    Click the Advanced Tab and click the Restart button

    Alternatively, kill the ccagent process from the Service Console (ESX will automatically restart it…) with:

    ps -ef | grep ccagent

    Requires Free Membership to View

  1. and then

    kill pidno, in my case kill 27023

    If you have the vCenter client open, this should force a “reconnecting…” event
    If you log on to the ESX MUI you should find the VM list is sorted alphabetically…

    If this fails to generate the list you require, simply edit the vmlist with nano – and reorder… be sure to backup the file before you do this. 


This was first published in March 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.