Virtualisation

SharePoint Saturday: Lab Rooms

Submitted by Robert MacLean on Fri, 10/07/2011 - 13:24

imagelogo_wp75-h_webNext weekend (15th Oct) Cape Town is hosting the SharePoint Saturday conference and myself and fellow BBDer Rudi Grobler will be there and will be and we are running a very special event in conjunction with the main event: Lab Rooms!

There will be two special rooms available and in one Rudi will presenting and training on Windows Phone 7 and in the other I will be presenting and training on the Windows Azure Platform!

The cost for this? FREE! It is being sponsored by BBD & the SharePoint Saturday event Smile

Space in both rooms is VERY VERY limited, so you need to register NOW!

Windows Phone Registration: http://wp7camp.eventbrite.com/

Windows Azure Registration: http://windowsazurecpt.eventbrite.com/

Community night in August

Submitted by Robert MacLean on Tue, 07/26/2011 - 15:35

Important Notice for August 2011

Community night is normally the second Tuesday of the month, however since that is a public holiday it has been moved to Monday the 15th of August!

What is community night?

For those who do not know this is a FREE event that happens monthly where a variety of user groups get together at Microsoft's offices. User groups are not influenced by Microsoft, they just use the facilities. User groups that are there on a regular basis:

  • Information Worker: Technical focused SharePoint & Office
  • Business User Workshops: User group that looks at the issues that face power users in enterprises. This month the understanding where a portal ends and CRM begins.
  • Game Dev: One of the biggest with plenty of game developers & artists getting together.
  • JavaScript: For all you JS fixes
  • Mobi: My good friend Rudi Grobler hosts this group focused on mobile (iPhone, Android, Symbian and Windows Phone)
  • UX: For those who understand there is more than 16 colours
  • Architecture: For architects of any IT systems!
  • Languages: For developers who are interested in learning the pros & cons of other languages.
  • SQL: The fantastic Gail Shaw runs the best SQL user group anywhere!

There is also FREE beer, cool drinks & pizza!

Where is Microsoft’s offices?

Microsoft Bryanston Office
3012 William Nicol Drive
Bryanston
2191 Johannesburg
South Africa

Click here for map and more details.

Times?

Various user groups starts at different times. I think the first UG kicks off at 16:00 and it can run to 21:00.
However depends if you attend multiple UG, stay for passage conversation, etc…

So up to you, I have nights where I arrived after 17:30 and other times left at 18:00, no pressure!

Convert VirtualBox (vmi) to real disk?

Submitted by Robert MacLean on Tue, 05/31/2011 - 12:20

It is often the case I need to setup training machines and a sometimes I get VirtualBox images which I need to deploy to the machines. I tend to avoid virtualisation on the training machines because of driver related issues, especially with graphic cards and things like WPF (which powers Visual Studio). If you have a good graphics card & good drivers then you can get a decent perf improvement with WPF apps, but unfortunately some virtualisation drivers are too poor.

So how can I take an virtual hard disk created in VirtualBox and easily convert it to physical disk so it can just run?

Process:

It is possible but it is not easy to a real disk but it is not easy.

  • Step 1: You need to use a tool from Microsoft called SysPrep to unload the drivers. Basically this means that it strips all the driver info out, and puts the image in a clean state so that the next time it boots Windows searches for the hardware again. If you do not do that Windows will freak out because the hardware it expects does not exist.
  • Step 2: Then you use a tool designed for disk imaging to create an image. Tools like Norton Ghost (paid) or CloneZilla (free) are designed for this purpose and the image they create is portable unlike the vmi (VirtualBox hard drive) format which can't do this well.
  • Step 3: You then restore that image to the real disk using the same tool and you are done.

Slightly more work than you would expect, but that is a solution which always works.

Caveats:

I have not tried this with Hyper-V or VirtualPC disks (vhd) yet, but I suspect VirtualPC will work fine. Hyper-V has an additional Hypervisor layer and I suspect that SysPrep will not remove that and the restoring process will fail.

Finally you also want to be careful with SysPrep as it can have some undesired effects with certain software, for example SQL Server. There are specific steps to go through if you want to use SysPrep & SQL Server: http://msdn.microsoft.com/en-us/library/ee210754.aspx

So make the time to have the first few attempts fail and learn the nuances of the software you work with.

Tech·Ed Africa 2010: Want to go for free?

Submitted by Robert MacLean on Tue, 08/24/2010 - 09:53

Win 1 of 4 Tickets to Microsoft Tech·Ed Africa 2010 worth R6 150 each!!!

Venue:    ICC Durban

Date:       17th - 20th October 2010

All you need to do is take a photo of a Microsoft Tag in a really cool/funny/practical place and upload the picture to the Facebook competition page.

More details in the competition animated video here.

Full Competition Rules on our Facebook page.

Dates for Submissions & Announcements of Winners:

  • 25 Aug 2010    -    Last Date For Submissions (week 1) (5pm)
  • 27 Aug 2010    -    Week 1 Winner Announced
  • 01 Sep 2010    -    Last Date For Submissions (week 2) (5pm)
  • 03 Sep 2010    -    Week 2 Winner Announced
  • 08 Sep 2010    -    Last Date For Submissions (week 3) (5pm)
  • 10 Sep 2010    -    Week 3 Winner Announced
  • 15 Sep 2010    -    Last Date For Submissions (week 4) (5pm)
  • 17 Sep 2010    -    Week 4 Winner Announced

Submissions & Announcements of Winners:

  • A new winner will be selected weekly.
  • Last date for submissions for a particular week is 5pm Wednesday of that week.
  • Winner for that week will be announced on the Friday.
  • Submissions after 5pm will count towards the following week.
  • Submissions which did not win in a previous week will still be considered in following weeks and need not be re-submitted.
  • A person can only win once, thereafter all his other submissions will be ignored.
  • You cannot submit on behalf of another person.
  • Submissions are done by posting a photo to the Facebook page wall.

Terms and Conditions apply:

This competition is limited to Tech·Ed Africa 2010 entrance and does not include Travel, hotel or any other expenses. You will be required to help out at the Developers Community Lounge at Tech·Ed Africa 2010 for 3 hours a day if you do win. For Full list of rules please consult the Facebook page.

WinImage - Tidbits from the field

Submitted by Robert MacLean on Thu, 11/06/2008 - 16:38

I have posted before about the great tool called WinImage and how I think it is brilliant! I have been using it on and off recently and decided to share some tidbits of information about it.

First is a minor annoyance when extracting from an image, the default option is set to Ignore Folders. This means that the content of the folder you selected gets extracted but no sub-folders. If you want to extract everything from your folder down you must select Extract with pathname. This should be the default option since it’s the one I use most of all, and I suspect most people will use. What is nice is that it does remember what you last used, but still that first time it is annoying cause you will forget.

a2

There is a plus on the extracting of files and that is the ability to Extract all files into the same folder. Which extracts all the files from the selected point down and any sub folders but does not create the sub folders. I haven’t ever needed it, but it’s nice to know there is an option there if I do need it.

The other cool feature when extracting is that an icon appears in the task tray which if you hover over it gives you a tool tip, which isn’t that cool. The cool part is the image grows based on how far it is to completed so you can glance at the icon and quickly see the progress without needing the tool tip. In the pictures below note the first icon growing:

a1  image a4

The first tool for anyone using virtualisation

Submitted by Robert MacLean on Wed, 09/17/2008 - 21:36

I am a fan of virtualisation, my comments on an earlier post about it being the future should be a give away. As such I have a “few” VHD's around and sometimes I have problems which the out of the box technology can’t cope with. A few of these are:

  1. I sometimes there is some code, or a sample or I need to get a file to fix something which is sitting in the VHD file. The pain here is that to do that you need to boot up the VM, login in to it, find the file and copy the file to the host machine.
  2. As pointed out before I work in a team which does not prescribe to what is the best tool to use. I personally use Hyper-V but that’s me. VirtualPC is used by some people who are running Vista or XP, VMWare is popular with lots of people (duh) and so is Xen, so how do I get my files to them?
  3. Some times I need to test something that runs on a live system so I need a VM of the system.
  4. Other times I want to deploy what I have done on a VM and deploy it to a physical machine.

Well all the above are just plain annoying, but thankfully there is a program called WinImage! (It does come with a 30day full functional evaluation edition, so don’t worry if you need to test this out before you buy it.)
So how does it solve my problems? (The numbering of each point below matches the issues I list above)

  1. It allows you to open a VHD’s directly as well as a number of other formats, like ISO or VMWare’s formats! It's very simple to use as as well (similar interface to most compression tools like WinRAR or WinZIP), so you just go to File -> Open, select the VHD and it displays the contents of the almost VHD instantly (the 47Gb one from the previous example in about 2 seconds on my standard spec laptop). Now you browse it like you would any other file system, find the file, right click and hit Extract! There are even options to extract multiple files and keep the folder structure when extracting!  
  2. Moving between Hyper-V and VirtualPC is fine (VHD is a compatible format between them), all I have to do is uninstall the additions before I move it. I keep VirtualPC installed for this purpose but that’s all it gets used for. WinImage allows me to convert between VHD (Virtual Server, VirtualPC and Hyper-V) and VMDK (VMWare). I can also convert from an IMA (image) file to VHD and VMDK but not too it. Unfortunately there is nothing for Xen yet, but hopefully as it gets more widely used we will see something.
  3. I can rip an image of a real hard drive to a VHD or VMDK format! And because WinImage doesn’t need to be installed (it’s a single .exe which can be run from the zip archive) it makes it easy to get it onto a server! 
  4. The same is true if I have an image I can write it to a physical hard drive, so no more extracting and coping and rebuilding. Once your environment works, just deploy it!

image imageClipboard01

Hyper-V Shrinking a VHD

Submitted by Robert MacLean on Mon, 09/08/2008 - 22:09

Virtualisation is the way of the future, be it for demos or testing or production systems it is the future, and that means VHD files will be everywhere. However VHD files grow and grow and never shrink because of the way they are designed to work. For example if you put a 10Gb file on a VHD, it expands the VHD by 10Gb (for the disk) but if you delete a file the space of the VHD isn't reclaimed automatically.
This is pretty much ok for production systems (your VHDs live on a SAN with lots of disk or they should do for a lot of good reasons).
However if it's on your laptop for training/R&D or sending to customers being able to claim that disk space can be valuable and the advantage is it can be done manually so let me show you how it can be done in Hyper-V.
For this post I have a VHD which contains a MSSQL database (MDF and LDF) file on it, the disk space usage on the VHD for the drive looks like this:

image
So the VHD is supposedly a max of 300Gb and I have never copied that much on to it, and at the moment it contains a simple 53Gb and some change on it. The actual VHD file on my laptop looked like this, using a nice 117Gb of real disk space. So there is at least 64Gb I could get back!

image
The first step in shrinking the disk is to defrag it on the virtual machine, as the shrinking process only cleans space from the end of the disk. So if you have any data at the end like I did (see below) you'll need to (re)move it. Unfortunately as you can see I had an unfortunate "unmovable" piece of data conveniently at he end of the disk. Thankfully it turned out to be the LDF file for the SQL database.

image
So a quick truncate/empty of the LDF file (don't do that in production, but if you want to know how I did it see here) made it a lot easier to defrag the disk (especially) getting the data at the end freed up. Since I didn't have too much free time I skipped the defrag, so just working on the big (now) empty space available before the MDF (blue) file.

image
Step two is to shut down the VM, then go to the settings and go to the disk settings and click edit. This will bring up the disk edit wizard and the keep the first selected option, Compact.

image
This is very cool  because is actually loads the VHD as a disk on host operating system! In fact you can browse it and edit it (I would guess, but that may screw the compact up). This is similar to the VHDMount tool in Virtual Server. I am not sure how to do it manually in Hyper-V yet, because it would be really cool to be able to do that now.

image
After some time, let me rephrase that a significant amount of time, which in my case was a 6 odd hours,  it finished compacting the VHD file to 60Gb less!

image

Hyper-V and Win2k3 Network Card

Submitted by Robert MacLean on Tue, 07/08/2008 - 07:37
So if you are installing a Win2k3 machine as a Hyper-V machine you will find out you need to install Service Pack 2 prior to installing the integration components (this is the stuff which increases performance, allows the mouse to work etc…). So besides putting in a DVD and accessing that there isn’t much option, because the network card it is configured with by default doesn’t work until the integration components are installed.

The solution is to remove that network card and add a Legacy Network Adapter under the Add Hardware section.

This network card works regardless of integration components, but is not as fast. So once you are up and running don’t forget to change it back.

Great Hyper-V Post

Submitted by Robert MacLean on Fri, 07/04/2008 - 07:51
Great post I found on the blogs about 5 key things to know about for Hyper-V, thought it may be of use to someone following my previous post on Hyper-V. Definitely don’t agree with their number one point that for serious usage it should be run on Core, we because of the reasons in this post. Anyway you can read more at Top 5 things to know about Hyper-V

The Zen of Hosting: Part 9 - Hyper-V

Submitted by Robert MacLean on Tue, 07/01/2008 - 11:47

As I approach the end of this series I want to highlight some of the technology that the hosting machine is built on and some of the experiences I learnt with that. These last few posts are much shorter than the earlier ones but hopefully provide some quick bite size info.

So if you have looked at standard HMC then add all the technology we have added to it, you would assume there is a building full of servers. The reality is the server room has got lots of space and isn’t that big. How did we achieve this? Slow applications because we running everything on a fewer servers? Not at all.

We bought some seriously powerful HP machines loaded a ton of ram and installed Windows 2008; but how does that help with running lots of systems and doesn't HMC break if it runs on Win2k8 (see way back to part 2)? Well Win2k8 has the best virtualisation technology Microsoft has ever developed, named Hyper-V. This is seriously cool stuff in that it actually runs prior to Windows starting and virtualises Windows completely (rather than running virtual machines on an OS, they run next to it). The performance compared to Virtual Server is not even worth talking about, it basically pushes Virtual Server into the stone age.

It is very fast and it seems to handle the randomness of the servers usage (those little spikes when you run multiple machines at one piece of hardware) so very well. But not every thing is virtualised, there is a monster of an active-active SQL Server cluster (since so much needs SQL) and we have a number of oddities such as the box which does media streaming due to the fact that some specialised hardware can’t be used in a virtual machine. A worry for when we started with Hyper-V was it's beta/rc status... Well with thousands of hours of uptime logged so far by servers on it, it has been ROCK solid.