Showing posts with label HyperV. Show all posts
Showing posts with label HyperV. Show all posts

Tuesday, June 24, 2014

Move SCVMM DB Server

 

If you have moved SCVMM 2012 r2 (or earlier) the only official way to change is to uninstall and reinstall. However in my case I have moved from a SQL instance on a standard server to a AllwaysOn instance on the same host.

Instead of uninstalling SCVMM 2012 just modify a database string – then restart the SCVMM service if you did not stop before..

You should stop the SCVMM Service and Agent Services.

Open RegEdit on the SCVMM 2012 server and navigate too: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\Sql

Under the SQL key, change all references to the old SQL Server, this includes the following sub-keys;

ConnectionString
DatabaseName
InstanceName
MachineFQDN
MachineName

Friday, May 16, 2014

Deleting orphaned Hyper-V disks from a server

 

I have a tame Powershell expert on hand, and the problem with Hyper-V is the standard GUI does not delete the disk when you delete a Virtual Machine, this can lead to a bunch of ophan VHD/VHDX files on the server. This script must be run on the server and will put out the VM drive path, the VMs that are on the server, the VHX/VHDX’s and will allow to see or delete them.

NOTE NOTE NOTE: This will delete valid snapshots… No I did not have any … Just a warning.

To view them run:

Delete-OphanedDisks.ps1 –whatif

To delete them run:

Delete-OphanedDisks.ps1

And follow the confirmation prompts.

clip_image002

PS: SCVMM does not have this problem. Cheers.

 

Script below, written by Peter Bertok

 

[CmdletBinding(ConfirmImpact='High',SupportsShouldProcess=$true)]

PARAM (

[switch]$Force,

[string[]]$Extensions = @( '*.vhdx', '*.vhd' )

)

BEGIN {

$disks = @( Get-VM | Get-VMHardDiskDrive | select -ExpandProperty Path )

$store = (Get-VMHost).VirtualHardDiskPath

If ( -not ( Test-Path $store ))

    {

Throw "Cannot find default VM disk path: $store"

    }

$List = @( $Extensions | `

ForEach-Object { dir -Path:$store -Filter $_ } | `

Select-Object -ExpandProperty FullName | `

Where-Object { $_ -notin $disks } | `

Select-Object -Unique )

If ( $Force )

    {

$List | del -Force:$Force -Confirm:$False -WhatIf:$False

    }   

Else #If ( $PSCmdlet.ShouldProcess( "$($List.Length) Files", "Delete" ))

    {

$List | del -Confirm:$ConfirmPreference

    }

}

Tuesday, April 15, 2014

Hyper-V Server 2012 r2 verses WS2012r2 Standard or WS2012r2 DataCenter

 

“Microsoft Hyper-V Server 2012 (HYS) does not contain the full set of features and roles that the full Windows Server 2012 operating system has, however, from a pure Hyper-V perspective, Microsoft Hyper-V Server 2012 has feature parity with the feature set of Windows Server 2012 Hyper-V”. Hyper-V Server does not contain a GUI.

The ONLY Roles available on Hyper-V server 2012 R2:

  • File and Storage Services
    • File and iSCSI Services
      • File Services
    • Storage Services
  • Hyper-V
  • Remote Desktop

Hyper-V Server is a dedicated stand-alone product that contains the hypervisor. Hyper-V Server is ideal where no new Windows Server licenses are required or where the servers being consolidated are running an alternative OS.

You configure Hyper-V Server by using the Server Configuration tool (SCONFIG.CMD). You can use an ordinary command prompt for operations that are not available in the Server Configuration tool. This is the command reference: http://technet.microsoft.com/en-us/library/cc754340.aspx 

The TL;DR licence details:

  • Hyper-V Server, Standard or Datacenter all support as many as you put on them.
  • Standard comes with a license for 2 Windows Server VMs on up to 2 CPUs (on the same motherboard).
  • Datacenter comes with a license for as many Windows Server guests as you can run on up to 2 CPUs (in the same motherboard). You buy more CPUs are required
  • Hyper-V Server 2012 R2 has no cost for its own license. The guests OSs must still be licensed, exactly as stated in the previous paragraph. The guest licenses are not tied to what hypervisor you actually use.

Hyper-V server 2012 Enhanced Storage Capabilities:

  • Virtual Fiber Channel – Enables virtual machines to integrate directly into Fiber Channel SAN (fiber channel-based Hyper-V Guest Clusters)
  • Support for 4-KB Disk Sectors in Hyper-V Virtual Disks
  • New VHD Format. VHDX
  • Offloaded Data Transfer (ODX). Offload storage-related tasks to the SAN, increasing performance.
  • Boot from USB Disk.
  • Storage Spaces. treat SAS & SATA disks as storage pools, from which logical disks can then be provisioned. Thinly or fully provisioned, and support advanced features such as trim provisioning.

Enhanced Resource Management include:

  • Dynamic Memory (great for VDI)
  • Resource Metering provides the ability to track and report the amount of data that is transferred per virtual machine
  • QoS specifying the minimum bandwidth that is available to a virtual machine or a port.
  • Data Center Bridging (DCB) converged networking… Look this one up.

Hyper-V Extensible Switch:

  • Private VLANS (PVLANS) - Provide isolation between two virtual machines on the same VLAN
  • ARP/ND Poisoning/Spoofing
  • DHCP Snooping/DHCP Guard - Protects against rogue DHCP servers
  • Virtual Port ACLs - Isolate networks and metering network traffic for a virtual port
  • Trunk Mode to Virtual Machines
  • Monitoring & Port Mirroring
  • Windows PowerShell/Windows Management Instrumentation (WMI)

Microsoft Hyper-V Server 2012 Clusters:

  • Maximum Nodes per Cluster                      64
  • VMs per Cluster                                        8,000
  • Maximum Guest Cluster Size (iSCSI)         64 Nodes
  • Maximum Guest Cluster Size (Fiber)          64 Nodes
  • Maximum Guest Cluster Size (File Based)  64 Nodes
  • Guest Clustering with Live Migration          Yes
  • Guest Clustering with Dynamic Memory     Yes

Hyper-V Server has the following upper limits on virtual machines:

  • Virtual machines with 64 virtual processors
  • 1 TB of RAM per virtual machine
  • 64 TB virtual hard disks by using the VHDX format.

 

http://download.microsoft.com/Documents/UseTerms/Hyper-V_Server%202012%20R2_English_adc2a6ba-32b4-4a69-ab8a-e09d3fd1f785.pdf 

http://download.microsoft.com/download/7%2F7%2F0%2F7707E736-4557-4310-9709-87358F7E6D1A/WindowsServer2012VirtualTech_VLBrief.pdf

http://download.microsoft.com/download/5/7/8/578E035F-A1A8-4774-B404-317A7ABCF751/Competitive-Advantages-of-Hyper-V-Server-2012-over-VMware-vSphere-Hypervisor.pdf

Tuesday, February 04, 2014

Hyper-V 2012 R2–PXE boot from Synthetic NIC

 

Prior to Windows Server 2012 R2 Hyper-V there was a PXE issue that meant you needed to have a legacy NIC boot PXE then a synthetic NIC for speed, which the PVS would auto switch on boot. This is now gone.

This was the PVS v7+ setting:

By default, Provisioning Services automatically switches from legacy Hyper-V NICs to synthetic NICs if both exist in the same subnet. To enable the option to only use synthetic NICs if legacy Hyper-V NICs exist within the same subnet, edit the target device's registry settings:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BNIStack\Parameters] "DisableHyperVLegacyNic"=dword:00000000

 

Windows Server 2012 R2 Hyper-V

Generation 2 Virtual Machines now have this support:

The synthetic NIC can boot from the network using PXE

clip_image002

Synthetic network adapters support PXE boot. Gone is the old legacy network adapter.

Wednesday, January 15, 2014

Key Changes for Windows Server 2012 R2 Hyper-V

 

Simplified editions:

  • Windows Server 2012 R2 Datacentre: for highly virtualised datacentre and cloud environments.
  • Windows Server 2012 R2 Standard: for physical or minimally virtualised environments.
  • Windows Server 2012 R2 Essentials: small businesses with up to 25 users and 50 devices.

Specifications:

Class Resource Windows Server 2012-r2
Host CPUs on hardware 320
Host Physical memory 4TB
VM vCPU per VM 64
VM vRAM per VM 1TB
VM vDisk per VM 64TB
VM Running VMs per host 1024
Cluster Nodes 64
Cluster VMs in Cluster 8000

 

General performance changes:

  • Storage Tiering (Pool HDD & SSD and automatically move hot data to SSD)
  • Data De-duplication (for live VDI virtual hard disks)
  • VMs on SMB 3.0
  • Remote Direct Memory Access (RDMA) network cards
  • Offload Data Exchange (ODX) if you SAN supports it
  • Simultaneous Live Concurrent Migration now to the level of hardware you support (10gb use 8 concurrent)

Generation 2 VMs:

Generation 2 VMs are based on the Unified Extensible Firmware Interface (UEFI) BIOS. They use less emulated hardware. Gone are serial ports, PS/2 ports and other devices.

  • ONLY Windows Server 2012 / 2012 R2, Windows 8 / 8.1, are supported.
  • Secure Boot is an turned on by default
  • The synthetic network interface controller (NIC) supports Pre-Boot eXecution Environment (PXE) booting.
  • Gone are IDE-connected virtual hard drives (VHDs) you can now boot from virtual SCSI.
  • Generation 2 VM boots about 20% faster and the OS installs about 50% faster
  • However there is no performance benefit to a running VM.

Tuesday, April 23, 2013

Design guide, Server 2012, Cisco & NetApp

 

There are new design guide and deployment guide for Microsoft Windows Server 2012 based on FlexPod (UCS and NetApp).

It covered,

  • Full FCoE, vPC
  • iSCSi for WS 2012 Hyper-v
  • VM-FEX for WS 2012 Hyper-v
  • Single Wire Management for C220 M3 with N2232PP.

http://www.cisco.com/en/US/partner/solutions/collateral/ns340/ns517/ns224/ns944/whitepaper__c07-727095.html

http://www.cisco.com/en/US/partner/docs/unified_computing/ucs/UCS_CVDs/flexpod_mspc_hvws12.html#wp389869

Remove Missing Dependencies for SCVMM 2012 RC VHDs

 

Ran into this issue with SCVMMM2012 and I could not delete a VHD from my library as I had a series of items that were dependent on the VHD. I resolved the template issue by entering the following command from Powershell on the SCVMM server:

Get-SCVMTemplate | where {$_.Name -like "Temporary*"} | Remove-SCVMTemplate

The second issue will be identified by the following error when you attempt to delete the VHD:

The library object (VHDNAME) cannot be removed because following objects are dependent on it:

Virtual Hard Disk deployment configuration

Thanks to Ryan Holt for this (http://www.ryanholt.net/2012/02/07/quick-tip-remove-missing-dependencies-for-scvmm-2012-rc-vhds/) and @TheChadVent for the tip.

Thursday, April 18, 2013

SCVMM 2012 SP1 and Linux

 

To automatically configure the Linux OS after SCVMM creates the OS there are extra tools that are needed. On the VMM management server, open a command prompt, (administrative).

They programs are found in the c:\Program Files\Microsoft System Center 2012\Virtual Machine Manager\agents\Linux folder.

Copy all the agent installation files from that folder to a new folder on the virtual machine, and then, on the virtual machine on which Linux is running as a guest operating system, open the new folder.

Make the installer executable

chmod +x install

Run either the x86 or x64 installer:

./install scvmmguestagent.1.0.0.544.x64.tar

or

/install scvmmguestagent.1.0.0.544.x86.tar

 

image

The official Microsoft link is: http://technet.microsoft.com/en-us/library/jj860429.aspx

Monday, February 20, 2012

Do you need VMware ESX? (vSphere)

Update:1 – corrected some numbers. Thanks @jasonboche

Let me just say I love VMware, particularly ESX and have worked with it from before GSX was in shorts, back in the workstation days, when only para-virtualisation existed. I have rolled out ESX 2/3/4 farms (no 5 yet)… I have never had a purple screen of death, I have never had to rollback a workload to hardware, I have VMed Exchange 2k/2k3/2k7, DCs 2k-2k8r2, file & print, SQL servers, Citrix servers they all run great on ESX/ESXi.

But do you need it? Or are you after a solution has all the features, are you after the Rolls Royce? What are you really trying to do? Are you exotic or somehow special?

You want ESXi that's fine, go ahead I don't get paid either way, but then nor does anyone so please do.

Lets just think about what server virtualisation does (as of todays date):

Feature

ESX/ESXi Hyper-V XENserver

Bare-metal architecture

Yes No, but core Yes
VMotion like Yes Yes Yes

Small footprint

Yes No, but core Yes-ish
Cluster (pool) 32 nodes 16 nodes 16 nodes

CPU virtualisation

Yes Yes Yes
RAM Support Host 2TB 1TB 1TB
RAM support VM 1TB 64GB 128GB
RAM overcommit Yes Yes Yes

NIC teaming

Yes No*/vendors Yes

VM RAM Page sharing

Yes No No

Ballooning

Yes Yes Yes

Capacity prioritisation

Yes Yes-ish Yes-ish

Traffic Shaping

Yes No No

Virtual NIC

Yes Yes Yes

Virtual switches

Yes Yes Yes

VLAN tagging

Yes Yes Yes

Dynamic volume resizing

Yes Yes Yes

Raw device mapping

Yes Yes Yes

LUN management

Yes Yes-via vendors Yes-add on
Guest Windows Yes Yes Yes
Guest Linux Yes Yes-limited Yes-good
Guest Other Great OK Good

Paravirtualisation

None (good!) Yes, LAN/Disk yes-ish

Distributed Power Mgnt

Yes Some Some

Wake-on LAN

Yes No No

There are hundreds more features such as “Boot from SAN” which are specific or particular so I have not listed them above, if YOU need them they are critical but lets just focus back on the 99%

So to look at this list above there are some clear areas where ESXi wins out, specifically on the very large scale, telco scale, intensive power saving, dare I say cloud providers… But if you are one of the people who just need a bunch of VMs per server for general workloads any of the three products above is going to work fine. Scale up the CPU, RAM, Network cards and you can go to higher density?

The limits are disappearing.

So now lets look back at yourself, do you really need ESX? Maybe you could save some money… Look around.

Just before signing off, read this: http://www.thincomputing.net/2011/03/07/how-many-users-can-i-host-per-server-with-remotefx-for-hyper-v-and-what-is-the-cost-per-user/

This document is the source for the core of this post:
“vmware-vsphere-features-comparison-ch-en.pdf”
Intel: “xeon_7500_Virtualization_solbrief.pdf”

* Microsoft say dont use teaming, but vendors support it. Buyer beware… Microsoft Support Policy for NIC Teaming with Hyper-V - http://support.microsoft.com/kb/968703

Wednesday, November 30, 2011

Keyboard Shortcuts in a Remote Desktop Session

 

Key Combinations for Client Computer Equivalent Keys for Remote Desktop Session Description
ALT+TAB
ALT+PAGE UP

Switches between programs from left to right.

ALT+SHIFT+TAB
ALT+PAGE DOWN
Switches between programs from right to left.
ALT+ESC ALT+INSERT Cycles through the programs in the order they were started.
  CTRL+ESC

Switches the client between a window and full screen.

CTRL+ESC
ALT+HOME

Displays the Start menu.

  ALT+DELETE

Displays the Windows menu.

PRINT SCREEN
CTRL+ALT+MINUS (–) symbol on the numeric keypad

Places a snapshot of the active window in the Remote Desktop session on the clipboard.

CTRL+ALT+DEL
CTRL+ALT+END

Displays the Task Manager or Windows Security dialog box. (Only use CTRL+ALT+END to issue this command. CTRL+ALT+DEL is always interpreted by the client computer.)

ALT+PRINT SCREEN

CTRL+ALT+PLUS (+) symbol on the numeric keypad

Places a snapshot of the entire Remote Desktop session window on the clipboard.

This is from link: http://technet.microsoft.com/en-us/library/bb457106.aspx

Friday, November 04, 2011

Looking to move from XXX for Virtualisation?

Interesting article: http://www.theregister.co.uk/2011/11/03/v_index_server_virtualization_q3_2011/ 
(I have cleaned up this it is not a direct quote)

Virtualisation market faces shake-up, By Timothy Prickett Morgan

Posted 3rd November 2011 21:41 GMT

This info comes from the latest V-Index survey from Veeam Software, a maker of add-on management tools for VMware's ESXi hypervisor, which is conducted on a quarterly basis in the US, UK, France, and Germany.

The survey only of large companies – those with 1,000 or more employees. About a third of the companies surveyed had more than 3,000 employees.

In the September V-Index, 86.5 per cent of the 578 organisations that participated in the poll had some sort of server virtualisation in their data centres. And across all enterprises, including those who did not have server virtualisation at all, an average of 38.9 per cent of servers were virtualised, and they had an average of 701 servers in their data centres.

Primary server virtualisation hypervisors, by vendor

The penetration of various hypervisors on x86-based servers depends on whether virtualisation is being used to run virtual desktop infrastructure (VDI) or more traditional server workloads.

On traditional server stuff

  • VMware with 67.6 per cent of those companies that have hypervisors ESX or ESXi is their primary hypervisor
  • XenServer 14.4 per cent going for
  • Hyper-V 16.4 per cent from Microsoft.
  • Others category, which accounted for a meagre 1.6 per cent.

When you shift to talk about hypervisors running on servers to specifically stream VDI desktops:

  • ESX 54.2 per cent
  • XenServer 24.9 per cent
  • Hyper-V by 20.3 per cent

Now here's the interesting bit: 38 per cent of companies using virtualisation for traditional workloads say they are planning to change their hypervisor next year (2012).

The cost of the current hypervisor platform was cited as the main reason for the jump by 58.9 per cent of the jumpers, with nearly half saying that they didn't like their current vendor's licensing model, and they did like the features offered with alternative suppliers or that the alternatives had matured enough that they could contemplate making a shift.

Thursday, November 03, 2011

W2K8 R2 Server Core Commands

 

Yes it has been out for ages, and yes everyone knows, but I am putting these all together as a reference. Enjoy or ignore. ;)

Rename computer

  • hostname
    • WIN-C6UDA2DS5FF2
  • netdom renamecomputer WIN-C6UDA2DS5FF2 /newname:HyperV1
  • shutdown /r

Join the domain

  • netdom join HyperV1 /domain:PebblyHill /userd:Administrator /passwordd:*
  • shutdown /r

IP Address details

  • ipconfig
    • Windows IP Configuration
    • Ethernet adapter Local Area Connection 1:
    • Connection-specific DNS Suffix  . : pebblyhill.com.au
    • Link-local IPv6 Address . . . . . : ae70::0d04:dea2:b323:4db5
    • IPv4 Address. . . . . . . . . . . : 192.168.0.20
    • Subnet Mask . . . . . . . . . . . : 255.255.255.0
    • Default Gateway . . . . . . . . . : 192.168.0.1

Allow ping and RDP through the firewall

  • netsh firewall set icmpsetting 8
    • Ok.
  • netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
    • Updated 1 rule(s).
    • Ok.
  • netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=yes
    • Updated 16 rule(s).
    • Ok.

Or disable the firewall:

  • netsh firewall set opmode mode=disable

Enable remote desktop

  • cscript C:\windows\system32\scregedit.wsf /ar 0
    • Registry has been updated.

Install Hyper-V

  • start /w ocsetup Microsoft-Hyper-V
  • shutdown /r

If you did not join a domain, using GPOs for update settings and need to manually setup windows update the following commands are for you (This will use the default time of 3am to check for patches)

  • Cscript c:\windows\system32\scregedit.wsf /au 4
  • Net stop wuauserv
  • Net start wuauserv

Update right now

  • Wuauclt /detectnow

Check the update status

  • Cscript scregedit.wsf /AU /v

From here on in you can use the RSAT tools on a client to do the rest

Tuesday, November 01, 2011

SCVMM 2008 R2 converting VMware ESX Error (2912)

 

I have Windows Server 2008 R2 hosts running HyperV.  Using SCVMM 2008 R2 to migrate existing VMware ESX VM's. I copied the VMDK and VMX files to the SCVMM Library and then tried to do a V2V and get the following errors when trying to migrate a VMware VM:

“Error (2912)
An internal error has occurred trying to contact an agent on the MyServerName.DNS.com server.
(Unknown error (0x8004232c)).”

The conversion gets to 66% and fails on the task 1.3 “Make operating system virtualizable[sic]”

Turns out this stage is trying to START the VM to remove VMware tools and and install the Integration Services. But there was no NIC card selected so it fails.

Try again with a network card and voilĂ .

Thursday, September 29, 2011

XenDesktop on Hyper V–HostingUnitService error

 

Either using quick XenDesktop 5/55 deployment wizard or the standard desktop deployment you get this error:

 
"The environment for this connection type is incorrect. If connection type is SCVMM, SCVMM Admin console need to be installed on the same machine as the HostingUnitService is installed on.”

image

According to Citrix this means you need the SDK for SCVMM.

According to Microsoft the SDK for SCVMM is the PowerShell CMDlets. So to get the PowershellCMDlets install the SCVMM Administrator Console on the Desktop Delivery Controller computer.

Dispute a HostingUnitService sounding like a VMhost…

Blog Archive