Converting a Virtual PC image to Hyper-V

So I finally did it.  After “playing” with Windows 8 on many devices for some time I finally upgraded my daily machine to Windows 8.  I mostly wanted to do this because the ability to use Hyper-V.  Don’t get me wrong, I love Windows 8, but I NEEDED 64bit VMs and Virtual PC can’t do that.  My choices were VMWare or VirtualBox.

As much as I loved Sun, I am less enthusiastic about Oracle and the ‘Always trust Oracle Corporation’ option during the setup frankly creeps me out.  Virtual PC has worked well for me and lets me use my existing Hyper-V knowledge to do things like differencing disks.

I took an existing Virtual PC disk I had and decided I would now use it in Hyper-V.  It started right up, like nothing, but I couldn’t get the mouse to work.  It sort of worked, but didn’t left click.  After a little fooling around (and using some mad keyboard shortcut skills) I arrived at my solution: I had the integration features from Virtual PC installed.  Not only could I not install the Hyper-V integration features, I also could not use the mouse.

Some more keyboard ninja work and the old integration components were uninstalled.  After a reboot (which now takes that image about 15 seconds on the same hardware compared to Virtual PC’s 1 minute plus) I was in business.

Yes, Virtual PC had been a little long in the tooth, but Hyper-V on Windows 8 is AWESOME.  Best of all I can shift images in and out of Azure VMs.  I haven’t done too much of this yet, but will write more as I do.

HDInsight – Hive part 1

I decided I’d write a little about my first experiences with HDInsight over the last few weeks.  There is a great getting started guide located here (and samples that come with the software): http://gettingstarted.hadooponazure.com/gettingStarted.html

So I was excited to play with my Windows Hadoop cluster (HDInsight) and thought I’d break out some of the samples for it.  The good news is they all worked! 

After loading some data I decided to browse the example for running a hive job.  I then decided to go through some of the steps to work with hive without using the pre-packaged script.  Here’s where things got interesting create.hql shows the query for creating with and populating the hive table.  It’s shown below:

drop table w3c;
CREATE TABLE w3c(
 logdate string,
 logtime string,
 c_ip string,
 cs_username string,
 s_ip string,
 s_port string,
 cs_method string,
 cs_uri_stem string,
 cs_uri_query string,
 sc_status int,
 sc_bytes int,
 cs_bytes int,
 time_taken int,
 cs_agent string,
 cs_Referrer string)
row format delimited
fields terminated by ' '
;
LOAD DATA INPATH '${hiveconf:input}' OVERWRITE INTO TABLE w3c

Run this command and you will receive the following:

The syntax of the command is incorrect.

Doh!

I messed around with this a little bit at this point and then decided to give Bing a turn with it using the following search query: “HDInsight Hive The syntax of the command is incorrect”.  To Bing’s credit (and yes, it is my normal search engine – I like the pictures) the second result was http://gettingstarted.hadooponazure.com/releaseNotes.html which contained

•Hive Console

•If a newline is included in the Hive command submitted, you will get a “syntax error.” Remove newlines and the query should execute as intended.

While writing this I tried with Google and it wasn’t even on the first page!  Take that!

So now I had my answer and could move forward.  Running the commands one at a time, because I felt like examining the steps better, I was able to stand up and use the queries so long as they were on a single line.  If they’re submitted as jobs it seems to be OK. 

Now I decided I would try my hand at doing some of my own work, which is the subject of the next post.