Виртуалка windows server 2016

`# Installing-Windows-Server-2016-on-virtual-box-

Step 1 : Download Windows Server 2016 ISO

Click here to visit the Official Microsoft site and download Windows Server 2016 ISO 60-bit edition and start the download.

Step 2: Create a New Virtual Machine

If you haven’t downloaded and installed virtual box, I have created a guide here on how to go about it. Open Virtual-box and click on ‘New’ to create a new virtual machine.

Name your machine:

You are at liberty to call it ‘windows server 2016 ’ and it should automatically change the version to windows 2016 64-bit, so make sure that’s highlighted if it didn’t automatically do it.

Create a Virtual Hard-disk:

Recommended to have at least 2GB of Base Memory. You could increase if your system has more resources.

Cycle through and complete by clicking Finish to create your virtual machine.

Configure VM settings:

Next go to the Virtual Machine ‘settings’ go to the storage tab, empty disk, locating where you downloaded server 2016 ISO and get it inserted. Then click OK.

Step 3: Start up the virtual machine

Click ‘Start’ to start the virtual machine, or rather start installing the server.

Setting Up Windows Server 2016:

It loads a blue boot screen then the setup screen
Pick the language, time and keyboard formats as you need, hit next then hit install now

It will ask which version to pick. Pick the ones with desktop experience, choose the server 2016 standard with desktop experience and hit next

Agree with the license terms, hit next

Type of install, choose custom

Make sure the drive is selected, hit next

It will go through the install and when done, let it restart. Click nothing as it boots-up into the setup, let it finish

Set up password for the administrator account.

input>keyboard>insert ctrl, alt, delete to unlock

Enter the password as it logs in the account for the first time

Then finally the desktop will load up

You wanted to test something in the windows server operating system; maybe you want to create a domain controller, a DHCP server, or even a DNS server.

The best way to test the windows server configuration is to perform them on a LAB environment. And Some of you may not have lab access, so your available option would be to virtualize the windows server on a hypervisor.

That way, whatever you do on the machine will stay in a virtualized environment.  There are multiple hypervisors you can use to spin up the Windows server. And in my last article, we had covered how you can install the windows server on a KVM host. And In this blog, we are going to install the windows server on a VirtualBox.

Can you run Windows Server in VirtualBox?

You can run most operating systems with VirtualBox, provided it should be bootable or a virtual hard disk. Most of the users out there will have Windows server ISO file, and it works perfectly fine. However, you have a choice from Microsoft to download the virtual hard disk in VHD format. You can use that as well to install the windows server on the VirtualBox. And the windows server works great with the VirtualBox.

To get better performance after the installation of the windows, you will also have to install the VirtualBox guest additions. We will cover that as well in this article.

How do I download windows server images for VirtualBox?

You can go to Microsoft windows server evaluation center and download the Version of your choice. When you choose the Version, you will have multiple options; you can either select ISO or VHD. After choosing the Version, you will have to submit the form and post which you will get a link to download the software.

When it comes to the installation, compared to the ISO installation, the VHD file is the easiest way; however, the VHD file size is about 8GB, so you need to be mindful of that.

We will see how we can install the windows server 2019 with both the ISO file and the Virtual hard disk file.

Though we are installing the windows server 2019 in a VirtualBox, the steps mentioned here are identical for other Version of windows as well, such as windows server 2016,2012 and so on.

Prerequisite.

  • Download and install the VirtualBox.
  • Download the windows server image (Either ISO or VHD)
  • Installation using the ISO file.
  • How to install windows server using virtual hard disk (VHD) in VirtualBox?

Installation using the ISO file.

1.      Creation of Windows server VM in VirtualBox.

Open VirtualBox and click on New or CTRL+N to start the windows server VM installation.

A new Create Virtual machine window will pop up; you can choose either Guided Mode or Expert Mode. We are using the Guided Mode for our lab.

  • Enter the name of the VM.
  • Select the folder where you want to keep the VM Hard disk files, I left as a default folder.
  • Choose the Type as Microsoft Windows.
  • Version as Windows 2019 (64bit), for other Version of windows server you may choose them here. For Example, Windows 2016 (64bit)

After specifying the above, you may Click on Next.

2.      Specify the Memory.

You now have to define the Memory for the VM; since I most likely use it for a small Lab, I am fine with 2gigs of RAM. However, if you plan to do more stuff with it, you may need to increase the RAM accordingly.

3.      Create virtual Hard disk.

We will create a virtual hard disk for our VM; in the hard disk wizard. Select the option à Create a virtual hard disk now and Click on create.

By default, the hard disk type would be VDI, and you may choose the default Value itself if you are planning to use the VirtualBox as your permanent hypervisor.

But I would recommend choosing VMDK so that you have an option to move from the VirtualBox to other hypervisors of your choice.  Now Select VMDK and Click on the option Next.

On Storage on Physical hard disk, Choose the default value Dynamically allocated and Click on Next.

We will now define how much storage you want to provision for the windows server; I choose 50GB which is more than enough for me.

If you feel that you might need some extra space, you choose more based on your requirements and Click on Create.

You will be able to see the windows server VM instance is created.

4.      Increase the CPU.

By default, the VirtualBox would assign only one processor to the VM, and I need to add one more processor. That way, then the performance would be good. If you do not need more CPU, you may skip this step.

Right-Click on the VM and Click on settings.

Click on System and choose the Processor tab, and in the processor count, increase it to two.

5.      Attach the windows server image to the virtualbox.

On the same VirtualBox settings, Click on storage.

Under storage devices, Choose the Empty Disk.

In the attributes, Click on the Disk icon to choose a disk file.

And attach the ISO that we have downloaded earlier and Click on Ok.

Right-Click on the VM and Click on start.

From the start-up disk, choose the ISO image that we have attached and click on start. The VirtualBox instance will boot the windows server image.

6.      Begin the windows installation.

After a few seconds, you should see the windows installation screen, Choose the language, and Click on Next.

You can click on Install now.

7.      Choose the Version – GUI or CLI.

You will be presented with the different Versions of windows server 2019 on the screen. You must be a little careful here.

If you want to install the windows server with GUI, you may choose Desktop experience, or if you are ok with CLI, you may select the other options.

I need GUI access; hence I selected Windows server 2019 Datacenter evaluation (Desktop Experience)

After you decided on the versions, you may Click on Next.

Accept the license agreement and Click on Next.

Choose the installation as Custom.

Choose hard disk that we have defined earlier, Click on Next.

The windows server installation will now begin; this will take some time to finish.

8.      Setup the admin password.

After the installation, you will be prompted to enter the Administrator password. Set the administrator password and Click on Finish.

9.      Remove the ISO file.

Installation of Windows server 2019 in Oracle VirtualBox is completed; you may now log in to the windows server.

Let’s remove the windows server ISO file that we had attached during the installation.

On the bottom corner of the VirtualBox window, right-click and click on the disk icon and click on Remove disk from virtual drive.

10.      Installation of VirtualBox Guest additions.

Finally, we will have to install the VirtualBox guest addition, which will improve the performance of the windows server VM.

To install the VirtualBox guest additions, you may log in to the windows host.

Click on Input–> Keyboard–> Insert Ctrl+Alt+Del

You will be prompted to enter the admin password that we had set up earlier.

After logging in, Click on Devices > Insert Guest Additions CD image…

It will attach the Guest addition installation disk to the Windows server VM.

Open This PC, and you should see the VirtualBox Guest additions CD drive and double click on it.

Double click on the Virtualbox Guest addition installation setup file to install the VirtualBox guest additions on your windows server machine.

It is a typical software installation and nothing too complex here; you may click on next on all the drive installation prompt that you get.

After the installation, you may now go ahead and reboot the VM, and you should be good to go.

How to install Windows Server using Virtual Hard Disk (VHD) in VirtualBox?

We have successfully installed the windows server 2019 on the VirtualBox hypervisor using ISO image. We now will go ahead and install the virtual machine using the virtual hard disk. We already have a VHD file downloaded from the Microsoft site.

1. Creation of the VM.

On the VirtualBox, Click on New.

  • Name the VM and the location where you want to save the virtual machine.
  • Type as Windows.
  • Version: Windows 2019 (64bit)

2. Define the memory size.

We can provide a Memory of 2GB or more, and I am choosing 2GB for now.

3. Attach the Virtual Hard disk.

When we chose the ISO method of installation, we created a new hard disk in the VirtualBox.

But right now, we already have the virtual hard disk file, We need to attach that here.

Select use existing virtual hard disk file and click on the browse button next to the drop-down.

You will not see the virtual hard disk in the new pop up; Click on Add.

And Select the VHD file which we downloaded from Microsoft.

The new image is added under the not attached section.

Select the image and Click on Choose.

You need to make sure the new virtual hard disk is selected under ‘use existing hard disk file’

Click on Create.

4. Choose the region and Accept the license.

Once you power on the machine, you will get an option to Choose the region, Language, Layout and Click on Next.

You have to accept the license before you continue.

Follow the Step 8 above to set the admin password. Enter the password and Click on Finish.

Your VirtualBox is ready to use, and you still need to install the VirtualBox guest additions following Step 10 above which is important.

Продолжая тему виртуализации на основе Hyper-V в данном материале мы рассмотрим установку и настройку бесплатного гипервизора Hyper-V Server 2016. Основным отличием этой версии от Hyper-V как роли Windows Server является его полная бесплатность — вам не требуются лицензии на серверную версию ОС и благодаря минимальному числу служб повышается стабильность, уменьшается возможный периметр атаки и сокращаются затраты на обслуживание. За это приходится платить более сложным процессом установки и настройки о которых мы расскажем в данной статье.

Онлайн-курс по устройству компьютерных сетей
На углубленном курсе «Архитектура современных компьютерных сетей» вы с нуля научитесь работать с Wireshark и «под микроскопом» изучите работу сетевых протоколов. На протяжении курса надо будет выполнить более пятидесяти лабораторных работ в Wireshark.

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

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

Установка и первоначальная настройка Hyper-V Server

Мы не будем подробно останавливаться на процессе установки — он ничем не отличается от установки других продуктов Microsoft и не должен вызвать каких-либо сложностей.

Hyper-V-Server-2016-001.png

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

Hyper-V-Server-2016-002.png

После чего нас встретит уже знакомый с версии Hyper-V Server 2012 текстовый интерфейс конфигурации сервера.

Hyper-V-Server-2016-003.png

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

sconfig

Если же вы закрыли все окна и оказались перед пустым экраном, то нажмите Ctrl+Shift+Esc, данное сочетание клавиш работает в том числе и в RDP-сессии и вызывает диспетчер задач, с помощью которого вы можете запустить командную строку или утилиту конфигурации.

Далее идем практически по порядку. Но первым шагом следует изменить имя сервера на что-нибудь более информативное и удобное, в нашем случае это будет HV-CORE-2016. Затем, при необходимости, изменяем рабочую группу или присоединяем сервер к домену. Также рекомендуется добавить локального администратора, чтобы не использовать встроенную учетную запись.

Если вы хотите, чтобы ваш сервер отвечал на пинги, то следует явно разрешить такое поведение в пункте 4) Настройка удаленного управления, которое также должно быть включено.

Hyper-V-Server-2016-004.png

Следующий пункт — Параметры центра обновления Windows имеют по умолчанию настройку Только скачивание, это означает, что установку обновлений вам надо будет запускать вручную. Если ваши виртуальные машины не предполагают режима работы 24/7 есть смысл рассмотреть вариант настройки Автоматически, тем более новая система обновлений предусматривает получение накопительного пакета один раз в месяц.

Затем включаем удаленный рабочий стол (пункт 7) и настраиваем сетевые параметры (пункт 8) . Отдельным пунктом нас ожидает телеметрия (куда же без нее), полностью отключить ее невозможно, поэтому устанавливаем минимальный уровень — Безопасность.

Hyper-V-Server-2016-005.png

После того, как вы настроили сеть дальнейшую работу с сервером удобнее производить по RDP, как минимум это позволить вам просто скопировать некоторые длинные команды. Но перед тем, как двигаться дальше следует скачать и установить доступные обновления (пункт 6).

Hyper-V-Server-2016-006.png

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

Hyper-V-Server-2016-007.png

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

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

powershell

Цвет окна при этом останется черным, но в начале приглашения командной строки появятся буквы PS. Затем последовательно выполним следующие команды:

Enable-NetFireWallRule -DisplayName "Инструментарий управления Windows (DCOM - входящий трафик)"
Enable-NetFireWallRule -DisplayGroup "Удаленное управление журналом событий"
Enable-NetFireWallRule -DisplayGroup "Удаленное управление Windows"
Enable-NetFireWallRule -DisplayGroup "Удаленное управление томами"
Enable-NetFireWallRule -DisplayGroup "Удаленное управление брандмауэром Windows"
Enable-NetFireWallRule -DisplayGroup "Удаленное управление назначенными задачами"

для англоязычного выпуска Hyper-V эти команды будут выглядеть следующим образом:

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 Firewall Remote Management"
Enable-NetFireWallRule -DisplayGroup "Remote Scheduled Tasks Management"

На этом настройку сервера можно считать законченной, и мы перейдем к настройке клиентского ПК.

Настройка клиента для работы с Hyper-V Server

Для работы с Hyper-V Server 2016 вам потребуется ПК с операционной системой Windows 10 версий Pro или Enteprise х64, иные редакции или 32-х разрядные версии не подойдут, так как в них нет возможности установить диспетчер Hyper-V.

Прежде всего проверим, что сервер доступен по своему сетевому имени, в доменной сети ему должна соответствовать A-запись на DNS-сервере, в одноранговой сети такую запись потребуется создать вручную на локальном DNS, либо добавить нужную запись в файл hosts клиентской машины, в нашем случае она выглядит следующим образом:

192.168.16.146 HV-CORE-2016

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

cmdkey /add:HV-CORE-2016 /user:Администратор /pass:MyPa$$word

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

Теперь запустим консоль PowerShell от имени Администратора и выполним следующую команду:

winrm quickconfig

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

Hyper-V-Server-2016-008.png

После чего добавим наш сервер в доверенные узлы:

Set-Item WSMan:\localhost\Client\TrustedHosts -Value "HV-CORE-2016"

Если серверов несколько — добавляем в доверенные каждый из них.

Теперь через командную строку или команду Выполнить (Win + R) запустим оснастку dcomcnfg, в ней разверните дерево Службы компонентов — Компьютеры — Мой компьютер. После чего по щелчку правой кнопки мыши выберите Свойства и перейдите на закладку Безопасность COM — Права доступа — Изменить ограничения и в открывшемся окне установите для пользователя АНОНИМНЫЙ ВХОД права Удаленный доступ.

Hyper-V-Server-2016-009.png

Теперь попробуем подключиться к удаленному серверу. Запустите оснастку Управление компьютером и щелкнув правой кнопкой на верхнем уровне выберите Подключиться к другому компьютеру.

Hyper-V-Server-2016-010.png

После чего вы сможете управлять удаленным сервером используя привычные инструменты. Можно просмотреть журнал событий:

Hyper-V-Server-2016-011.png

Управлять заданиями планировщика, дисками, службами:

Hyper-V-Server-2016-012.png

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

Теперь установим Диспетчер Hyper-V, для этого откроем оснастку Программы и компоненты и перейдем во Включение или отключение компонентов Windows. В открывшемся окне найдем пункт Hyper-V и отметим для установки Средства управления Hyper-V.

Hyper-V-Server-2016-013.png

После чего запустим установленную оснастку и подключимся к серверу Hyper-V. В первую очередь обеспечим связь наших виртуальных машин с внешним миром, для этого перейдем в Диспетчер виртуальных коммутаторов и создадим новый коммутатор с типом Внешний и укажем для него ту сетевую карту, которая смотрит в локальную сеть. Более подробно о настройке сети в Hyper-V вы можете прочитать здесь.

Hyper-V-Server-2016-015.png

Для того, чтобы установить ОС на виртуальную машину нам потребуется передать на сервер Hyper-V установочный образ, это можно легко сделать через подключение к стандартным общим ресурсам, например, набрав в адресной строке проводника:

\\HV-CORE-2016\C$

мы попадем на диск C сервера.

Hyper-V-Server-2016-016.png

Мы не будем подробно рассматривать процесс создания новой виртуальной машины, но обратим внимание на некоторые моменты. Прежде всего Снимки они же Контрольные точки, это удобно для целей настройки и тестирования, но не следует использовать их в продакшене, поэтому использование снимков у рабочих виртуальных машин следует отключить (можно оставить на период настройки, но обязательно выключить перед вводом в эксплуатацию).

Hyper-V-Server-2016-017.png

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

Для примера мы создали новую виртуалку и без каких-либо проблем установили туда свежую Ubuntu 19.04.

Hyper-V-Server-2016-018.png

Как видим, работа с Hyper-V Server 2016 не доставляет никаких сложностей, достаточно лишь один раз выполнить ряд действий по настройке сервера и клиента, в чем вам поможет данная статья.

Онлайн-курс по устройству компьютерных сетей
На углубленном курсе «Архитектура современных компьютерных сетей» вы с нуля научитесь работать с Wireshark и «под микроскопом» изучите работу сетевых протоколов. На протяжении курса надо будет выполнить более пятидесяти лабораторных работ в Wireshark.

The point of setting up the Windows Server 2016 Hyper-V hypervisor is to host virtual machines. Once you have installed the Hyper-V role, the virtual machine configuration and creation process in Windows Server 2016, 2019 and 2022 is identical. As a result, you can use the same workflow to create and configure a virtual machine (VM) in modern Windows Server operating systems.

Let’s explore how to create and configure VMs in Windows Server 2016 Hyper-V.

Creating a Hyper-V Virtual Machine

Start by using Hyper-V Manager to connect to the Hyper-V host. Hyper-V Manager is included in Remote Server Administration Tools (RSAT) for client operating systems such as Windows 10 or included in the Server Manager “install features” section of Windows Server 2016 and 2019. Note that RSAT is a separate download.

To begin, right-click your Hyper-V host and select New > Virtual Machine.

How to create a new Windows virtual machine in Hyper-V

This launches the New Virtual Machine Wizard.

  1. Before you begin. Read the wizard introduction if you want and click Next. You can select the checkbox not to show this page again when you create a new virtual machine in Hyper-V.

    Create virtual machine Hyper-V Server 2016 using a wizard

  1. Specify Name and Location for your new Hyper-V VM. Begin the configuration by selecting a name (WStest in our example). The path saved in the Hyper-V configuration is used by default to store VM files. You can select the Store the virtual machine in a different location checkbox to define a custom path for this virtual machine configuration.

    The wizard creates a “Virtual Machines” subfolder, which contains the subfolder named as the virtual machine ID in the selected folder. Note that this is a virtual machine name not a hostname set in a guest operating system.

    Setting a name for a new Windows Server virtual machine

  1. Specify Generation. Once a VM is created, you cannot change its generation. So make sure you choose the right generation before proceeding.
    • For greater compatibility, including moving to Azure, Generation 1 VMs should be selected. If none of the limitations mentioned are true, and you want to use features like UEFI secure boot, then Generation 2 would be the better choice.
    • Note that Generation-2 VMs are only compatible with Hyper-V versions 2012 R2 and later. Windows Server 2012/Windows 8 64-bit and above are supported with Generation-2, but 32-bit versions of those operating systems do not work.

    If you create a Generation-2 VM and try to boot from an ISO of a 32-bit OS, you receive an error that no boot media can be found. Microsoft has also been working on support for Generation-2 VMs with Linux – check your particular distribution as currently some may not be supported with Generation 2. There is one more consideration: for those thinking of moving a previously-created Hyper-V VM to Azure, Generation 2 is not supported.

    How to set up a VM Generation when creating a VM

  1. Assign Memory. Memory management in Hyper-V has an option called Dynamic Memory. You can see the checkbox that can be selected to enable the feature at this stage. If you choose to enable this option, Hyper-V cooperates with the VM guest operating system in managing guest operating system memory.

    With Dynamic Memory, Hyper-V uses the “hot add” feature to expand the guest operating system memory as memory demands increase within the guest. Dynamic Memory helps to dynamically and automatically divide RAM between running VMs, reassigning memory based on changes in their resource demands. This helps provide more efficient use of memory resources on a Hyper-V host as well as greater VM density.

    How much memory to set for a Windows virtual machine in Hyper-V

    When you select Use Dynamic Memory for this virtual machine, you can set minimum and maximum values for the RAM that is dynamically assigned to the VM. You can do it in the virtual machine configuration when a VM is created.

    Memory settings in virtual machine configuration

  1. Configure Networking. In order for a particular VM to have connectivity to the network, you must attach a virtual switch that is connected. You can also leave a VM in a disconnected state, as a connection to a network is not a requirement for completing VM configuration. In this example, we connect the VM to ExternalSwitch, which is a virtual switch connected to our production LAN.

    How to set up virtual machine networking when creating a new VM

  1. Connect Virtual Hard Disk. There are three options to choose from:
    • If you choose the Create a virtual hard disk option, you are creating a brand new vhdx disk on your Hyper-V host. You can set the size of the disk as well. The wizard defaults to 127 GB, which can easily be changed. 127 GB will be enough for the Windows Server virtual machine used in our example.
    • The Use an existing virtual hard disk option lets you attach your new VM configuration to an existing virtual disk. Perhaps you copied over a vhdx file that you want to reuse with the new VM configuration. You can simply point the wizard to the vhdx file with this option.
    • With the Attach a virtual hard disk later option, you can choose to skip the creation of a hard disk in the wizard and assign a disk later.

    There is one significant caveat to the create a virtual hard disk step – you cannot choose the type of disk that is created. By default, Hyper-V creates dynamically expanding disks, which are thin-provisioned disks. This means that space is used only as needed.

    Note: There are some downsides to this approach. While the Hyper-V storage driver generally makes efficient use of resources for optimal performance, you may still prefer to provision thick disks or fixed size in Hyper-V. To do that, you should choose the third option and attach a thick virtual hard disk after your VM is created. Read about the differences between VHD and VHDX.

    You can create only one virtual hard disk at this step of new VM creation; however, you can add more virtual hard disks after VM creation is completed.

    Configuring a virtual disk for a Windows Server VM in Hyper-V

  1. Configure Installation Options. This means configuring how you want to install the guest operating system (OS) in your new VM.
    • Install an operating system later doesn’t make changes to the virtual machine configuration at this step, but you can edit this setting later.
    • Install an operating system from a bootable image file is the most common way is to install an operating system. You need to have an ISO file of the OS saved somewhere on your server. Simply guide the wizard to the location using the Browse button. In our example, we create a Windows Server VM and select the appropriate installation ISO image file. Read how to copy an ISO file to a Hyper-V server.
    • Install an operating system from a network-based installation server. You can use this option if you have a network-based installation server (a server with remote installation services deployed).

    Selecting an ISO file to install a Windows Server VM

  1. Check the configuration Summary. The displayed information allows you to ensure that your configuration is correct. If something is incorrect, you can go back and modify the settings. Once you click Finish, your Windows Server VM is created according to your specified virtual machine configuration.

    Viewing the virtual machine configuration summary

Starting the VM

Now that virtual machine configuration and creation are complete, you can power on your Windows virtual machine.

  1. Right-click the VM and select Start.

    Starting a Windows virtual machine

  1. You can connect to the VM console by right-clicking the VM and selecting Connect. The Virtual Machine Connection (VMConnect) console is a management interface where you see a “monitor” connected to a VM, similarly as when using Windows Remote Desktop.

    Connecting to a running Windows virtual machine

    After connecting to the VMConnect, we should now be able to boot our VM and install the operating system as usual through the operating system installation prompts. After finishing the installation, we have a Windows Server virtual machine. We can edit the windows virtual machine configuration, install applications inside the VM, etc.

    See a complete walkthrough in our video tutorial:

Conclusion

The steps for how to create a Windows Server virtual machine in Hyper-V running on Windows Server 2016, 2019 and 2022 can be used to install a VM running any other supported operating system such as Windows 7, Ubuntu Linux, etc.

Using Hyper-V Manager is a convenient method to create a VM and edit the virtual machine configuration. Alternatively, you can create a Hyper-V VM in PowerShell that can be useful for automation and mass deployment. Whatever method to create and set up a VM you use, remember to backup Microsoft Hyper-V VM backup to avoid data loss and downtime.

How to Create/Install Windows Server 2016 VM on your Hyper-V Windows 10 Device (Surface Pro 4)

As you might know Hyper-V role/feature is included on Windows 7,8, 8.1 and 10. This allows you to create your own test environments and also you pre-production development systems. So you can test new features and so on.

How to install the role on my Windows 10 ?

To install the role/feature is pretty straight forward just make sure you perform the following tasks;
1. Go to your BIOS and make sure the Hypervisor /Virtualization Technology is enabled.
2. After enabling your Hypervisor, search on Turn Windows Features on or off and enable all the Hyper-V features.

clip_image001

3. After enabling the role, restart your computer and open the Hyper-V manager Console.

clip_image002

4. That’s it, now you have Hyper-V Role installed on your Windows 10 Device.

Creating and Installing the 2016 VM Step by Step

1. Open the Hyper-V Manager, click New then create a new Virtual machine.
2. On the Virtual Machine Wizard specify he following: Name, Path, Generation, RAM, Network, VHD and the ISO to install the OS in my case Windows Server 2016.

clip_image003

3. Once the VM is created then start the VM and press any key to install the OS from the attached ISO then follow all the OS installation wizard.

clip_image004

clip_image005

clip_image006

clip_image007

 
4. Now you have your new VM installed on your Windows 10 device.

clip_image008

You can also create the VM utilizing PowerShell

1. Go to your PowerShell ISE as Admin then run the following pscript.

# Make sure you change the VM Name, Switch Name, and Installation Media Path.

$VMName = ‘Server2016’

$Switch = ‘Private NIC Teaming Switch’

$InstallMedia = ‘C:\Temp\Server2016.iso’

# Create New Virtual Machine

New-VM -Name $VMName -MemoryStartupBytes 2147483648 -Generation 2 -NewVHDPath «C:\Virtual Machines\$VMName\$VMName.vhdx» -NewVHDSizeBytes 53687091200 -Path «C:\Virtual Machines\$VMName» -SwitchName $Switch

# Add DVD Drive to Virtual Machine

Add-VMScsiController -VMName $VMName

Add-VMDvdDrive -VMName $VMName -ControllerNumber 1 -ControllerLocation 0 -Path $InstallMedia

# Mount Installation Media

$DVDDrive = Get-VMDvdDrive -VMName $VMName

# Configure Virtual Machine to Boot from DVD

Set-VMFirmware -VMName $VMName -FirstBootDevice $DVDDrive

Thanks for watching! :)

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

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Pen list corrupt windows 10
  • Via vt1705 драйвер windows 7 64 bit
  • Перевод песни the windows of the world
  • Windows hotkey create new file
  • Qt designer download windows