Sunday, May 21, 2017

Troubleshoot Hyper V issue - Cannot Connect to Virtual Machine

This is learning note.
Copy from
Client Hyper-V "Cannot Connect to Virtual Machine
Solution from Taylor Brown


If not we should enable some additional logging if possible to see what is going on.
  1. Shutdown any running VM’s
  2. Close all of the Hyper-V UI
  3. Stop the VMMS service (net stop vmms)
  4. Enable Analytic logging for the VMMS and Worker Process (see below)
  5. Enable UI Tracing for Hyper-V Manager and VMConnect (see below)
  6. Start the VMMS service (net start vmms)
  7. Open Hyper-V Manger
  8. Restart the VM
  9. Attempt to connect (try two or three times)
  10. Gather Logs (see below)
  11. Disable Tracing (see below)
Enabling Analytic Logging For the VMMS and Worker Process
  1. Open the Event Viewer
  2. From the menu bar select View -> Show Analytic and Debug Logs
  3. Navigate to the Hyper-V logs and Enable the Analytic Channels
Applications and Services Logs
                Microsoft
Windows
Hyper-V-VMMS
                                                                Analytic
                                                                                Right Click -> Enable (yes if a pop up asks about enabling the logs)
Hyper-V-Worker
                                                                Analytic
                                                                                Right Click -> Enable (yes if a pop up asks about enabling the logs)
Enabling UI Tracing
  1. Create a new text file named “VMClientTrace.config” in the "%appdata%\Microsoft\Windows\Hyper-V\Client\1.0\” folder
  1. Copy the following XML text into that file:

Save the file.
Gathering The Logs
  1. The Analytic logs will be in the analytic folder (you often have to refresh or select another source then analytic again to see them)
  2. The UI trace Logs will be in %temp% (sometime back one directory i.e. %temp% = “C:\Users\taylorb\AppData\Local\Temp\2” for me but the logs are at “C:\Users\taylorb\AppData\Local\Temp”
Disabling Tracing
  1. To disable Analytic Tracing just right click on the analytic sources and select disable (same as enabling)
  2. To disable UI tracing just delete the “%appdata%\Microsoft\Windows\Hyper-V\Client\1.0\VMClientTrace.config” file.





No comments: