Showing posts with label hyper-v. Show all posts
Showing posts with label hyper-v. Show all posts

Tuesday, October 9, 2012

Configuration Manager: Database Exploration, Part 2 - Notes

Before I continue on with this is "theme" that I've started, there are some very important issues I need to discuss.  Rather than boring you with a long introduction, I will just dive in and hit each one as I go.  I'll warn you that this is article is taking a sharp turn into a dark tunnel of seriousness.  No joking around here.  Very unlike my usual goofy stuff, but it's important to cover this before I continue on.

SMS Provider vs. SQL Server

From a "purely technical" aspect, you can interact with, and manage, a Configuration Manager site data store through the SMS Provider interface, or through SQL Server (ADO or ADO.NET, etc.), however, you absolutely NEED to be careful to avoid some easy mistakes.  This is all within the context of building custom applications which interface with your Configuration Manager infrastructure.  This is also regardless of whether you are working with Configuration Manager 2007 or 2012.
  • While you can query (retrieve) information from either interface, the SQL interface is usually much faster to execute. I'm obviously talking about using the ADO or ADO.NET pipeline.  However...
  • NEVER attempt to update anything directly through the SQL Server interface! All operations that involve modifying site resources, collections, or settings (and so on), should be performed through the SMS Provider only.  Some examples include adding a Package to a Distribution Point, or adding a Resource to a direct-membership Collection.  Going around the SMS Provider can cause serious problems for your Configuration Manager site.  I'll spare you the lengthy explanation of how the inboxes and outboxes are spooled and de-spooled in the background, and how it all weaves in and out of the database 
  • Executing intensive queries (or updates, for that matter) against the SMS Provider interface can impact Configuration Manager processing, especially if performed at peak processing times (discovery cycles, software deployments, etc.).  The net result may cause a backlog in data processing and show up in your component status logs as well.  Try to limit such activity to off-peak times or days to avoid impacting Configuration Manager itself.
  • Executing intensive queries directly against the site SQL Server database may also impact performance, and should be carefully monitored by using SQL profiling and performance logs to determine the level and duration of such impact.
  • Use the most efficient tool to handle a specific task:  If you are post-processing query results and spending a lot of code cycles calculating date differences, cost values, or mapping integers to string values - do that instead within the query!!!  SQL is so much faster and more efficient at many common data manipulation tasks than standard 3GL, 4GL programming languages or scripts.
  • Minimize Connections!  If you have code firing off multiple queries, be sure to pay close attention to how you open and close your data connections.  If you can use one connection for all of your queries, do it.  It will save time and reduce the overhead impact on the data store host itself. This is true for using SQL Server or the SMS Provider.

Database Separation and Isolation

Most any DBA with a fair amount of experience will advise you to avoid direct interaction with "mission critical" data stores if you can instead use a replica.  It really boils down to how time-sensitive the information is that you rely upon to accomplish the required task.  If you need to generate inventory reports, and your inventory is only updated every day or week, you probably could do just fine by pointing your queries at a replica database and avoid adding more overhead on your production database.  It's just one more thing to consider if you are worried about performance impact.

The Right Tools

If you haven't used SQL Server Management Studio, or haven't used it much, give it a try.  In fact, if you're testing your queries through your code debugger, STOP.  That's a bad habit and can yield some very skewed results.  As the old saying goes: "Just because you CAN, doesn't mean you SHOULD".  I can't count the number of times I've asked a programmer to minimize their code debugger and run the same queries in the SSMS console, and seen their reaction to how different the performance can be.  It can really highlight where program code is slowing down a conversion or calculation step that could be more efficiently executed within the SQL statement.  

It's not really about SSMS.  Any tool that lets you model and execute T-SQL statements directly against the data store will work fine.  It's when you run the SQL expressions from within the program code that things can get twisted.  Eliminating secondary and tertiary processing layers ensures you get an accurate, honest and clear picture of what's going on.

Safety

Living on the edge is cool, if you get paid to do commercials for Red Bull.  For the rest of us, it helps if we take certain precautions to avoid letting simple mistakes explode into disastrous calamities.  If you have the option of a test environment, use it.  If not, employ test-environment methods to mitigate unintentional impact on production systems.  It's really that simple.

Thursday, September 27, 2012

VMWare vs. Hyper-V on the Desktop

This is a "review" in my own words, based entirely on my own personal experiences.  I have not been compensated or rewarded in any way whatsoever by anyone for what I write (although, I sure wouldn't mind it if someone wanted to compensate me for my stupid ramblings).  So, here goes...

I upgraded my computer to Windows 8, and decided to add the Hyper-V "role" because my CPU supports Second Level Address Translation (SLAT).  There were (ok, ARE) two main reasons I wanted to try out Hyper-V 3.0:

  1. Hyper-V is included with Windows 8 at no additional charge
  2. VMware Workstation 8.x has been annoying as shit to me for too long

Annoying?  Really?  Yes!  I run VMware Workstation 8.x on a Windows 7 SP1 64-bit machine with 16 GB of memory, and a separate, dedicated internal hard disk for my guest machines.  Even so, I've been dealing with problems such as hanging when trying to power-down guest machines (especially 64-bit guest machines), and issues with guest machines not opening after installing incremental updates such as 8.0.4, etc.

So, after reading articles like this one on TechNet, this one on Windows IT Pro, and this one on 4SysOps, and hearing podcasts give glowing reviews about how awesome Hyper-V 3.0 is, I decided I have to give it a try.  I have been using VMware Workstation since the first public release.  I've also used GSX Server, VMware Server, VMware Player, ESX Server, but never used any of the vSphere product line.  I've never used Virtual Server or Hyper-V either, so I've been kind of immersed in the world of VMware for a long time.

When I finished loading up and configuring my Windows 8 desktop, I added Hyper-V and started kicking the tires.  By the way, if you want to run Hyper-V 3.0 and VMware Workstation 8.x "side by side" on Windows 8, it can be done, but you need to configure a few things.  Here's a rather good rundown on how to do that.

A Little Background

Keep in mind that one of my primary job functions is software "packaging", "re-packaging" and testing software installation and configuration "deployments".  These are basically fancy terms for preparing some crappy software from a half-assed software vendor so that it can be installed "silently" on thousands of computers over a single night.  By "silent" I am referring to making a pre-configured installation that doesn't display any dialog forms or require any user input.  They just install quietly and hopefully all is well on the other end when the user shows up and double-clicks the shiny new shortcut in the morning.

A fairly typical "setup" for doing this sort of work involves building several virtual machines (aka "guest" computers), or "VM's" to suit a variety of environmental conditions to support the packaging process.  This often includes having one VM that is set for "host-only" networking (can't connect to any outside resources, remote servers, the Internet, nothing at all), another that is set for NAT, and another set for Bridged mode, which mimics being a "real" computer directly on the network LAN with it's own IP address.

The "host-only" VM is helpful for ensuring the desktop environment within the VM is isolated and protected from outside influences and manipulation.  This includes anti-virus scanning, firewall issues, Group Policy, outside scripts and programs, unplanned remote connections, and pretty much anything that could possible interfere with a "clean" state analysis and state capture. (note: a "state capture" is when you capture two states of the configuration and compare them to identify every single change that occurred in between).  Outside influences and ruin attempts to capture a clean system state when dealing with complicated software installation and configuration analysis.

The "NAT" or "Bridged" VM is helpful for testing the final deployment package to ensure it (A) installs properly on a computer that is configured identical to a "real" production computer, and (B) provides a non-production target that won't impact anyone else if it crashes, fails or needs to be rebooted multiple times.

Absolute Essential Features

There are some basic features that are critical to have available within each of these VM configurations:

  • Snapshots
  • Client/Host Integration (i.e. clipboard, shared folders, etc.)
  • Dynamic ISO mounting
Both VMware Workstation 8.x and Hyper-V 3.0 support all three of these features, however, there are some HUGE differences that really surprised me.

Snapshots

A "snapshot" is simply a captured state of a virtual guest machine that allows you to return to it at a later time, after, say, you've hosed it up really bad and need to get "back" to a point where it was in good shape.  VMware Workstation supports making multiple (read: limited only by available disk space) snapshots.  Hyper-V 3.0, as far as I can tell, only allows you to maintain one snapshot per virtual guest machine.

VMware Workstation gives you a fairly decent little GUI dialog form to browse your library of snapshots to help you organize and decide which to use at any given point in time.  It also makes it easier to "clone" a guest machine to create another by selecting a particular snapshot to make the clone from.

As far as I can tell, Hyper-V 3.0 not only limits you to one snapshot per guest machine, but provides no GUI interface for dealing with the snapshot, nor does it provide a "cloning" feature.


Client/Host Integration

One of the features I rely upon heavily is the ability to copy objects (files, folders, etc.) from my physical computer environment into my virtual guest machines, and do the same in reverse.  This isn't just a "nice feature".  This is a MUST.  I need to quickly copy files into my "host-only" virtual guest in order to perform installations, run configuration changes, collect diagnostic and state information, and extract the results back out to other environments to support the repackaging process and the testing process.

VMware Workstation provides two features to help with this:  Guest Isolation and Shared Folders.  Hyper-V 3.0 offers a "text-only" clipboard, and only in one direction:  Host-into-Guest.  Not useful for my needs at all.


The "Shared Folders" feature is a feature in VMware Workstation that lets you connect a network location inside the virtual guest machine to a physical folder or share, either on the physical host (the computer running VMware Workstation), or a UNC share path on a remote server.  Hyper-V 3.0 does not offer this feature.

Mounting ISO Files

This term refers to controlling the use of the CD/DVD drive within a virtual guest computer by configuring it to open a .ISO file rather than connect to the physical CD/DVD drive on the physical host computer.  Both Hyper-V 3.0 and VMware Workstation (and the "free" VMware Player product) support mounting .ISO files to the virtual CD/DVD drive.

Conclusion

We've all heard the Microsoft gets things right by version 3.0, but not in this case.  Yes, it's "free", sort of, but does not kick VMware Workstation off the playground?  Maybe if you just like to play around in virtual machines, which it handles just fine.  But if you do serious work that requires any of the features I've discussed above, the answer is NO.  I simply cannot dump VMware Workstation right now, it does what I need, while Hyper-V 3.0 does not.  In fact, I may have to consider upgrading to VMware Workstation 9.

Am I giving up on Hyper-V 3.0?  No.  I will keep using it, because I want to gain familiarity with it and learn some new tricks (I'm not dead yet, after all).  I may follow-up on this as I learn new things along the way.

What would change my mind?  If Hyper-V 3.x (or 4.x) were to provide the following features I would probably switch over:
  • Drag-and-Drop clipboard between host and guest
  • Shared Folders
  • Multiple Snapshots
  • A GUI snapshot manager
Until that happens however, I will continue to play around with Hyper-V but I can't rely on it for getting my daily work done on time.

Monday, August 29, 2011

FLEXlm and your IT Department

I really wish more people using FLEXlm would at least sit down and talk with their IT department and act like a "team".  You know: Act like they work for the same damn company.  One of the most common mistakes I've seen is when the CAD group and the IT department develop an animosity towards each other, and any hope of cooperative planning and execution is pretty much destroyed.  It puts the company in the position of setting the baby in the street waiting for a truck to come along and run it over.

When you involve your IT department, you gain the advantages of expanded resources, greater oversight, and better fault tolerance.  I mean REAL fault tolerance.  One example is backups, especially backing up the FLEXlm license files, but also option files, service configurations, and so on.  More than that, you gain the advantages of putting the entire server into a virtual environment (Hyper-V or vSphere, for example).  One of the most common risk scenarios I've seen is running all your licenses on ONE physical server.  Even two physical servers is not a good idea.  Sure, it works.  But when it fails, it means a lot of unnecessary work ahead of you.

When servers are virtualized properly (e.g. distributed, SANs, failover, etc.) you make your license availabilty resilient.  That word has been overused and burned out by marketing pukes after a few too many Martinis and golf course sunburns, but the word has a real meaning to IT architects and engineers.  It means that your systems can bounce back from potential failure.  When all licenses are on one physical server, not only are you facing the task of rebuilding a failed box, but reinstalling the licenses and dealing with hardware changes (i.e. a failed NIC or hard drive).  In the virtual world those things remain portable and tied to the virtual guest.  But WAAAAAAAAY more important than that is the ability to use VMotion or Live Migration, which automatically, and seamlessly moves a virtual guest to a different physical host node when problems occur.

Most small engineering shops don't often bother with network licensing, so it's usually medium to large shops that have a real "IT department".  If you have "servers", hopefully some are "virtual" (if none of your servers are virtual, it may be time to have a discussion with your IT staff), and if you have virtual servers, you should be considering that approach for your FLEXlm servers.

Monday, December 24, 2007

2008: The year of server flipping

We've all heard too much about "flipping houses" on various TV shows, magazines, web sites, etc. The practice of buying a "fixer-upper", fixing it upper, and then selling it for a profit, is a respectable effort (even a profession in some cases). But how does this fit with the IT world?

Simple: It fits with virtualization and existing hardware. A lot of the buzz being regurgitated on the web today is about how much virtualization will play in data center plans for 2008. There are all sorts of reasons and rationale provided. The interesting thing is how the various offerings will "fit" with respect to budgets and refresh cycles in most medium/large data center environments.

Many big spenders just finished a round of big spending, so it may be a tough thing for many IT managers to gently pry open the boardroom door again and kindly ask for more funding to chase after yet another enticing goal. The benefits are easy enough to justify and bulletize:
  • Run more roles on less hardware
  • Reduce electricity costs (hardware, cooling, etc.)
  • Portability and failover simplification (aka Disaster Recovery)
  • blah blah blah

Then comes the clincher: How much?

Well, the answer is, as always: "It depends".

On what? Well, you may be able to leverage your existing hardware, but that depends on which virtualization platform product line you intend to pursue. EMC's VMware ESX Server, Microsoft's upcoming Hyper-V and Hyper-V Server products, and open source (sort of) products by Xen and others, each have their own hardware limitations with respect to the physical host machine. That said, in a perfect world, many will be more than happy to buy new hardware with the latest and greatest goodies built-in, and begin consolidating their older machines into VM guest instances on the newer box. But in reality, many will be forced (by the evil budget folks) to make-do with existing hardware. In many cases that will mean hardware that won't run 64-bit products.

What to do?

Many will roll up their sleeves, drink some coffee, tell a few bad jokes, and while everyone is trying hard to laugh (like it was really funny), the IT tech will be switfly wiping a box and reloading with something like Linux and VMware Server 2.0, both of which are FREE and run just fine on 32-bit hardware. Ideal? Not really. But then again, define "Ideal". It is an entirely subjective term, like my other favorite terms: good, great, ok, fine, not too bad, and my favorite of favorites - so-so.

I will call this "flipping servers", since it's not moving things (servers) from older hardware to virtual instances on newer hardware. It will be ripping the walls and floors out and rebuilding the insides of the house and moving all new appliances and furniture (and tenants) in. Slick-n-reload as many refer to it.

So, for 2008, I see a considerable amount of server flipping in the pipeline. Everyone wants to virtualize and consolidate and gain from the benefits. But many don't have the budget or the cojones to ask for a budget increase to do it the way the vendors recommend. And is this really a failure? Hell no. Not by a long shot. It's getting the job done within imposed constraints. And in most cases it will work just fine. Maybe not for the likes of eBay, Amazon.com, or WSJ, but for most small-medium business data center environments (ok, "server rooms" for most of us), it will be what works and be affordable and attainable.