stsadm import failed and some invisible files

I'm working on a migration from SPS 2003 to Moss and as part of the work we are restructuring the portal so that the content is split out into multiple Site Collections. The existing site has one site collection with 45GB of data in it.

Once the site collection is migrated I'm exporting and importing the subsites into new site collections to achieve this, but part way through the import of one site, the import failed and the log files showed: (NB I've shortened the folderpath)

[11/4/2008 7:31:45 AM]: Progress: Importing Folder /Corporate/IT/Document Library/.../foldername_files.
[11/4/2008 7:31:45 AM]: FatalError: Object reference not set to an instance of an object.
   at Microsoft.SharePoint.Deployment.FolderSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
   at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject)
   at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope)
   at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
   at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
   at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader)
   at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
   at Microsoft.SharePoint.Deployment.SPImport.Run()

Initially I took a look at the folder in the document library referenced on the last line before the error and found that there was nothing in it, which seemed a little odd. It transpired that the users have saved web pages in the folder above which creates a .htm file for the page and a subfolder with the ending _files, and also that although the folder showed no files when accessed via the browser, the web page saved in the folder above it was referencing images in the _files folder. I wondered if it was something to do with the length of the folder path or one of the characters in it, so I tried to rename it, but this gave me the following error message:

Server Error in '/' Application.


You cannot copy or move a thicket file.  To change the file name or create a copy of the file, open the file and save as to a new name.

Some googling led to the following post. It would appear that creating a folder with the ending _files causes SharePoint to think that the folder is a system folder. Some further playing around led to the discovery that if you open the folder in the browser where it shows no files and then select to open the folder with Windows Explorer the contents of the folder are visible. But if you navigate up within Windows Explorer you are then unable to see the folder at all.

Anyhow my solution - delete the folder and run the export and import again. Let's hope it works this time!

Currently rated 4.5 by 2 people

  • Currently 4.5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Powershell & HyperV - Create a VM in a specific folder

Well, James O'Neill has updated his library on codeplex again, but there is still a function missing that I needed. In our environment we create multiple machines and I wanted a way to create them in a specific directory, now I know I could set the default location and then create it, but I prefer to just specify a path and go from there.

I started from Ben Armstrong's code at Virtual PC Guy's Weblog and then modified the code after the VM name is set to also specify the location of the folder it will be created in.

# Setthe VM name
$newVSGlobalSettingData.psbase.Properties.Item("ElementName").value = $VMName

# New code - Set Folder location
$VMFolder = "E:\DevVMs\"
$newVSGlobalSettingData.psbase.Properties.Item("ExternalDataRoot").value = $VMFolder + $VMName

It took a little while to find the correct property to set, and I don't think that ExternalDataRoot is particularly obvious but the documentation at MSDN was helpful. In the example above, it puts the VM files in E:\DevVMs\VMName.

For our scripts I then used the HyperV Library to configure the VM with CPUs, RAM, disks and network connections.

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Powershell & HyperV - The easy way

Managing VMs from PowerShell requires the use of lots of WMI calls but fortunately for us James O'Neill has come to the rescue with a PowerShell script that makes managing HyperV as easy as the rest of PowerShell with straightforward commands like Get-VM. He has produced a PowerShell script much like an include file that you can use to make life easier.

The source is up on codeplex at http://www.codeplex.com/PSHyperv 

And for those who haven't figured out how to do an include in a PowerShell script here you go, you dot source it. Just add the following line to the top of your script.

. [path to script]\hyperv.ps1

Personally I have tinkered and removed the directory listing of all the added functions. Once I got used to the structure of the commands it saved me hundreds of lines of WMI handling and calls. The only task I haven't been able to get it to do is create the VM in a specific directory. I have now manged it with direct WMI calls so I'll go back and try with these extensions either to add to them or use them to manipulate what I need, but that will have to wait for a future post.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Powershell & HyperV - Use elevated permissions

I've been continuing to work on our development environment and staging servers looking at ways to automate things and Powershell seems to be the way to go. I found a great collection of functions ready to use that James O Neill has posted to codeplex, but last week I ran into some problems with them. Using the Get-VM function gave me no output as did a number of other get- functions.

It took a while as i gradually worked through the code trying to see where it was going wrong - debugging a new language is always a liitle bit challenging as you learn what the different syntax and constructions do, but very beneficial in terms of learning how it works. Anyhow eventually i got to the point where i could get the WMI objects to return only the host machine and none of the virtual machines. At this point something clicked, I can't remember what it was now, but I realised that I was running powershell under the administrator account but without elevated privileges. I ran a new instance of powershell "as administrator" and pulled in the hyperV.ps1 file. Typed Get-vm and hey presto the list appeared of all my VMs. 

Whilst I appreciate what Microsoft is trying to do with UAC, I am beginning to wonder how many more times i am going to get caught out by it and whether we will all just end up turning it off!

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

WinPE & Hyper-V update

Well, since my last post on WinPE Mike Sterling has blogged how to add the intergration components (the new name for Virtual Machine Additions) to a WinPE image. This means that virtual networking breaks the legacy network adaptor limit of 100MBit and our deployment of images fly through rather than sitting around twiddling their thumbs!

http://blogs.msdn.com/mikester/archive/2008/05/30/using-the-hyper-v-integration-components-in-winpe.aspx 

I only wish i'd thought of it as it's kind of an obvious thing to do to speed things up.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Hyper-V RTM is here!

Always hoping to be the first with news. Microsoft has released Hyper-V in its final form. Only the virtualisation site seems to be updated at the moment but the downloads are available from the following knowledge base article:

   http://support.microsoft.com/kb/950050

For those of you running RC1 you will be very pleased (and in my case releaved) to see that snapshots and saved states created with RC1 are compatible with the final release version, so you don't need to merge all those changes back to a single image and lose your snapshot trees. We're finding them very useful as we're testing sharepoint deployments and feature development.

Of course we're yet to see if it breaks anything!!!

[Update] Taylor Brown has a good list of all the related updates on his blog here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Sharepoint Context sensitive help in Visual Studio.

Crawling across blogs yesterday I stumbled upon Waldek Mastykarz's blog. His articles on repeatable deplyoments were very interesting, but the post I thought I should pick up on is about extending help in Visual Studio for Sharepoint Development. He's started a codeplex project to build a dynamic help collection so we can gain access to resources without leaving Visual Studio. It's a great idea and he has already contributed some content, inviting the rest of us to fill in the gaps... You can read more here and find the codeplex project here.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Network Cable unplugged in Virtual Server 2005 R2 SP1 running on Windows Server 2008

I was moving our staging servers onto some spare hardware we had recently decomissioned and thought it would be a good chance to play with Server 2008. I first attempted this before the RTM of Server 2008 and ran into networking problems, but at the time I was busy on projects so left it as it was and put it down to being a bug that would probably be fixed in the final release. Well today I tried again to get Virtual Server 2005 R2 SP1 running on a Windows Server 2008 full installation. My VMs transferred across and added fine to the new host. But when i booted them the network connections all said network cable unplugged. D'Oh!. I fiddled a little - change connection to not connected, create new virtual network, etc. all the normal stuf you try before looking for an answer. Whilst I was trying this i then also lost connection to the host - D'Oh!. Fortunately the KVM over IP i fitted a few months back saved a trip to the Server Room.

So here I am again with failing RDP into the server and VMs that won't talk to anything over the network. First thing i found googling was the TCP offload issues. We had encountered these before with our broadcom nics on the Dell servers - causing our Virtual server service to suspend all communication to the service, the VMs talked fine over the network but you couldn't open up the admin web site or the VMRC connections - the only solution was to stop and start the Virtual Server service, not popular during the day when people are using the guests! Sop in this instance Microsoft have given a nice article - http://support.microsoft.com/kb/888750 A small note in the middle reads:

Note If you have any network adapters that Virtual Server 2005 guests use, Microsoft recommends that you disable TCP segmentation offloading.

I used the second method - disable it altogether. Seemed a safer bet to me, especially as there is only one NIC in the server at the moment. Thankfully this allowed me back into the server over RDP, but I was still getting network cable unplugged inside my Virtual Machines.

I figured it was now a virtual server issue as the configuration page for each of the virtual machines showed 0 bytes received and sent even though i kept trying some pings.

A little more googling revealed a hint and then the answer, my VMs had been set to boot up automatically on the previous host as we needed to make sure they didn't go down and not come back up. This meant that the VMs were set to run under a local user account without admin rights. Now it told me when i first added the VMs to this host that the account was not valid - which was fair it was a local user account that didn't exist on this host. Creating the local account and specifying the credentials worked fine. But now the issue transpires to be permissions on the Virtual Network files, or more generally the Virtual Machines and Virtual Network folders. The following article details what's needed :

http://www.microsoft.com/technet/prodtechnol/virtualserver/2005/proddocs/vs_operate_using_secure_vm.mspx?mfr=true

But hang on! This folder is the all users documents folder or as Windows Server 2008 now uses C:\Users\Public\Documents\. Surely everyone has access to that?, or at least the local Users group - but no, Microsoft seem to have locked it down so that by default only administrators gain access! Adding some permissions to the Virtual Networks folder for the local user account the VMs run under and restarting them brought all the virtual NICs to life.

Well I am pleased that it is finally working, but a little frustrated that it was down to some buried permissions that really could have been flagged up in the Virtual Server interface.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

WinPE in a HyperV Virtual Machine

Well last time i had network problems with WinPE in a virtual machine it was as a result of not having enough RAM allocated, remember it really wants at least 512MB. This time thought it took a little while to find the answer, and then I had to use Google's cache of a web page as the blog it pointed me to was down!  Anyhow Jason Huitt has a simple explanation - you need to add a Legacy Network addaptor under Add Hardware in the VMs Settings page.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Virtual Server 2005 R2 SP1 Update

I stumbled across this download today on Microsoft's site, but the KB article 948515 doesn't exist yet and even the virtualization team blog doesn't mention it! Hey ho, I'm sure they'll blog it soon! So it seems that they have releaed today an update for Virtual Server 2005 R2 SP1 that provides support for the following Host and Guest Operating Systems

Additonal Guest Operating System support:
Windows Vista® Ultimate Edition with Service Pack 1 (SP1)
Windows Vista® Business Edition with Service Pack 1 (SP1)
Windows Vista® Enterprise Edition with Service Pack 1 (SP1)
Windows Server® 2008 Core
Windows Server® 2008 Standard
Windows Server® 2008 Datacenter
Windows Server® 2008 Enterprise
Windows Server® 2008 Small Business Server
Windows XP Professional with Service Pack 3

Additional Host Operating System support:
Windows Vista® Ultimate Edition with Service Pack 1 (SP1) (non-production use only)
Windows Vista® Business Edition with Service Pack 1 (SP1) (non-production use only)
Windows Vista® Enterprise Edition with Service Pack 1 (SP1)(non-production use only)
Windows Server® 2008 Core
Windows Server® 2008 Standard
Windows Server® 2008 Datacenter
Windows Server® 2008 Enterprise
Windows Server® 2008 Small Business Server
Windows XP Professional with Service Pack 3 (non-production use only)

I haven't tried it on my Virtual Server yet, but will do soon and let you know what i find.

You can find the update here: http://www.microsoft.com/downloads/details.aspx?FamilyID=A79BCF9B-59F7-480B-A4B8-FB56F42E3348&displaylang=en

 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

 

Dilbert of the day