Presentation is loading. Please wait.

Presentation is loading. Please wait.

Come and meet my little friend Using Hyper-V on Windows 8 Professional

Similar presentations


Presentation on theme: "Come and meet my little friend Using Hyper-V on Windows 8 Professional"— Presentation transcript:

1 Come and meet my little friend Using Hyper-V on Windows 8 Professional
SQL Saturday Cambridge September 2013

2 About myself Kevin Chant Twitter: @kevchant
LinkedIN Senior SQL Server DBA at WPA Used SQL 2000,2005,2008,2012 Various certifications (MCSE, MCITP, MCSA SQL Server 2008 etc) SQL Saturday Cambridge Event Organiser

3 What is Hyper-V Hyper-V is a free virtualisation tool, similar to VirtualBox, which can be used to create test environments locally. A cut down version of it now ships free with Windows 8 Professional and above.

4 Why use it Hyper-V is good for creating multiple virtual machines on your laptop or desktop, which ideal for creating small SQL failover clusters and AlwaysOn environments for testing purposes It’s also a cheap alternative to creating a physical test environment (which isn’t always possible), to test critical updates, etc Can use dynamic memory so virtual machines can use less or more memory if required by SQL Server

5 Additional reasons to use it
Native to Microsoft, and can be used to create Virtual Machines locally which can then be migrated to a to a Hyper-V server environment if required Testing new versions of Operating Systems and software in a safe environment

6 SQL Server scenarios it can be used it for?
SQL Server failover clusters AlwaysOn configuration Replication and Log Shipping testing Testing SQL scripts before they go Live Upgrading versions of SQL and testing Database migrations Testing Cumulative Update installations

7 Other SQL Server Scenarios
Testing SQL features such as encryption and In-Memory OLTP (Hekaton) staging environments A BI test bed, and you can even configure your environment so that you can run reports locally on your laptop or desktop which are actually stored on a Reporting Server on your Virtual Machines

8 What spec laptop or desktop do you need to use it
You can use it on any laptop which runs Windows 8 Professional or above Ideally 8GB of RAM (you can use 4GB, but will struggle if you want to replicate a SQL Server failover environment on Windows Server 2012 Operating Systems); I would strongly recommend buying a machine that can upgrade to 16GB, or buy one with 16GB in it (especially if thinking of running SharePoint Virtual Machines)

9 Processor Specs Any modern processor which supports Second Level Address Translation (SLAT) will suffice, which every Intel Core i3, i5 and i7 CPU does and some AMD 64 bit processors do as well. I would recommend one that has as many cores as possible (like an Intel i7), very useful for Windows Server 2012 VM’s because they improve if you allocate more than one Virtual Processor to them; which I will cover later on.

10 How do you install it on Windows 8 Professional
You can install in in Windows 8 Professional by going into Programs and Features and selecting “Turn Windows features on and off”

11 Alternatively Install via PowerShell
To install using PowerShell in the Windows PowerShell Command Line type: Enable-WindowsOptionalFeature –FeatureName Microsoft-Hyper-V –All Whichever way you install it a reboot is required

12 After installing it After installing it you can run it by selecting “Hyper-V Manager” from the Start Menu. If you intend to use it often you can pin it on the task bar by right clicking it and selecting “Pin to taskbar” DEMO

13 Hyper-V Manager Basics
The Hyper-V Manager allows you create new Virtual Machines, as well as allow you to create Virtual switch’s to create and control internal and external networks which I will cover shortly.

14 Hyper-V Manager at a glance

15 Hyper-V Manager layout
As you can see from the Hyper-V Manager the right hand side shows the name of your local machine; the centre section shows the listing of Virtual Machines, with any snapshots taken of them underneath then at the bottom the status of the Virtual Machine selected. To the right there are various Actions you can perform

16 Import Virtual Machine screenshot

17 Hyper-V Settings screenshot

18 Hyper V Settings Hyper-V settings allows you to set your default file locations for Virtual Hard Disks and Virtual Machines It also allows you to set NUMA Spanning to span NUMA modes (enabled by default) and control the number of storage migrations that can be done at the same time.

19 Virtual Switch Manager screenshot

20 Virtual Switch Manager
This vital utility allows you to manage the network environments you use within your Virtual Machines

21 Three types of Virtual Switches you can create
External – Allows your Virtual Machine to talk directly to the network, I wouldn’t recommend using this in your corporate network; especially on Domain Controllers. If so change IP addresses. Internal – Allows you to create a switch that can be used between your physical computer and virtual machines Private – Allows connectivity between your Virtual Machines only

22 Why use virtual switch manager
You might some vm’s to be in a mix of internal and external networks e.g. in an internal Domain network local to the computer you are using with one other server having internet connectivity as well, such as SQL Server when you want to check for any updates

23 Virtual SAN Manager Can be used to create a Virtual SAN, but there are better alternatives which I will provide a link for at the end Not required for a lot of SQL Scenarios, for instance just to test AlwaysOn configuration a SAN is not required; unless you are testing using AlwaysOn Availability Groups across two SANS…

24 Configuring your initial VM
If you’ve got enough disk space it’s probably worth creating a baseline Virtual Machine that you can clone I don’t recommend installing Failover clustering or SQL Server on your baseline vm’s You can then create an external switch to enable your baseline Virtual Machine to download Windows Updates; which I would recommend doing at home or a network dedicated for external use at work, which doesn’t broadcast on the corporate network

25 Once you’ve installed Windows Updates
Run the sysprep utility within the Virtual Machine to wipe all the identifiers from it and shut down the machine (more details can be found on link at end of the session). When the Virtual Machine is restarted or has been copied elsewhere it will ask for new set of credentials including a valid license key

26 How to clone in Hyper-V client that’s on the desktop
After creating a baseline if you want to create multiple Virtual Machines based on it, you can simplify this “cloning” it, in Hyper-V servers this process is very elegant, however in Windows 8 Professional the process is a lot more crude

27 Steps to clone Hyper-V Virtual Machine in Windows 8 Pro
First of all run SysPrep and when it’s finished let it shutdown the Virtual Machine Create a new folder structure for where you want the new hard disk image to go (e.g. C:\Virtual Machines\{New Virtual Machine Name}\Virtual Hard Disks”

28 Locate your Virtual Hard Disk Image File for the VM you have created (in the location you have created the Virtual Machine in the “Virtual Hard Disks” subfolder) Copy the file it to the folder structure you created earlier for the Virtual Hard Disks for the new Virtual Machine, by right clicking it and selecting Copy and then paste to new location. Once the Hard Disk Image File has been copied rename it to something more suitable

29 Create a new Virtual Machine, specifying the copied Virtual Hard Disk Image File you have renamed as the existing virtual hard disk to use - DEMO

30 Things to take into consideration when building your SQL Server environment
If planning to test AlwaysOn,Failover clustering in general or PowerView, you MUST configure a Domain Controller first If solely testing AlwaysOn you do not need to configure shared storage Adding additional SQL Components such as Analysis Services impact the performance of your Virtual Machines so choose wisely

31 Using internal network to connect to Windows 8 machine
Sometimes you want to install SQL Server tools and features on your Virtual Machines and you might want to test them on your local Windows 8 installation You can do this by configuring an internal switch in Hyper-V manager, add an IP address to your Virtual Machine

32 After you have done this you then go into your Network Adapter Settings on your local machine and configure the “vEthernet (Internal Virtual Switch)” in your adapter to be in the same IP 4 address range. –DEMO IF TIME PERMITTING

33 What else is setting up the Internal Network useful for
They’re also useful for transferring files to and from your Virtual Machines when you want no downtime It’s also very useful if the files in question are on a USB device as there is currently no USB support on the version of Hyper-V that comes with Windows 8 Professional However if downtime is OK on your Virtual Machines there is an alternative to this.

34 You can mount your virtual machine disks to your local machine
Mounting disks onto your local machine is useful if you want to copy files to and from your Virtual Machines whilst Virtual Machines are offline To do this: Locate the disks for your virtual machine Right click the disk in question and select mount When you’re done eject the disk by right clicking and selecting Eject - DEMO

35 Using Dynamic Memory You can use dynamic memory to control how much memory each Virtual Machine uses dynamically without any downtime You can configure this in the Virtual Machine settings by right clicking the Virtual Machine in question and selecting “Settings”

36 Configuring Dynamic Memory

37 Dynamic Memory considerations
You can only allocate as much memory as is physically available on the machine If you’re startup RAM is low (less then 1024MB), then your vm’s will take a long time to startup pending on hardware If your Minimum RAM is low installations of software will take a long time as the memory drops just after loading on systems that have low use and tends to not increase during installs

38 In addition to this another consideration is…
If installing SharePoint, especially SharePoint 2013, whichever Virtual Machines are in use will try and use as much memory as possible so allocate maximum RAM for them wisely

39 Whilst we’re on the topic of SharePoint
If you intend to install SharePoint to use Data Collaboration features such as PowerView in conjunction with SQL a few things to consider Virtual Machines MUST be on a Domain Virtual Machines will consume memory Certain versions of the PreRequisites installers only install nicely using the GUI if they are on certain OS’s (SharePoint 2010 with Windows Server 2008 and SharePoint 2013 with Windows Server 2012)

40 And there’s more considerations…
SharePoint 2013 PreReqs installer does not install nicely using the GUI on the current CTP for Windows Server 2012 R2 There are multiple workarounds for this however which are documented online If in doubt use only established versions of SharePoint installs with Operating Systems, a lot of SharePoint experts including Seb Matthews only discuss established versions

41 Recommended Configurations for Operating Systems and SQL VM’s
For Windows Server 2008 R2 or lower running SQL Server 2008 R2 or lower I recommend at least 1024MB startup RAM and dynamic memory from 512MB onwards For Windows Server 2012 installations I recommend allocating at least 2 virtual processors and minimum of 1024MB RAM (both startup and minimum dynamic)

42 Changing Virtual Processor Settings

43 SQL Server 2014 CTP1 tips SQL Server 2014 CTP1 does not install on Virtual Machines which have another version of SQL installed on them It can be installed on Virtual Machines with similar specs as SQL 2012 unless you intend to test In-memory OLTP (Hekaton ) on there in which case more memory is probably recommended

44 If installing it alongside SharePoint on same server make sure you install it AFTER SharePoint, otherwise issues can occur and the option to Repair the SQL 2014 installation does not work in CTP 1 If installing it alongside SharePoint 2013 on a Windows Server 2012 R2 server, remember that the GUI for the SharePoint 2013 PreReqs installer does not work properly on the Operating System, there are workarounds online for this and I will provide a link at the end of the session

45 Useful book to use as a guide for setting up a SharePoint Virtual Machine environment
Best book to use is Visualizing Data with Microsoft PowerView by Brian Larson & Co., contains a useful guide for configuring a SharePoint and SQL environment which you might want to tweak to match what you need

46 Where to purchase Can be purchased on Amazon, the Kindle version is reasonably priced (as of September 2013 it costs £13)

47 Useful links Bringing Hyper-V to Windows 8 Building a Completely Free Playground for SQL Server By Jonathan Kehayias

48 More links Installing SharePoint 2013 on Windows Server 2012 R2 Preview Hyper-V List of SLAT-Capable CPU’s for Hosts

49 Want to know more My main recommendation is to start using it for yourself as soon as possible as I personally think this is a powerful addition to latest Windows 8 Operating System If you don’t have Windows 8 as an alternative I’d download VirtualBox and use Jonathan Kehayias’s article to build a Windows Server 2008 R2 environment to become more comfortable with Virtualisation on your local machine.

50 Q & A


Download ppt "Come and meet my little friend Using Hyper-V on Windows 8 Professional"

Similar presentations


Ads by Google