Category Archives: virtualization

Open vSwitch: basic initial setup on Ubuntu 12.04

Software defined networking is all the rage these days in IT, and Open vSwitch is where most people get their first introduction. Whether you’re running KVM or Xen, Open vSwitch will allow you to abstract network setup functions from the hypervisor. Here’s a quick guide to setting up Open vSwitch and replacing a physical interface with a virtual one:
Continue reading

kvm-qemu: scripted clones of virtual machines

KVM is quickly becoming a viable competitor to paid vendors given the wide variety of features it offers in comparison (Memory page sharing, live migration, HA clustering, the list goes on and on…). Cloning virtual machines is common practice when deploying large environments with many virtual machines. Here’s a quick and dirty way to clone a virtual machine that could easily be scripted to deploy a large number of virtual machines:
Continue reading

vSphere PowerCLI – slot metrics

We’re not talking about coin slots here people! vSphere 5 uses slot sizes to determine the capacity for high availability (HA) fail-over metrics. Here’s a quick and dirty way to see what your current slot size is:

Connect-VIServer <vCenterServerName>
$Cluster = Get-Cluster -Name <clusterName>
$SlotDetails = $Cluster.ExtensionData.RetrieveDasAdvancedRuntimeInfo()
Write-Host -ForegroundColor Green "`n Slot info for <clusterName> cluster `
`n Number of vCPUs per slot: $($SlotDetails.SlotInfo.NumvCpus) `
`n MHz per slot: $($SlotDetails.SlotInfo.CpuMHz) `
`n Memory (MB) per slot: $($SlotDetails.SlotInfo.MemoryMB) `
`n Total Slots = $($SlotDetails.TotalSlots) `
`n Used Slots = $($SlotDetails.UsedSlots) `
`n Available Slots = $($SlotDetails.TotalSlots - $SlotDetails.UsedSlots)"

Be sure and replace <vCenterServerName> with your vCenter server name and <clusterName> with the HA cluster name for which you need slot information. This can be useful when determining your current fail-over capacity, just be sure your slot size is adequate for your environment. You should see output similar to the following:

Name                           Port  User
----                           ----  ----
<vCenterServerName>            443   <user>

 Slot info for <clusterName> cluster
 Number of vCPUs per slot: 2
 MHz per slot: 500
 Memory (MB) per slot: 1024
 Total Slots = 250
 Used Slots = 32
 Available Slots = 218

PowerCLI C:\temp>

Thanks to Alan over at http://www.virtu-al.net/

Windows 7, vSphere client, white console screen – punt!

When I saw this bug, I have to admit it was a face–>palm moment. Really I’m not sure who’s at fault here, Microsoft for implementing new features in their OS (What were you thinking!?) or VMWare for not supporting the new features. Here’s a quick and dirty description of the problem, affected versions of software, and how to work around it:
Continue reading

esx 3.5 and snapshots

If you’ve ever setup or administered VMWare ESX you’ve likely seen options for taking snapshots of your virtual machines.  While this is a great tool, it’s not without its dangers.  For instance, if you have 2 hard disks:

Disk 1 = 20GB
Disk 2 = 250GB

Now let’s assume you’re writing ~1GB of data a day to disk 2 and you need to take a snapshot of your OS running on disk 1.  You conveniently take a snapshot through the context menu for your virtual machine.  Here’s where the danger comes in.  When you snapshot a VM with more than one disk, all deltas (In ESX 3.5 at least) are written to the datastore where your system disk is located.  So assuming you are writing 1GB of data a day to drive 2, you likely have around two weeks before drive 1 fills with delta data from  drive 2 after your snapshot.