Translate

Total Pageviews

My YouTube Channel

Monday 26 August 2013

Answering a virtual machine related question from the command line(1026835)


Symptoms

  • You are unable to start a virtual machine after you copy or move it to a different host.
  • You are unable to start a virtual machine after resolving a problem with a datastore.
  • No questions are displayed in the vSphere Client.

Resolution

This issue may occur if:
  • You do not have vSphere Client.
  • vSphere Client cannot connect to the host to answer the initial question.
  • vSphere Client cannot connect to vCenter Server to answer the initial question.
To resolve this issue, run a vim-cmd command that sends the answer for the startup question to the virtual machine.
 
To run the command:
  1. Check for the question in the vmware.log file in the virtual machine directory. For example:

    Mar 30 06:03:52.988: vmx| Msg_Question:
    Mar 30 06:03:52.988: vmx| [msg.uuid.altered] This virtual machine may have been moved or copied.
    Mar 30 06:03:52.988: vmx|
    Mar 30 06:03:52.988: vmx| In order to configure certain management and networking features VMware ESX needs to know which.
    Mar 30 06:03:52.988: vmx|
    Mar 30 06:03:52.988: vmx| Did you move this virtual machine, or did you copy it?
    Mar 30 06:03:52.988: vmx| If you don't know, answer "I copied it".
    Mar 30 06:03:52.988: vmx|
    Mar 30 06:03:52.988: vmx| ----------------------------------------
  2. If you have received the question, run this command to determine the virtual machine ID:

    [root@user ~]# vim-cmd vmsvc/getallvms
    80 VC4.1-user [datastore1] VC4.1-user/VC4.1-user.vmx winLonghorn64Guest vmx-07


    For example, in this output, the virtual machine ID is 80.
  3. Run this command to get the question ID:

    root@user ~]# vim-cmd vmsvc/message 80

    You see output similar to:

    Virtual machine message 12:
    msg.uuid.altered:This virtual machine may have been moved or copied.


    To configure certain management and networking features VMware ESX needs to know which.

    Did you move this virtual machine, or did you copy it?
    If you don't know, answer "I copied it".

    0. Cancel (Cancel)
    1. I _moved it (I _moved it)
    2. I _copied it (I _copied it) [default]


    In this example the question ID is 12, and there are three choices: 0, 1, 2.
  4. To answer the question, run this command with the virtual machine ID and the Question ID followed by the choice number.

    [root@user ~]# vim-cmd vmsvc/message VM_ID 12 2
    For example to answer the question with choice 2, run:

    [root@user ~]# vim-cmd vmsvc/message 80 12 2
    The parameters in order are: 80 is the virtual machine ID, 12 is the question ID, and 2 is the choice number.

    Note: In vSphere Client 5.x, if you see Virtual machine message _vmx1, run the command:
     
    [root@user ~]# vim-cmd vmsvc/message VM_ID _vmx1 2

    Source:-

No comments:

Post a Comment