November 2009 Entries

I run windows server 2008 R2 to enable Hyper-V and I run it off a VHD.  As well I run Windows 7 x64 from another VHD.  So I can boot into either environment depending on what I need.  Also I can simply backup my machine in whole by just copying the VHD's to a backup drive.  I backup my code with SVN, and host my own SVN server on a colo machine I have.  That is backed up as well.  So I am covered in case of problems.  Well expect when I run out of hard drive space!

I actually ran out of hard drive space on host system when booting into Windows 7.

I have installed applications that I use everyday, and have hit my 30 GB max I set on my drive.  I looked around and saw that there was a tool called VHDResizer, but I know there has to be an easier way, and well there is.  As long as you have HyperV available. 

Make a copy of the VHD first, just in case...

Open Hyper-V manager, select Edit disk, select the vhd you want to resize.  Select expand, give it a new size.  The tool will run, depending on whether it is fixed or expandable, it should not take too long.

After all that expansion is finished, open the Storage manager, and attach the VHD.

Open a command prompt, run diskpart

Then type in the following:

>list disk

locate the disk you want, say it is Disk 3...

>sel disk 3

This will select disk 3.

>list part

This displays the partitions

>sel part 1

Selects the partition

>expand

Expands the partition to the rest of the allocated space.  It is important to note that the volume must be formatted NTFS for this operation to work.

Finally, simply reboot into Windows 7 (in my case) and the new storage is available.

Then, copy the new backup to a saved location and you are all set!

 

A co-worker pointed out to me today that MSDN has SP 2010 public beta ready for download.

Go get it and start playing with it.

I guess I am building a VM with it on there tonight!

The thing with CAML to me, is that it is not well defined.  There are potholes everywhere, and sketchy information online, even from MSDN.

I was trying to lookup a SPUser I have selected in another list.  In the source list, I have a field with a lookup for user named Employee, the rest is like a Contancts list.

So normally, I break open U2U's CAML Query builder, build a query... but this is no good, the standard uses the display name?

Here is the query that was generated:

 <Where>
      <Eq>
         <FieldRef Name='Employee' />
         <Value Type='User'>Daniel Keeling</Value>
      </Eq>
   </Where>

That looks fine right? Well for small environments sure, but what if there were two Daniel Keelings!  (There is actually a music producer from England who shares my name :)  )

Anyways, so there has to be another way to lookup the user, I mean I have the SPUser in code, I can get anything, email, ID, etc.

Well it just so happens that you CAN use ID.

Amend the Query to look like so:

<Where>
      <Eq>
         <FieldRef Name='Employee' LookupId='TRUE' />
         <Value Type='User'>UserId</Value>
      </Eq>
   </Where>

Then just wrap it into a SPQuery, replacing UserId with the SPUser.ID (int)... and now you are unique.

So one of my clients is using a product for social networking on Linux.  Wait, why is a SharePoint developer working on a project like that to begin with?  Well, the client wants to integrate the two, WSS to be specific, and their other product.

So after configuration of WSS and MOSS in a lab environment, the third party installed their product on a linux install.

Things are going very well, we have integration completed for the most part and we moved on to a provisioning tool.

Well if we want to create new site collections in SharePoint, that is no problem, what about creating sites on the other system?  Yep, just have to call some web services.  Only problem is that we do not have an install locally to dev / test against.

Well I have hyper-v running at my office, so why not just spin up a Suse install here and install the product?

Sure why not, Suse 11 install completes, but networking fails... turns out more than one processor assigned to a Suse VM caused networking to fail... I got an IP address, but could not ping anything.  Everything return Destination Host Unreachable.  To sum it up: Hyper-V Suse 11 needs to have only 1 processor and things work much nicer.