Windows server core install hyper v

Windows Hyper-V Server — это бесплатная серверная версия гипервизора от Microsoft, которую можно использовать для запуска виртуальных машин. В этой статье мы рассмотрим, как установить и настроить версию Windows Hyper-V Server 2019 (инструкция также применима и к Hyper-V Server 2016).

Содержание:

  • Что нового в Hyper-V Server 2019?
  • Установка Hyper-V Server 2019/2016
  • Утилита Sconfig: базовая настройка Hyper-V Server 2019/2016
  • Удаленное управление Hyper-V Server 2019/2016
  • Настройка Hyper-V Server 2019 с помощью PowerShell

Microsoft анонсировала, что не будет выпускать отдельную версию Hyper-V Server 2022. Связано с тем, что сейчас они сфокусированы на другом стратегическим продуктов Azure Stack HCI.

Hyper-V Server 2019 подходит специально для тех, кто не хочет платить за систему аппаратной виртуализации. В нем доступны все функции Hyper-V и при этом он абсолютно бесплатный. Основные преимущества Windows Hyper-V Server:

  • Поддержка всех популярных ОС – совместим со всеми операционными системами. Поддержка Hyper-V присутствует во всех Windows системах, в ядре всех современных систем Linux и FreeBSD;
  • Поддерживаются много способов бекапа виртуальных машин — простые скрипты, бесплатные программы, платные версии популярных программ для бекапа;
  • Несмотря на то, что в Hyper-V Server отсутствует графический интерфейс управления Windows Server, вы можете управлять им удаленно через стандартную консоль управления гипервизором Hyper-V Manager или веб консоль Windows Admin Center;
  • В основе Hyper-V Server популярная платформа Windows Server, с которой привычно и просто работать;
  • Hyper-V можно установить на псевдоRAID – например, RAID контроллер Intel, программный RAID Windows;
  • Не нужно лицензировать гипервизор – подходит для запуска VDI и виртуальных машин с Linux;
  • Нетребовательность к железу – x64 процессор с поддержкой аппаратную виртуализацию (у Intel — Intel-VT или VMX, у AMD — AMD-V (SVM ) и трансляцию адресов второго уровня SLAT (Intel EPT или AMD RV). Эти опции процессора должны быть включены в BIOS/UEFI/nested host. Полные системные требования можно найти на сайте Microsoft;
  • Рекомендуется устанавливать на хосты с минимум 4 Гб памяти.

Не нужно путать полноценный Windows Server 2016/2019/2022 с установленной ролью Hyper-V с Free Hyper-V Server 2019/2016. Это разные продукты.

Также отметим, что использование бесплатного гипервизора не освобождает вас от обязанности лицензировать виртуальные машин. Вы можете запустить неограниченное количество ВМ с opensource ОС типа Linux, но виртуальные машины с Windows придется лицензировать. Десктопные редакции Windows лицензируются с помощью ключа продукта. Если вы используете Windows Server в качестве гостевой ОС, его нужно лицензировать по физическим ядрам вашего хоста. Подробнее о лицензировании Windows Server при запуске в среде виртуализации смотрите здесь.

Что нового в Hyper-V Server 2019?

Вкратце пробежимся по объявленным новшествам в Hyper-V Server 2019:

  • Появилась поддержка Shielded Virtual Machines для Linux;
  • Версия VM конфигурации 9.0 (поддержка гибернации);
  • Поддержка дедупликации для ReFS;
  • Core App Compatibility – возможность запуска дополнительных графических панелей управления в консоли сервера Hyper-V;
  • Поддержка 2-node Hyper-V cluster, кросс-доменной миграция кластеров.

Установка Hyper-V Server 2019/2016

Скачать ISO образ гипервизора Hyper-V Server 2019 можно https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019.

Скачать ISO образ гипервизора Hyper-V Server 2019

После нажатия на кнопку “Continue” откроется небольшая форма регистрации для ввода ваших данных. Заполняете, затем выбираете язык устанавливаемой системы. Настоятельно рекомендую выбрать английский. И ждете, когда закончится скачивание образа Hyper- V. Размер .iso файла около 3 ГБ.

скачать serverhypercore

Установка Microsoft Hyper-V Server идентична установки Windows 10/11 на компьютер. Просто загрузите ваш сервер (компьютер) с установочной USB флешки с установочным образом Microsoft Hyper-V Server (для записи ISO образа на USB накопитель проще всего использовать утилиту Rufus) и следуйте инструкциям мастера установки ОС.

установка hyper-v server

Утилита Sconfig: базовая настройка Hyper-V Server 2019/2016

После завершения установки Hyper-V Server потребует задать пароль администратора.

задать пароль администратора hyper-v

После этого перед вами откроется консоль гипервизора.

Обратите внимание, что у Hyper-V Server нет привычного графического интерфейса Windows. Большинство настроек сервера придется выполнять через командную строку.

утилита sconfig для настройки hyper-v server 2019

На рабочем столе два окна – стандартная командная строка и окно скрипта sconfig.cmd. С помощью данного скрипта можно выполнить первоначальную настройку сервера Hyper-V. В строке “Enter number to select an option:” введите номер пункта меню, с которым будете работать.

  1. Первый пункт меню позволяет ввести сервер в домен AD или в рабочую группу;
    рабочая группа для hyper-v

  2. Затем задайте имя хоста (сервера);
  3. Добавьте локального администратора (дополнительную учетную запись, помимо встроенного administrator). Обратите внимание, что при вводе пароля курсор остается на одном месте, тем не менее, пароль и его подтверждение успешно вносятся в систему;
  4. Включите удаленный доступ к серверу. Это позволить управлять им с помощью Server Manager, консолей MMC, PowerShell, проверить доступность с помощью ping или tracert;
  5. Настройте Windows Update. Выберите один из трех режимов:
    • Automatic (автоматическая загрузка и установка обновлений)
    • DownloadOnly (только загрузка без установки)
    • Manual (решение о загрузке и установке обновлений принимает администратор)
  6. Загрузите и установите последние обновления Windows;
  7. Включите RDP доступ с или без NLA (Network Level Authentication);
  8. Настройки параметры сетевых адаптеров. По умолчанию сервер получает адрес от DHCP. Обычно тут стоит указать статический IP адрес;
    назначить статический ip адрес hyper-v

  9. Установите дату и время системы;
  10. Настройте телеметрию. Полностью ее отключить система не позволит. Выберите режим, который вам больше нравится
    настройки телеметрии в hyper-v server 2019

Дату, время и часовой пояс можно также настроить с помощью команды:

control timedate.cpl

Региональные параметры:

control intl.cpl

При этом открываются стандартные консоли Windows.

настройка даты, времени и региональных параметров в hyper-v server

Внимание! Если вы закрыли все окна и оказались перед черным экраном, то нажмите Ctrl+Shift+Esc, чтобы запустить диспетчер задач данное сочетание клавиш работает в том числе и в RDP-сессии). С помощью Task Manager вы можете запустить командную строку или утилиту конфигурации Hyper-V (нажмите File -> Run Task ->
cmd.exe
или
sconfig.cmd
).

Удаленное управление Hyper-V Server 2019/2016

Для удобного управления Free Hyper-V Server 2019 из графического интерфейса вы можете использовать:

  • Веб консоль Windows Admin Center (см. статью Windows Admin Center: веб-интерфейс управления серверами Windows Server);
  • Стандартную консоль Hyper-V Manager – можно установить, как на Windows Server, так и на десктопных версиях Windows 10/11.

Для работы с Hyper-V Server 2016/2019 вам потребуется ПК с операционной системой Windows 10 версий Pro или Enteprise х64.

Удаленное управление Hyper-V Server с помощью Hyper-V Manager

Рассмотрим, как удаленно подключиться к хосту Hyper-V сервер с другого компьютера с помощью консоли Hyper-V Manager. В этой статье мы подразумеваем, что у вас сервер Hyper-V и компьютер с Windows 10 находятся в одной рабочей группе (WORKGROUP).

Cначала выполните настройки на сервере Hyper-V. Запустите консоль PowerShell (powershell.exe) и выполните следующие команды:

Enable-PSRemoting
Enable-WSManCredSSP -Role server

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

hyper-v включить psremoting для удаленного управления

Теперь переходит к настройке клиентского компьютера с Win 10.

Сервер Hyper-V должен быть доступен по своему сетевому имени, в доменной сети ему должна соответствовать A-запись на DNS-сервере. В рабочей группе такую запись потребуется нужно создать вручную на локальном DNS, либо добавить нужную запись в файл hosts (C:\Windows\System32\drivers\etc\hosts) клиентской машины. В нашем случае она выглядит следующим образом:

192.168.13.55 hv19

Можно добавить запись в файл hosts с помощью PowerShell:

Add-Content -Path "C:\Windows\System32\drivers\etc\hosts" -Value "192.168.13.55 hv19"

Добавьте Hyper-V сервер в доверенные узлы:

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "hv19"

Если учетная запись, под которой вы работаете на клиентском ПК, отличается от учетных данных администратора Hyper-V, нужно явно сохранить учетные данные для соединений с сервером в диспетчер учетных записей Windows командой:

cmdkey /add:hv19 /user:Administrator /pass:MyPa$$word

Проверьте используемый профиль сети на клиенте Windows 10. Если используется тип сети Public, ее нужно сменить на Private:

Get-NetConnectionProfile|select InterfaceAlias,NetworkCategory

powershell сменить тип сети на private в windows

Set-NetConnectionProfile -InterfaceAlias "EthernetLAN2" -NetworkCategory Private

Выполите команду:

Enable-WSManCredSSP -Role client -DelegateComputer "hv19"

powershell: Enable-WSManCredSSP для управления hyperv

Теперь выполните команду
gpedit.msc
чтобы открыть редактор локальной GPO.

  1. Перейдите в раздел Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Credentials Delegation;
  2. Включите параметр Allow Delegating Fresh Credentials with NTLM-only Server Authentication.
  3. Затем нажмите кнопку Show и добавьте два значения
    wsman/hv19
    и
    wsman/hv19.local
  4. Закройте консоль редактора и обновите настройки локальной групповой политики командой
    gpupdate /force

gpo: разрешить делегирования ntlm для управления сервером hyperv

Теперь нужно установить в Windows консоль Диспетчер Hyper-V. Откройте оснастку Programs and Features и перейдите в Turn Windows Features on or off. В открывшемся окне найдите пункт Hyper-V и отметьте для установки Hyper-V GUI Management Tools.

Или вы можете установить клиент Hyper-V Manager с помощью PowerShell:

Enable-WindowsOptionalFeature -Online –FeatureName Microsoft-Hyper-V-Management-Clients

ustanovka-установить hyper-v manager в windows

Запустите оснастку Hyper-V Manager (
virtmgmt.msc
), щелкните правой кнопкой по Hyper-V Manager и выберите Connect to Server. Укажите имя вашего сервера Hyper-V.

hyper-v manager подулючиться к удаленному гипервизору из windows 10

Теперь вы можете управлять настройками Hyper-V Server, создавать виртуальный машины и управлять ими из графической консоли.

удаленное подключение к hyper-v в рабочей группе через hyper-v manager

Управление Hyper-V с помощью Windows Admin Center

Для удаленного управления хостом Hyper-V можно использовать Windows Admin Center (WAC). WAC это веб консоли и дашбоард для полноценного управления Windows Server, Server Core и Hyper-V Server.

На стороне Hyper-V нужно включить разрешающие правила для SMB подключений в Windows Defender Firewall:

Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled true -PassThru

Теперь нужно скачать (https://aka.ms/WACDownload) и установить агент Windows Admin Center на ваш хост Hyper-V. Скачайте WindowsAdminCenter2110.2.msi на любом компьютере Windows с доступом в интернет. Можно скопировать установочный MSI файл на Hyper-V сервер через подключение к административной шаре C$. Для этого выполните команду:

Win+R ->
\\192.168.13.55\C$
и введите пароль администратора Hyper-V

Создайте папку и скопируйте в нее MSI файл.

скопировать установочный файл WindowsAdminCenter2110.2.msi на hyper-v server 2019

Теперь запустите установку WAC из консоли Hyper-V:

c:\distr\WindowsAdminCenter2110.2.msi

Установите WAC с настройками по-умолчанию.

установка wac на hyper-v сервере

После окончания установки вы можете подключиться к вашему Hyper-V Server из браузера, простой перейдите по адресу
https:\\192.168.13.55:443

Перед вами откроется дашбоард вашего Hyper-V Server хоста. Вы увидите базовую информацию о сервере, используемых ресурсах и т.д.

hyper-v дашбоард в windows admin center веб интерфейсе

Настройки хоста Hyper-V можно задать в разделе WAC -> Settings -> Hyper-V Host Settings. Доступны следующие разделы:

  • General
  • Enhanced Session Mode
  • NUMA Spanning
  • Live Migration
  • Storage Migration

настройка параметров hyper-v server через веб интерфейс WAC

Для управления Hyper-V вы будете преимущественно использовать две секции в консоли WAC:

  • Virtual Switches – нужно создать как минимум один виртуальный коммутатор, чтобы предоставить сетевой доступ для ВМ;
  • Virtual Machines – в этом разделе вы можете создать, настроить, включить/выключить, импортировать/экспортировать виртуальную машину Hyper-V.

управление виртуальными машинами hyper-v через wac

Далее я рассмотрю некоторые способы управления Hyper-V Server из PowerShell

Настройка Hyper-V Server 2019 с помощью PowerShell

Для настройки сервера рекомендую использовать PowerShell. В модуле Module Hyper-V доступно более 238 командлетов для управления сервером Hyper-V.

Get-Command –Module Hyper-V | Measure-Object

Настройте автоматический запуск консоли PowerShell (вместо cmd.exe) при входе в систему.

New-ItemProperty -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\run -Name PowerShell -Value "cmd /c start /max C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -noExit" -Type string

автозапуск консоли powershell в hyper-v 2019

Теперь при входе в сеанс будет запускаться окно PowerShell.

Настройка параметров сети Hyper-V Server 2019 из PowerShell

Если вы не настраивали сетевые параметры в окне sconfig.cmd, то настройте их через PowerShell. С помощью командлета Get-NetIPConfiguration можно увидеть текущую конфигурацию IP сетевых интерфейсов.

Get-NetIPConfiguration

Через PowerShell назначьте статический IP адрес, маску сети, шлюз по умолчанию и адреса DNS серверов. Индекс (InterfaceIndex) сетевого адаптера берем из вывода предыдущего командлета.

New-NetIPAddress -InterfaceIndex 4 -IPAddress 192.168.1.2 -DefaultGateway 192.168.1.1 -PrefixLength 24

New-NetIPAddress

Set-DnsClientServerAddress -InterfaceIndex 4 -ServerAddresses 192.168.1.3,192.168.1.4

Set-DnsClientServerAddress

Для настройки IPV6 смотрим имя интерфейса командлетом Get-NetAdapter из PowerShell модуля управления сетью NetTCPIP:

Get-NetAdapter

Проверьте текущую настройку IPv6 следующей командой:

Get-NetAdapterBinding -InterfaceDescription "Intel(R) PRO/1000 MT Network Connection" | Where-Object -Property DisplayName -Match IPv6 | Format-Table –AutoSize

Get-NetAdapterBinding IPv6

Отключить IPV6 можно так:

Disable-NetAdapterBinding -InterfaceDescription " Intel(R) PRO/1000 MT Network Connection " -ComponentID ms_tcpip6

Настройка правил Windows Defender Firewall для управления Hyper-V Server 2019

Просмотреть список командлетов для управления файерволом Windows можно с помощью Get-Command.

Get-Command -Noun *Firewall* -Module NetSecurity

NetSecurity powershell module

Для полноценного удаленного управления сервером выполните последовательно следующие команды для включения разрешающих правил Windows Firewall из PoSh:

Enable-NetFireWallRule -DisplayName "Windows Management Instrumentation (DCOM-In)"
Enable-NetFireWallRule -DisplayGroup "Remote Event Log Management"
Enable-NetFireWallRule -DisplayGroup "Remote Service Management"
Enable-NetFireWallRule -DisplayGroup "Remote Volume Management"
Enable-NetFireWallRule -DisplayGroup "Windows Defender Firewall Remote Management"
Enable-NetFireWallRule -DisplayGroup "Remote Scheduled Tasks Management"

Создание дискового хранилища для виртуальных машин

Для хранения данных (файлов виртуальных машин и дистрибутивов) будем использовать отдельный раздел на физическом диске. Просмотрите список физических дисков на сервере.

Get-Disk

Get-Disk hyper-v 2019

Создайте новый раздел на диске максимально возможного размера и назначьте ему букву D. Используйте DiskNumber из Get-Disk.

New-Partition -DiskNumber 0 -DriveLetter D –UseMaximumSize

После этого отформатируйте раздел в NTFS и укажите его метку.

Format-Volume -DriveLetter D -FileSystem NTFS -NewFileSystemLabel "HVStore"

Подробнее о командлетах управления дисками и разделами из PowerShell здесь.

Создайте каталог, где будете хранить настройки и файлы дисков виртуальных машин. Командлет New-Item позволяет создавать вложенные пути:

New-Item -Path "D:\Hyper-V\Virtual Hard Disks" -Type Directory

Создайте папку D:\Distrib для хранения установоых ISO образов ОС:

New-Item -Path D:\Distr -ItemType Directory

Для создания общей сетевой папки (шары) используйте командлет New-SmbShare, с помощью которого предоставьте полный доступ по сети для группы локальных администраторов сервера:

New-SmbShare -Path D:\Distr -Name Distr -Description "OS Distributives" -FullAccess "BUILTIN\Administrators"

Более подробно о базовой настройке Hyper-V Server и Windows Server Core из командой строки рассказано в этой статье.

Настройка параметров хоста в Hyper-V Server 2016/2019

Откроем параметры сервера командой:

Get-VMHost | Format-List

Get-VMHost

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

Set-VMHost -VirtualMachinePath D:\Hyper-V -VirtualHardDiskPath 'D:\Hyper-V\Virtual Hard Disks'

Создание виртуального коммутатора Hyper-V

Создайте External Switch, который привязывается к сетевой карте Hyper-V Server и организует взаимодействие ВМ с физической сетью.

Проверьте поддержку SR-IOV (Single-Root Input/Output (I/O) Virtualization):

Get-NetAdapterSriov

Получите список подключенных сетевых адаптеров:

Get-NetAdapter | Where-Object -PropertyStatus –eqUp

Привяжите виртуальный свитч к сетевому адаптеру и при наличии SR-IOV включите его поддержку.

Внимание! Включить или отключить поддержку SR-IOV после создания свитча будет невозможно, для изменения этого параметра необходимо будет пересоздавать коммутатор.

New-VMSwitch -Name "Extenal_network" -NetAdapterName "Ethernet 2" -EnableIov 1

Проверить настройки виртуального коммутатора можно с помощью командлетов:

Get-VMSwitch
Get-NetIPConfiguration –Detailed

На этом первоначальная настройка Hyper-V Server 2016/2019 закончена. Можно переходить к созданию и настройке виртуальных машин.

Более подробно команды PowerShell для управления Hyper-V и виртуальными машинами описаны в этой статье.

Skip to content

Home/Posts/Beginners Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V in Windows Server Core – Part 4

Beginners Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V in Windows Server Core – Part 4

Next up for our Hyper-V beginner’s series is learning about installing the Hyper-V Role on a Windows Server Core installation of Windows Server. Until now, we have demonstrated using Windows Server Desktop installations when installing Microsoft Hyper-V. Why is it good to learn Windows Server Core related to Microsoft Hyper-V? Let’s dive into how to install Microsoft Hyper-V in Windows Server Core for beginners and see why and how this is done.

What is the Windows Server Core edition?

If you have not heard about the Windows Server Core edition, let’s explain what this edition of Windows Server is and its purpose. For years, Microsoft has been criticized for the attack surface associated with the “Windows” part of the operating system, in other words, its GUI. While Linux distros have long had a headless operating system without a GUI that helps to minimize the attack surface, etc., Windows was missing such an option.

Protect Your Data with BDRSuite

Cost-Effective Backup Solution for VMs, Servers, Endpoints, Cloud VMs & SaaS applications. Supports On-Premise, Remote, Hybrid and Cloud Backup, including Disaster Recovery, Ransomware Defense & more!

With the introduction of the Windows Server Core edition, that has changed. The Windows Server Core option is a minimal installation of Windows Server Standard and Datacenter editions. Unlike the classic “Desktop Experience” installation, the Windows Server Core installation option has a smaller disk footprint and a stripped-down interface with a much smaller code base. All of this translates to a much smaller attack surface.

The difference between the Windows Server Desktop Experience installation and the Core installation option becomes readily apparent when Windows Server boots for the first time. Instead of the normal Windows “Desktop” login experience, you will be greeted with a “text-based” command prompt style interface, known as the “SConfig” utility.

Why run Microsoft Hyper-V on a Windows Server Core installation?

With the security benefits and the reduced attack surface, the Windows Server Core installation makes a great platform for running a production Microsoft Hyper-V installation. It is lightweight, secure, and can be managed with other tools and consoles outside of the Hyper-V host.

Download Banner

The much lighter footprint and fewer installed Windows components make lifecycle management, servicing, and other management and operations tasks much simpler. Arguably, Windows Server Core installations with fewer moving “parts” underneath the hood should also be more stable.

Installing the Windows Server Core installation option

Let’s look at how you install Windows Server Core. How do you install Windows Server Core instead of the Desktop Experience? Below, we are beginning the installation process from the ISO of Windows Server 2022. Click the Install button.

Install Microsoft Hyper-V in Windows Server Core

Beginning the Windows Server 2022 installation process

Enter the product key for Windows Server 2022. Also, you can click the option “I don’t have a product key.”

Install Microsoft Hyper-V in Windows Server Core

When you get to the Select the operating system you want to install screen, you will see (4) options listed. They look the same. However, the Standard and Datacenter options listed without the (Desktop Experience) are Windows Server Core installations. Select either the Standard or Datacenter installation option for installing Windows Server Core.

Install Microsoft Hyper-V in Windows Server Core

Selecting the operating system you want to install

Accept the EULA by clicking Next.

Install Microsoft Hyper-V in Windows Server Core

Accept the EULA for Windows Server 2022

Click the Custom installation option.

Install Microsoft Hyper-V in Windows Server Core

Select the custom install option

Next, select the disk you would like to target for the Windows Server Core installation. Click Next.

Install Microsoft Hyper-V in Windows Server Core

Select the target installation disk for the Windows Server Core installation

The Windows Server Core installation begins.

Install Microsoft Hyper-V in Windows Server Core

The Windows Server Core installation begins

Configuring Windows Server Core

Once the installation of Windows Server Core is complete, the server will boot into the SConfig command prompt menu. This utility is the default tool for configuring Windows Server Core. Like in the Desktop Experience version of Windows Server, you will be asked to configure a default password for the local administrator account.

Install Microsoft Hyper-V in Windows Server Core

The SConfig utility launches and prompts for a password change on the administrator account

Configure and confirm a new administrator account password.

Install Microsoft Hyper-V in Windows Server Core

Changing and confirming a new administrator account

Once the administrator password is configured, the SConfig utility will load. It is a lightweight utility with (15) menu options that allow applying a basic configuration to your Windows Server Core installation. There are a few recommendations for getting a basic configuration on a Windows Server Core installation that will be used for hosting the Hyper-V Role. These include:

  1. Join a domain (optional)
  2. Change the computer name (this can also be a part of the “Join a domain” option
  3. Set a static IP address on the Windows Server Core installation
  4. Run Windows Updates
  5. Enable remote management (temporarily)
Install Microsoft Hyper-V in Windows Server Core

Viewing the SConfig configuration utility for the Windows Server Core installation

Below, you can see we have joined a domain and changed the computer name.

Install Microsoft Hyper-V in Windows Server Core

Joining a domain and changing the computer name in Windows Server Core

After the computer reboots, you will log back in and should now see the new computer name and domain reflected in the SConfig utility. Let’s now launch the PowerShell command line to install the Hyper-V Role.

Install Microsoft Hyper-V in Windows Server Core

Computer renamed and domain joined

Once we are at the PowerShell command line, we can install the Hyper-V Role and Management Tools. Note the PowerShell cmdlet to install the Hyper-V Role and Management Tools.

  • Install-WindowsFeature -Name Hyper-V -IncludeManagementTools

Once the Hyper-V Role has been installed, we can use the Restart-Computer cmdlet to restart the Windows Server Core host with the Hyper-V Role installed.

Install Microsoft Hyper-V in Windows Server Core

Installing the Hyper-V Role with PowerShell and restarting the Windows Server host

Once the Windows Server Core installation reboots, the Hyper-V Role will be instantiated, and you can remotely connect to the Hyper-V host with Hyper-V Manager or Windows Admin Center to configure the Hyper-V host.

Wrapping Up

The Windows Server Core installation is a great way to host the Microsoft Hyper-V Role. It provides a streamlined, small footprint, secure, and lightweight Windows Server installation without the GUI. In addition, the GUI-less interface helps to minimize the attack surface, making Windows Server Core an ideal Windows Server installation for housing the Microsoft Hyper-V Role. The built-in SConfig utility makes configuring Windows Server Core straightforward to initialize the installation with basic configuration settings. How do you connect to a Windows Server Core installation running the Microsoft Hyper-V Role? Next, we will take a look at remotely managing a Windows Server Core Hyper-V for beginners and see how this is accomplished.

Check out the other articles in this Hyper-V Beginner’s series:

Beginners’ Guide for Microsoft Hyper-V: Overview of Hyper-V (Part 1)

Beginners’ Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V Using Server Manager -(Part 2)

Beginners’ Guide for Microsoft Hyper-V: How to Install Microsoft Hyper-V with PowerShell -(Part 3)

Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.

Try BDRSuite for Free!

Experience our cost-effective backup solution for VMs, Servers, Endpoints, Cloud VMs, and SaaS applications. Start your 30-day free trial today no credit card required and no feature restrictions!

Brandon Lee is a guest blogger for Vembu. He has been in the IT industry for over 15+ years now and has worked in various IT industries spanning education, manufacturing, hospitality, and consulting for various technology companies including Fortune 500 companies. Brandon is a prolific blogger and contributes to the community through various blog posts and technical documentation primarily at Virtualizationhowto.com

Schedule a live demo with one of our product experts

Start your full-featured 30-day free trial

Explore detailed pricing, editions & features

StarWind Solutions Architect. Alex has begun his journey as a hobbyist in the virtualization and storage sphere. He possesses extensive knowledge in networking, storage technologies, and virtualization.

StarWind Solutions Architect. Alex has begun his journey as a hobbyist in the virtualization and storage sphere. He possesses extensive knowledge in networking, storage technologies, and virtualization.

In the previous article, we have covered the basics of Microsoft Windows Server Core installation. After configuring the operating system and specifying the networks and storage for the future configuration, there are few more things left.

Our next step is to install and configure the Hyper-V role.

Installation of the Hyper-V role by itself is extremely simple. You need to open the PowerShell window by typing in “Powershell” command in the command prompt. In order to install the Hyper-V role through the PowerShell, enter the following:

Install-WindowsFeature Hyper-V

Installing the Hyper-V role

Installing the Hyper-V role

Obviously, the Core version of Windows Server has no graphical interface. In this case, you need to use the Hyper-V Manager from a remote computer to be able to manage Hyper-V and make the configuration and management a lot easier. This could be any other workstation or server.

In order to manage Hyper-V remotely, you need to configure the below firewall permissions:

Enable-NetFireWallRule -DisplayName “Windows Management Instrumentation (DCOM-In)”
Enable-NetFireWallRule -DisplayGroup “Windows Firewall Remote Management”
Enable-NetFireWallRule -DisplayGroup “Remote Scheduled Tasks Management”
Enable-NetFireWallRule -DisplayGroup “Remote Event Log Management”
Enable-NetFireWallRule -DisplayGroup “Remote Service Management”
Enable-NetFireWallRule -DisplayGroup “Remote Volume Management”

Or you can simply skip this part by disabling the firewall with the command listed below:

Get-NetFirewallProfile | Set-NetFirewallProfile -enabled false

The last one needs to be run on the management server:

Enable-NetFirewallRule -DisplayGroup “Remote Volume Management.”

Configuring Hyper-V

To be able to configure your Hyper-V environment, you need to add the server to the Hyper-V Manager by clicking on “Connect to Server” and specifying the hostname/IP of your Core server. After the successful connection, make sure that our iSCSI disk, which was connected to the Core server, is used as a default folder for Hyper-V.

Adding the server to Hyper-V Manager

Adding the server to Hyper-V Manager

In order to connect your virtual machines to the network, you need to create a Virtual Network by clicking on “Virtual Switch Manager” in the Actions menu of the Hyper-V server.

Virtual Switch Manager

After choosing the “Create virtual switch” option, the one we need is an External switch. Set the name and select the connection type of the virtual switch as an External Network and check the box “Allow management operating system to share this network adapter”.

Creating the virtual switch

Creating the virtual switch

Finalizing the creation of virtual switch

Finalizing the creation of virtual switch

After creating the virtual switch, you can deploy the virtual machines to your local server.

In the last part of our guide, we will finalize the Failover Cluster configuration to prepare it for the deployment of shared storage using StarWind as an HA storage provider.

  • Windows Server 2016 Core configuration. Part 1: step-by-step installation
  • Specialize Windows Server Hyper-V guest OS automatically

Let’s have a look at this article on how to install Hyper-V Server Core 2022. How do you install Server Core instead of the desktop experience? With the security advantage and the reduced attack surface, the Windows Server Core installation makes an outstanding platform for running a production Hyper-V server installation. It is lightweight and secure, and you can easily manage it with other tools and consoles outside of the Microsoft Hyper-V host. Below, we are starting the installation procedure from the ISO image of Windows Server 2022. If you want to know how to create bootable USB media.

Table of Contents

Microsoft Hyper-V 2022 Core Requirements

Visit Microsoft documents to learn about the system requirements for the Hyper-V server.

Microsoft Hyper-V 2022 Core License Requirement

Click here to get more information about the license requirement.

Install Hyper-V Server Core

Boot the system with the Windows Server installation media where you want to install Server 2022 Core. Choose your preferred language, and then choose next to install Hyper-V Server Core.

Microsoft server operating system setup

Select the Install Now button.

Install Hyper-V Server core 2022

Click on the link. I don’t have a product key, if you have any.

Select the Windows Server 2022 Datacenter Core and then choose Next.

Select operating system core

Accept the license agreement, and then proceed.

Applicable notices and license terms

Choose Custom: Install Windows only (advanced) option.

Type of installation do you want

Choose a volume where you want to install Windows server core 2022 and then choose Next.

Choose disk to install OS

The installation of Windows Server 2022 Core is in progress.

Installing Microsoft server operating system

Setup Hyper-V Server Core 2022

Windows Server 2022 Core command line login.

Server 2022 Core command line

Click OK to change the password.

Password must be changed core server

Enter a new password and confirm password, and then hit enter.

New password server core 2022

The Windows Server core password has been changed. Press enter on the OK prompt.

Password change server core 2022

How to Configure Windows Server 2022 Core

Type the Sconfig command.

There are a few settings that I usually need to setup with Sconfig to get the core server up and running rapidly, to the point of being able to remotely manage it and install roles and features.

Change the core server name.

Join the server for the domain.

Setup network settings.

Enable RDP

Enable remote management.

Windows server core sconfig

There are several methods to enable the Hyper-V role on the Windows Server 2022 core.
Using PowerShell
Windows Admin Center

Enabling the Hyper-V Role via PowerShell

Install the Hyper-V roles by typing the below command to install Hyper-V Server Core.

Install-WindowsFeature -Name Hyper-V -IncludeAllSubFeature -Restart
Enable Hyper-V role command

The Hyper-V roles will be installed on the Windows Server 2022 core, and the server will restart automatically.

Installing Hyper-V roles

How to Install Hyper-V Role with Windows Admin Center

The Windows Admin Center will permit you to return to the GUI method of managing the Windows server core. Windows Admin Center is very straightforward to install and very easy to use as a management platform. Connect your Microsoft Hyper-V core server to the Windows Admin Center. Under Tools, choose the Roles and Features menu. Select the Hyper-V role, and then choose the install button.

Windows admin center roles

Install roles and features. The wizard page will open; tick the box “Reboot the server automatically if required” and then yes.

Install Hyper-V role WAC

You can view the installation progress in the notifications area.

Windows admin center roles & features

Jamilhttp://jamiltech.com

A Professional Technology Blog Writer | An energetic professional with more than 20+ years of rich experience in Technology, Planning, Designing, Installation, and Networking.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Почему не показывает доступные сети wifi windows 10
  • Это приложение не будет работать на вашем устройстве windows 10 hevc
  • Не обновляется windows 10 при перезагрузке
  • Расположение недоступно windows 10 onedrive
  • Не могу найти принтер на компьютере windows 10