Convert vhd to vhdx

Downloaded a vhd from azure added it to gen1 vm however only showed blinking cursor Created gen 2 vm however could not add the vhd issue reading it Converted vhd to vhdx and was able to boot On VM setting go to disk Edit Choose action Convert select VHDX set type fixed or dynamic set […]

Posted in KB - Windows Server, KB-HyperV, KB-Windows, Knowledge Base | Comments Off on Convert vhd to vhdx

Bulk update VHD Location on Hyper-V Host

used for is you have already moved the files, for instance I updated from using the computer name \\storage\ to the FQDN   get Excel file get-VMHardDiskDrive -VMName * | select VMName,ControllerType,ControllerNumber,ControllerLocation,Path | Export-Csv -Delimiter “;” -Path “c:\temp\vmvhdloc.csv” In excel file update path to what you want it to be (note this does not move […]

Posted in KB - Windows Server, KB-HyperV, KB-Powershell/CMD, KB-Windows, Knowledge Base | Comments Off on Bulk update VHD Location on Hyper-V Host

Failover Cluster manager – get list of Vm’s and if a VM has a DVD (iso file)

Powershell Get-ClusterGroup -Cluster 19-hv | ? {$_.GroupType –eq ‘VirtualMachine’ } | Get-VM | Get-VMDvdDrive   19-hv is the cluster name I have created VMName ControllerType ControllerNumber ControllerLocation DvdMediaType Path —— ————– —————- —————— ———— —- 19-RDSH SCSI 0 1 None 2016DC-1 SCSI 0 1 None 2019 SCSI 0 1 None Android IDE 1 0 ISO […]

Posted in KB - Server, KB - Windows Server, KB-HyperV, KB-Powershell/CMD, KB-Software, KB-Windows, Knowledge Base | Comments Off on Failover Cluster manager – get list of Vm’s and if a VM has a DVD (iso file)

Hyper-V get VM VHD Used and Provisioned Storage

Open Powershell as admin   Get-VM | ForEach { $Vm = $_; $_.HardDrives } | ForEach { $GetVhd = Get-VHD -Path $_.Path [pscustomobject]@{ Vm = $Vm.Name Name = $_.Name Type = $GetVhd.VhdType ProvisionedGB = ($GetVhd.Size / 1GB) CommittedGB = ($GetVhd.FileSize / 1GB) } } | Export-Csv -Delimiter “;” -Path “C:\temp\VMVHDStorageUsedTotal.csv”   Creates CSV with data […]

Posted in KB-HyperV, KB-Powershell/CMD, Knowledge Base | Comments Off on Hyper-V get VM VHD Used and Provisioned Storage

Hyper-V get VM VHD locations

Run Powershell as admin   get-vm * | select Name,@{L=”Disks”;E={$_.harddrives.path}} | Export-Csv c:\temp\vmdisklocations.csv     Creates CSV which looks like the below Name Disks WACLS1-VM S:\VM\WACLS1-vm.vhdx H:\VMs HDD\WACLS1-VM\WACLS1-backupdisk.vhdx H:\VMs HDD\WACLS1-VM\WACLS!-VMM-Lib.vhdx

Posted in KB - Server, KB - Windows Server, KB-HyperV, KB-Powershell/CMD, Knowledge Base | Comments Off on Hyper-V get VM VHD locations

hyper-v Enable processor compatibility

Enabling this feature manually on each vm, via settings processor > expand > Compatibility > tick Migrate to a physical computer with a different processor version   View current status of all vm’s on a host. PS C:\WINDOWS\system32> Get-VM | get-VMProcessor VMName Count CompatibilityForMigrationEnabled CompatibilityForOlderOperatingSystemsEnabled —— —– ——————————– ——————————————– Activation-Test 1 False False AzureADConnect2 1 […]

Posted in KB - Server, KB-HyperV, KB-Powershell/CMD, Knowledge Base | Comments Off on hyper-v Enable processor compatibility

Ubuntu 16.04 Gen 2 VM keyboard not recognised

Ubuntu 16.04 Gen 2 VM keyboard not recognised Cause: secure boot breaking keyboard under the serer installer workaround disable secure boot on VM

Posted in KB - Server, KB-HyperV, Knowledge Base | Comments Off on Ubuntu 16.04 Gen 2 VM keyboard not recognised

VM kept a recovery checkpoint

Not sure why this occurred however I was planning to add a new drive to a vm, however could not add the new drive. Thinking back to an issue with a VM at work, on my VM exchange I tried to edit an existing drive on the VM and it mentions checkpoints exist. In poweshell […]

Posted in KB - Windows Server, KB-HyperV, KB-Powershell/CMD, Knowledge Base | Comments Off on VM kept a recovery checkpoint

Export list of Mac addresses used by Hyper-V VMs

Run Powershell as admin Get-vm | Get-VMNetworkAdapter | select-object VMname, Macaddress, Name | Export-Csv -Delimiter “;” -Path C:\vmmacs.csv VMName = name of the virtual machine Macaddress = Mac of the VM being used Name = The type of network adapter being used such as Network Adapter and Legacy Network Adapter Delimiter is ; which is […]

Posted in KB - Windows Server, KB-HyperV, Knowledge Base | Comments Off on Export list of Mac addresses used by Hyper-V VMs

Hide Hyper V Floppy Disk Drive via group policy

On Any Hyper-V virtual machine it adds the Floppy disk drive, and there is not an option to remove the drive from the settings window of the VM   The Way to remove this drive is by changing a value in the registry of the virtual machine that is running windows. However as I join […]

Posted in KB - Windows Server, KB- Group Policy, KB-HyperV, Knowledge Base | Comments Off on Hide Hyper V Floppy Disk Drive via group policy