
Virtualization, Part 3: Hyper-V — installation, virtual switches, VMs, backups, and server migration
🌐 Machine-translated from Russian. Show original
In this part:
Setting the role#
Install-WindowsFeature Hyper-V -IncludeManagementTools -Restart
Do not overload the Hyper-V host with other roles: only virtualization and, if necessary, a backup agent.
Virtual switches#
- External — VM in the local network via a physical adapter.
- Internal — the connection between the VM and the host.
- Private — only between VMs.
New-VMSwitch -Name "LAN" -NetAdapterName "Ethernet" -AllowManagementOS $true
The VLAN tag is set in the VM network adapter settings.
Creating a VM#
New-VM -Name "SRV1C" -Generation 2 -MemoryStartupBytes 16GB -SwitchName "LAN" `
-NewVHDPath "D:\VMs\SRV1C\disk0.vhdx" -NewVHDSizeBytes 200GB
Set-VMProcessor -VMName "SRV1C" -Count 8
- Generation 2 — UEFI and secure boot for modern operating systems.
- The drives are VHDX, and for DBMSs — fixed size.
- Dynamic memory — for applications, but not for DBMSs and 1C servers with large caches.
- Enable integration services in the guest OS.
Checkpoints and backups#
- Production checkpoints use shadow copying inside the guest — consistent application state. Like snapshots in Proxmox, this is not a replacement for backup.
- VM backups — using Windows Server Backup or specialized backup products for Hyper-V, with storage of copies outside the host.
Physical server migration to VM (P2V)#
- Inventory: what works on the server, licenses, hardware bindings (USB keys, COM ports, 1C software licenses — see the section about 1C licenses).
- Create a physical server disk image using the VHDX conversion utility (for example, Sysinternals' Disk2vhd) — stop database services or use consistent copying while the image is created.
- Create a VM with this disk (generation 1 for older MBR boot systems).
- Load the VM in an isolated network, check services, and install integration services.
- Shut down the physical server and switch the VM to a work network with the same IP and name.
For DBMS and 1C servers, it is often more reliable not to convert, but to deploy a new VM and transfer data using standard means (backup and database recovery, .dt export).
Transferring USB Keys and Licenses#
- The USB protection key in the Hyper-V VM is not directly penetrated — use USB-over-IP devices or switch to software licenses.
- Software licenses tied to computer settings will require reactivation after migration — plan ahead for this.
🎉 Series completed. Return to contents.
Comments · 0
No comments yet.Sign in to comment, rate and see all comments.