Tag: windows

  • Virtual Lab – Creating Differencing Disks

    This is part of my series on building a virtual lab for use with SQL Server and Windows. You can see the entire series here: Building a Virtual Lab with Hyper-V.

    The whole point of virtualization is better use of resources. Whether it’s CPU, storage, networking, power, etc., we are trying to save having to purchase 5 or 6 machines and connect them all, pay for them, etc. It’s much, much easier to use virtualization.

    This is especially true of storage. When we build a lab, we don’t want to have to allocate a ton of space for our systems. In my case, for my design, this is what I want to end up with.

    virtlab_o

    From my last post, I had the bottom two files already set up. These are my installations of Windows Server 2012 R2 Standard and Core, sysprep’d and ready to use.

    Differencing – Saving Space

    The idea in differencing disks is similar to the snapshot feature I used in VMWare to do this same process. I take a base disk, and create a “copy” of it. Except the copy doesn’t have everything from the base disk. Like a database snapshot in SQL Server, if I need to read something that’s in the base disk, I reference that. If I change something, or add something, I read from the copy.

    As you can see above, I have 5 small disks at 4MB and my 2 large base disks. Each of the small disks is a differencing disk off either the Standard or Core base installations.

    I created these by selecting New Hard Disk in Hyper-V Manager

    virtlab_i

    After the intro screen, I make sure I’ve picked VHDX.

    virtlab_j

    At the next screen, I choose the differencing option.

    virtlab_k

    Now I need to pick a location for the copy. On my setup, I’m trying to keep this lab contained, so I have a WS2K12 Lab folder. I choose that as my location for the differencing disk. I give it a name, in my case, I’m using “Function” concatenated with the name of the Windows host. As seen below, my file server will be named “FileAvalanche.vhdx”.

    virtlab_l

    Next I choose the parent disk. this is the base image. Depending on what I had in my design, I choose the Standard or Core images for various machines.

    virtlab_m

    I get a summary where I can see all my options, and then click finish.

    virtlab_n

    I do this five times and all of a sudden I have a lab.

    A few things. Use some naming convention so you can tell which disk is which. Also, make sure you stick things in a location. I set a specific folder location for my VMs and disks, and then altered the Hyper-V Manager settings to default to this folder. On my machine that’s D:\Virtual Machines.

    That helps me keep things contained, and it also means that when I want to copy a VM for a backup or to another machine, it’s easy.

  • Building a Virtual Lab with Hyper-V

    I needed to get this one on Hyper-V, so I decided to document the process. I’ve put together a series that looks at the steps I took.

    This will fill in as I go through the process, so if there’s something you don’t see, it’s coming.

  • Virtual Lab – Design and Setup

    This is part of a series where I set up a virtual lab for testing and misc work. The other parts in the series are here: Building a Virtual Lab with Hyper-V.

    I haven’t had a good lab set up since I moved from VMWare to Hyper-V on my systems. Since then I’ve had a number of random VMs set up, but none connected in any meaningful way as a domain. They were all standalones, but that needs to change.

    I wanted to do some additional testing with a few Windows and SQL features that needed a domain. So I decided to set one up with Hyper-V.

    I googled around and found a few references:

    I decided to try to do some of this myself, using these as guides, but also incorporating some of my new Powershell knowledge along the way. I won’t claim this is the best way to build a virtual lab, but this is the way I did it by cobbling together various piece of information.

    With that in mind, here’s what I’m looking to do. I want to create a domain with a few servers and a client for testing. I plan on making this setup on a separate network, using the 10.10.10.x address space as I don’t expect to run into networks with that one at home, or work.

    The machines I’m looking for are as follows. The role, OS, and then names are listed below:

    • DC (WS2K12 R2 Core) – DenverDC
    • SQL Server instances (WS2K12 R2 Core and Standard) – Broncos, Nuggets, and Rockies
    • File Server (WS2K12 R2 Standard) – Avalanche
    • Client (Win 8) – Keystone

    I’ll be running through the process and trying to document this for myself, and others.

    First Steps

    The first steps here are easy. I have Hyper-V setup, but if you don’t, it’s an easy confg item you can see at the beginning of this article.

    Next, download software. I didn’t have Windows Server on this machine, so I accessed MSDN and downloaded Windows Server 2012 R2. I have an MSDN license, so I get a few licenses. As this was downloading, I made not of the product keys.

    I’ve had a space on my machine setup. Since I used to use VMWare and Hyper-V, I have a space on my spare drive where I separate Hyper-V and VMWare. Inside the Hyper-V folder are my VMs for quick copying to my external drives and laptop as backups. In this case, I’m setting up a “WS2K12 Lab” folder.

    virtlab_g

    The Parent

    This is a standard setup I’ve seen in all the tutorials. Create a VM, create a new hard disk (I used defaults), install Windows Server, and run “sysprep” on the VM. I did this with both Core and Standard Server. This gave me two hard disks that had images of the server systems on them.

    virtlab_h

    I first set these disks to “read only” and then deleted the parent VMs. This gets me the base systems on which I will build things. I’ll deal with the Win 8 client later.

    That’s all I’m talking about here. I’ll move into the rest of the steps in future posts.

  • The Powershell Challenge

    indexI’ve been wanting to do more with Powershell (PoSh). I’ve seen Allen White present on it for years, and I’ve dabbled in various ways, using it to handle small tasks. However I haven’t really committed to learning a bunch of PoSh.

    Last month I was with Grant Fritchey on the 2013 SQL in the City tour and in one of his sessions, he uses some Powershell to audit his SQL Server instance. I thought that was pretty cool, and it made me want to dig in further. At the end of his talk, he mentioned a book, and I decided to grab it.

    It’s Learn Windows Powershell 3 in a Month of Lunches from Don Jones. The name alone made me want to grab it, and it has a catchy title.

    My plan is to take time every day or two and read a chapter and work through exercises in the book. I really want to get more comfort in PoSh because I do believe in it and I think it’s a fantastic way to get things done. I don’t work at scale, but I suspect with a little practice I’ll be using PoSh more often for simple things and saving those scripts.

    I’ll blog along the way and see how things are going. Once I get through, I expect that I’ll be digging into more with other articles and books that deal specifically with SQL Server.

    The days in the Challenge: