Подключение к виртуальной машине ошибка

This post offers fixes to resolve the issue where users can’t connect to a Hyper-V virtual machine (VM) running on a Windows Server or client host machine. The suggestions presented in this post are applicable depending on the instance of the error message you have received.

Can’t Connect to Hyper-V Virtual Machine

When you try to connect to a virtual machine (VM) in Microsoft Hyper-V Manager, you may receive the following error messages:

Error message 1

Virtual Machine Manager lost the connection to the virtual machine because another connection was established to this machine. Try to connect again. If the problem persists, contact your system administrator. Would you like to try to reconnect?

Error message 2

Cannot connect to the virtual machine. Try to connect again. If the problem persists, contact your system administrator. Would you like to try connecting again?

Error message 3

An error occurred while attempting to connect to server <Name>. Check that the Virtual Machine Management service is running and that you are authorized to connect to the server. The computer <Name> could not be resolved. Make sure you typed the machine name correctly and that you have network access.

Below are some of the possible reasons why you can’t connect to a virtual machine in Hyper-V.

  • The VM is turned off.
  • The VM is running on a different host server than the one you’re trying to connect to.
  • The connection between the host server and the VM was interrupted.
  • The wrong network adapter is selected.
  • The network adapter is not attached to the correct virtual switch.
  • There’s a problem with the network adapter in the VM.
  • There’s a problem with the physical network adapter.

Read: The VMware Authorization Service is not running

In a typical scenario, the user has 2 Hyper-V 2012 R2 hosts, and they each have about 5 VMs on them. On one of the hosts, the user can connect to every single VM via Hyper-V Manager. On the other host, the user can only connect to the VM in Hyper-V Manager IF the machine is part of the domain. If the machine is not part of the domain, then the user receives the Error message 2. In another instance where 2 user accounts exist named User1 and User2. User1 isn’t configured in SCVMM anywhere while User2 is a member of a self-service user role in SCVMM and is the owner of a VM. Now, User1 logs on to a Windows client and connects to the SSP where they authenticate as User2, and the VM owned by User2 is selected from the list, and click the Connect to VM button, the Error message 1 above is displayed.

If you’re unable or can’t connect to Hyper-V Virtual Machine and you receive any of the error messages shown above, then our recommended fixes will help you resolve the issue.

  1. Initial checklist
  2. Reboot the VM
  3. Run the MOFCOMP command
  4. Store user credentials
  5. Remove old iSCSI/SCSI controllers/connections
  6. Enable IPv6
  7. Change Windows Security settings
  8. Turn off the Enhanced Session Mode Policy

Let’s see these mentioned fixes in detail.

Read: Virtual machine could not be started because the hypervisor is not running

1] Initial checklist

Initial checklist - Configure/Create Virtual (external) Switch

Suppose you’re having trouble connecting to a virtual machine in Hyper-V Manager. In that case, you can carry out the following pre-checks or tasks (in no particular order) and see if anything helps before you proceed further.

  • If you’re authorized to connect to the server, ensure that the Virtual Machine Management service is started and running in Windows Services Manager. This mainly applies to Error message 3.
  • Ensure that the virtual machine is turned on and that you use the correct credentials.
  • Check the Hyper-V Manager settings to ensure that you’re connecting to the proper virtual machine.
  • If you’re using an HTTP or HTTPS proxy server to connect to the Internet, ensure that your proxy settings are correct in Internet Options > Connections > LAN Settings.
  • Make sure to enable connections in the Hyper-V Manager. To do this, open Hyper-V manager and select the server. In the right pane, click on the hypervisor’s name to open the Hyper-V settings window. In the left pane of this window, click on Virtual Machine Connection to open the VM connection settings in the right pane. Now, checkmark the Enable VM Connections option and click OK to save the changes.
  • Update the Network adapter driver.
  • Make sure to create a Virtual (external) Switch to allow remote access to Hyper-V VM from LAN & Internet. Once created, in the Hyper-V Manager right-click the virtual machine and go to Settings > Network Adapter > Virtual switch. Select the external switch you created. Click OK to save VM settings.

Read: Fix Error applying Virtual Switch Properties changes in Hyper-V

  • Check the VM’s settings to ensure that remote management is enabled. You can also set up a port forwarding rule on your gateway (for instance, a wireless router) to access your virtual machine remotely from any place on the planet. You can restore the listener configuration by running the following command: winrm invoke Restore winrm/Config.
  • If the VM is running on a remote server, ensure that you have network connectivity to that Hyper-V server.
  • Make sure the Virtual Network Manager is correctly configured. In Hyper-V Manager, under Actions in the right pane, select Virtual Network Manager. In Virtual Network Manager, ensure that the virtual machine’s network adapter is connected to an external or internal network.
  • Ensure the VM is not running on a different host server than the one you’re trying to connect to.
  • Restart the Hyper-V Manager service.

Read: Error 0x80370102, Virtual machine could not be started

  • Recreate the virtual machine.
  • Reset the network adapter.
  • Make sure the Integration Services components are updated. Connect to the VM, and then follow the instructions in Update integration services for a Linux virtual machine or Update integration services for a Windows virtual machine.
  • If you’re running Docker in WSL 2, you can disable the WSL 2-based engine. Wait for the docker desktop to recreate/mount the DockerDesktopVM, then re-enable the WSL 2-based engine, and enable it in your distro.
  • If you’re using Hyper-V Manager to connect to a virtual machine on another computer, then make sure the Virtual Machine Connection tool is installed on the computer you’re using to connect to the virtual machine. You can find this tool in the Administrative Tools folder.
  • If you’re connecting to a remote virtual machine, make sure Remote Desktop connections are allowed through the Windows Firewall.
  • Check the event logs for any errors that might be related to the problem.

Read: Fix Hyper-V Virtual Machine stuck in Stopping State

2] Reboot the VM

You can reboot the VM by right-clicking and selecting Turn off from the context menu and not the Shutdown option. Afterward, you can start the VM again. Strange but reportedly that worked to resolve the issue in a certain case. Otherwise, you can reboot the host machine and see if that helps resolve the Can’t Connect to Hyper-V Virtual Machine issue.

Read: The Virtual Machine Management service encountered an error while configuring the hard disk

3] Run the MOFCOMP command

This fix worked for some affected users that encountered the Error message 3. To run the MOFCOMP command, do the following:

  • Open Command Prompt in elevated mode.
  • In the command line interface, copy/paste the command below and hit Enter.
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
  • Exit the CMD prompt after the command executes.

Read: Virtual machine could not initiate a checkpoint operation, Error 0x800423F4

4] Store user credentials

This fix applies specifically to Error message 1 given above. The error can occur because the credentials for the user account logged on to Windows (User1) are passed through instead of those used to authenticate to the SSP (User2).

According to Microsoft documentation, by default, the Do not store my credentials radio button is selected which causes this behavior. In this case, to resolve the issue, select the radio button Store my credentials on the login page of the SSP.  When you add/store a password to the virtual machine, it allows the VM to be connected, and then you can type in the password for the user, and it will not kick you off.

Read: Hyper-V Virtual Machine stuck in Starting State

5] Remove old iSCSI/SCSI controllers/connections

Reportedly, as it concerns Error message 2, the issue was caused by an old iSCSI connection that would not reconnect as the NAS they pointed out was no longer available. They were in a “reconnecting” pending state which was interfering with Hyper-V VM connections. In this case, the applicable fix is simply deleting all old, unused, and unassigned iSCSI/SCSI controllers or connections, and then rebooting.

Read: Hyper-V Mouse input not captured in Windows

6] Enable IPv6

Enable IPv6

It appears Hyper-V requires IPv6 to be enabled all of a sudden. In a known case by an affected user, while pinging the Hyper-V server, for no particular reason, the user reportedly pinged both ‘server’ and ‘server.local’ and noticed that the ‘server’ returned an IPv4 response, whereas the ‘server.local’ returned an IPv6 response and the user was able to connect to the server.local but trying to connect to the server failed with the Error message 3.

In the case whereby you still cannot connect, you can edit your Hosts file and point to 127.0.0.1.

7] Change Windows Security settings

Change Windows Security settings - Control Flow Guard

Some affected users that received Error message 3, were able to resolve the issue by changing the Windows Security settings. Here’s how:

  • Open Windows Security.
  • Select App & Browser control.
  • On the page that opens, click Exploit protection settings at the bottom.
  • Next, switch to the Program settings tab.
  • Next, locate C:\WINDOWS\System32\vmcompute.exe in the list and expand it.
  • Next, click Edit.
  • Scroll down to Control Flow Guard (CFG) and uncheck the Override system settings option.
  • Next, run the net start vmcompute command in PowerShell admin mode.
  • Start Hyper-V Manager as administrator.

8] Turn off the Enhanced Session Mode Policy

Turn off Enhanced Session Mode Policy

This fix also specifically applies to Error message 1 as shown above. To perform this task, follow these steps:

  • Open the Hyper-V Manager.
  • Select Settings in the right-hand pane.
  • Now, select Enhanced Session Mode Policy in the left-hand pane.
  • Next, uncheck the Allow enhanced session mode option.
  • Click the OK button to save changes.

I hope this post helps! If not, you may contact Microsoft Support for any additional assistance.

Related post: VMconnect.exe application error; Cannot connect to the virtual machine

How do I enable the internet on my virtual machine?

To enable the Internet on VirtualBox, follow these few simple steps:

  • Ensure the internet connection is turned on.
  • Turn OFF the Virtual Machine.
  • Open the network settings of the Virtual Machine.
  • Enable the Network Adapter.
  • Select the Network Device.
  • Save Settings and start the Virtual Machine.

Cannot connect to a virtual machine?

If you cannot connect your VM on VMware, do the following:

  • Shut down your virtual machine.
  • In Workstation, go to VM > Settings > Network Adapter.
  • Now, ensure that the network adapter is connected (that is, the Connected and Connect at power on options are selected).
  • Next, make sure that the network adapter is configured for NAT or Bridged, and not Host-Only.

Read: How to Remotely Control Windows Virtual Machine.

1 / 1 / 2

Регистрация: 16.02.2015

Сообщений: 137

1

11.03.2016, 13:07. Показов 35000. Ответов 5


Студворк — интернет-сервис помощи студентам

Добрый день.

Есть ли решение данной проблемы?

Из под Windows 10 через Диспетчер Hyper-V пытаюсь подключиться к серверу Hyper-V Server 2008 R2 и получаю ошибку: Произошла ошибка при попытке подключения к серверу. Убедитесь, что служба управления виртуальной машиной запущена и у вас есть необходимые полномочия для подключения к серверу.

Права все есть. Из под Win7 подключался спокойно.

Не подключается только к сервера Hyper-V 2008, к 2012 подключается спокойно.



0



KDE777

1883 / 1106 / 427

Регистрация: 22.01.2016

Сообщений: 3,050

11.03.2016, 13:25

2

Цитата
Сообщение от mazer999
Посмотреть сообщение

Есть ли решение данной проблемы?

Запустите на Win10 PowerShell от администратора и выполните:

PowerShell
1
winrm set winrm/config/client @{TrustedHosts="HV-ServerName"}

где HV-ServerName — имя нужного Hyper-V сервера



1



1 / 1 / 2

Регистрация: 16.02.2015

Сообщений: 137

11.03.2016, 14:09

 [ТС]

3

KDE777, Добрый день. Спасибо что откликнулись!

Вылезла ошибка: Ошибка: Invalid use command line. Type «winrm -?» for help.

Добавлено через 7 минут
KDE777,Может через командную строку? И это прописывается на сервере к которому нужно подключиться? Или на компьютере с которого нужно подключиться?



0



KDE777

1883 / 1106 / 427

Регистрация: 22.01.2016

Сообщений: 3,050

11.03.2016, 14:17

4

Цитата
Сообщение от mazer999
Посмотреть сообщение

Или на компьютере с которого нужно подключиться?

На компьютере.

Цитата
Сообщение от mazer999
Посмотреть сообщение

Может через командную строку?

Да попробуйте в cmd, только обязательно с повышенными привилегиями:

Windows Batch file
1
winrm set winrm/config/client @{TrustedHosts="HV-ServerName"}



0



1 / 1 / 2

Регистрация: 16.02.2015

Сообщений: 137

14.03.2016, 08:20

 [ТС]

5

KDE777, Не вышло.. Ошибка та же при подключении из диспетчера Hyper-V



0



1883 / 1106 / 427

Регистрация: 22.01.2016

Сообщений: 3,050

14.03.2016, 15:17

6

Цитата
Сообщение от mazer999
Посмотреть сообщение

Не вышло.. Ошибка та же при подключении из диспетчера Hyper-V

Тогда видимо, из этой версии Hyper-V Manager подключиться к Hyper-V серверу 2008R2 не получится.

MS пишут, что даже RSAT для Win8.1 не может:

RSAT for Windows 8 and Windows 8.1 Platform and Tools Support Matrix
Hyper-V Manager console doesn’t support managing Hyper-V servers running Server 2008 or Server 2008 R2.

А в RSAT for Windows 10 поддержка 2008 R2 не упоминается ни для каких ролей…



0




PDF

Download PDF

Download page Ошибка при подключении к виртуальной машине через браузер.

Current page

Include child pages

All pages

Ошибка при подключении к виртуальной машине через браузер

Проблема

При подключении к ВМ через браузер по VNC возникает ошибка, по SPICE отсутствует изображение.

Диагностика

  • Проверить наличие сообщения вида:

    “Server Disconnected (code: 1015)”

    CODE

Возможная причина: Сертификат ресурса не добавлен в исключения. Перейти к решению.


Возможные причины

Сертификат ресурса не добавлен в исключения


Сегодня при попытке подключиться Диспетчером Hyper-V к хосту Hyper-V получил ошибку: 

Убедитесь, что служба управления виртуальной машиной запущена и у вас есть необходимые полномочия для подключения к серверу.

Все машины находятся в AD. Диспетчер Hyper-V запущен на клиентской рабочей станции под управлением Windows-10, учетная запись локального администратора. Диспетчер видит два других Hyper-V хоста (один из них локальный). Попытка подключения диспетчером к «строптивому» хосту Hyper-V с выбором других идентификационных данных (администратора домена) не приводит к успеху — получаем ту же самую ошибку. Перезагрузка рабочей станции и хоста Hyper-V не помогает.

Погуглив немного, так и не нашел решения данной странной проблемы: две Hyper-V машины в домене AD, один хост Hyper-V принимает подключение под учеткой администратора домена, когда учетные данные администратора домена вводятся непосредственно при коннекте к Hyper-V серверу, другой — не дает подключиться. Предлагаются различные решения: проверить настройки брандмауера, перезагрузить службу удаленного управления управления Windows (WinRM) — но ни одно не помогает. К тому же когда я пытаюсь подключиться к несговорчивому хосту Hyper-V, используя 5-nine Manager, коннект проходит. Мне функционал 5-nine Manager-а не достаточен, так как пользуюсь его бесплатной версией, а она не умеет делать перемещения виртуальных машин. Microsoft в своем продукте диспетчер Hyper-V за подобный функционал не просит денег.

Решение было найдено следующее. Сделал все гораздо проще. Запускаю FAR от администратора домена (runas …). Far-ом пользуюсь потому, что он хранит историю введенных команд — это удобно, когда ситуации и решения повторяются. Вбиваю в командную строку в Far-е команду для запуска Диспетчера Hyper-V:

%windir%\System32\mmc.exe «%windir%\System32\virtmgmt.msc»

и, вуаля, — мгновенно запускается диспетчер Hyper-V с обоими подключенными Hyper-V хостами и локальным Hyper-V в придачу.

Проблема решена!


Не удается подключиться к виртуальной машине в Windows 11: исправление Hyper-V

Вы только что запустили новую виртуальную машину Windows 11, но не можете подключиться? У большинства пользователей эта проблема возникает после недавнего обновления Windows. A Не удается подключиться к виртуальной машине. Попробуйте снова подключиться. Если проблема не устранена, на их экранах появляется сообщение.

Другие также жалуются, что виноваты их VPN, поэтому, если вы находитесь в одной лодке, эта статья будет вам очень полезна.

Почему моя виртуальная машина не работает?

Если у вас возникли проблемы с виртуальной машиной, это может происходить по нескольким причинам:

  • Неправильная настройка. Наиболее распространенная причина того, что виртуальная машина не работает, заключается в том, что она была неправильно настроена. Это может произойти, если вы неправильно установили операционную систему или любое другое программное обеспечение.
  • Неподдерживаемое оборудование. Убедитесь, что используемая вами операционная система поддерживает желаемую гостевую операционную систему и используемое оборудование.
  • Помехи VPN. Иногда используемая вами VPN может помешать вам подключиться к вашей виртуальной машине.
  • Прокси-сервер. Прокси-сервер действует как посредник для сетевого трафика между клиентом и сервером. Иногда они могут ограничивать доступ через свои внутренние сети.
  • Помехи брандмауэра. Ваш брандмауэр может заблокировать доступ к порту виртуальной машины и вызвать проблемы с вашим компьютером.

Что мне делать, если я не могу подключиться к своей виртуальной машине?

Вот что вы должны сделать в первую очередь:

  • Проверьте подключение к Интернету и убедитесь, что оно достаточно стабильно для запуска виртуальной машины.
  • Попробуйте подключить компьютер напрямую к беспроводному маршрутизатору с помощью кабеля Ethernet.
  • Убедитесь, что операционная система хоста обновлена.
  • Выключите, затем включите виртуальную машину.
  • Попробуйте перезагрузить компьютер и посмотрите, восстановится ли соединение.

1. Перезапустите службу Hyper-V.

  1. Нажмите клавиши Windows + R, чтобы открыть диалоговое окно «Выполнить».
  2. Введите services.msc и нажмите Enter .
    Службы -0x800700e9
  3. Найдите службы, связанные с Hyper-V, щелкните каждую правой кнопкой мыши, выберите «Остановить», а затем снова «Запустить».

2. Отключить VPN

  1. Нажмите Windows клавишу и Настройки.
    настройки виндовс 11
  2. Далее выберите Сеть и Интернет.
  3. Выберите VPN в меню справа.
    Настройки VPN
  4. Нажмите на VPN-подключение, которое хотите отключить, щелкните раскрывающийся список и выберите «Удалить».
  5. Перезагрузите компьютер.

3. Временно отключите брандмауэр

  1. Нажмите Windows кнопку, введите «Безопасность Windows» в строке поиска и нажмите «Открыть».
  2. Нажмите «Брандмауэр и защита сети», затем выберите «Общедоступная сеть».
  3. Найдите Брандмауэр Microsoft Defender и выключите кнопку.

4. Запустите средство устранения неполадок сетевого адаптера.

  1. Нажмите Windows + I , чтобы запустить настройки.
    настройки виндовс 11
  2. Нажмите «Устранение неполадок» справа на вкладке «Система».
    Устранение неполадок -0x80860010
  3. Выберите Другие средства устранения неполадок.
  4. Найдите средство устранения неполадок сетевого адаптера и нажмите кнопку «Выполнить» рядом с ним.

Как подключить виртуальную машину к компьютеру?

Подключение виртуальной машины к вашему компьютеру аналогично подключению физического компьютера. Однако вы должны позаботиться о том, чтобы все ваши виртуальные машины были подключены к одному хосту.

Виртуальная машина позволяет вам запускать совершенно отдельную операционную систему на вашем настольном компьютере или ноутбуке. Существует множество доступных виртуальных машин для Windows 11, так что вы будете избалованы выбором.

Процесс подключения виртуальной машины к хосту зависит от типа используемой сети. Например, если вы используете сеть со статическими IP-адресами, настройка будет простой.

Если у вас более одной виртуальной машины, возможно, у них могут быть разные IP-адреса, поэтому важно проверить это, прежде чем продолжить.

Эти типы программного обеспечения позволяют запускать несколько виртуальных машин на одном физическом аппаратном сервере и совместно использовать аппаратные ресурсы, такие как ЦП и память, между ними.

Еще один важный фактор, который следует учитывать при подключении виртуальной машины, — вам необходимо включить Hyper-V. Чтобы подключить виртуальную машину к компьютеру, необходим Hyper-V. Это позволит вам подключить виртуальную машину к вашему компьютеру, чтобы вы могли запускать на ней приложения.

Надеюсь, эта статья пролила свет на то, что делать, если вы не можете подключиться к виртуальной машине.

Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Подключение к принтеру ошибка 0004005
  • Подключение к вайфаю код ошибки 137
  • Подключение к интернету ошибка 400
  • Подготовка файлов ошибка при проверке файлов юбисофт
  • Подключение измельчителя пищевых отходов к канализации ошибки

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии