Alexander’s Blog

July 10, 2011

How to Save a SharePoint 2010 Solution

by @ 9:42 am. Filed under SharePoint, Tips & Tricks

in SharePoint 2010 you can upload and save solutions, such as certain Web parts. Adding or uploading a solution is relatively intuitive but saving a solution to your hard disk for back purposes or to copy it to another location is not. Here’s how you can upload and save solutions in SharePoint 2010.

Uploading a Solution

  1. To upload a solution, go to the Site Collection Site Settings.
  2. Select Solutions under Galleries.
  3. Click the Solutions tab.
  4. Click Upload Solution.
  5. Browse to the location of the .WSP file and click OK.
  6. You can Activate the solution either at the time you add it, or afterwards by selecting the solution file and clicking Activate on the ribbon. Either way you will see the same screen.

Saving a Solution to Disk

As I mentioned earlier, adding a solution in SharePoint 2010 is easy but saving a solution is not. If you select the solution, click the Edit icon and select Save, it is only saving changes to the name of the solution. It will not save the solution to the hard disk. There are two ways in the GUI that I know to save a solution to your hard drive.

Option 1:
Simply click the name of the solution itself and you will be prompted to save. Really, it’s that simple.

Option 2:
Right-click the name of the solution itself and select “Save target as.” But here’s the catch. If you do not first select the box next to the name and right-click anywhere it will not give you the option and you won’t be able to save it to the disk. You must first check the box next to the solution name. Then right-click on the name of the file that is hyper-linked and then select “Save target as” and you will be able to save your solution (.WSP) file.

Obviously, option 1 is much easier but it is not as intuitive because generally clicking on a hyper-linked file takes actions such as installing or executing it. Clicking on a hyperlink normally doesn’t offer you to save a file.

NOTE: For some reason I am unable to download a solution in Internet Explorer (IE) 9 but I have no problem downloading it in Mozilla Firefox. I have so many problems when I use IE9 with SharePoint that I no longer bother looking for a solution. My recommendation is to stay away from IE 9 for now and either downgrade to IE 8 or use Firefox. Unfortunately, Firefox is not fully compatible with SharePoint either so you just have to learn to live with it unless we have a version of browser that is fully compatible with SharePoint.

July 8, 2011

You Cannot Install Exchange Server 2010 SP1 if the NetBIOS Domain Name of the DC Contains an Ampersand (&) Character

by @ 9:51 am. Filed under Active Directory, Articles, Exchange/Outlook, Tips & Tricks

If you try to install Exchange Server 2010 Service Pack 1 (SP1) on a server in the environment where the NetBIOS domain name of a domain controller contains an ampersand (&) character, the server installation will fail and you are likely to see the following error.

An error occurred while parsing EntityName. Line7, position 12.

This issue occurs because the “&” character is a reserved character in XML. Therefore, the character causes the parsing for current logon user to fail. Here’s how you can solve the problem. The solution used to be documented in KB article 2491951 but recently when I tried to find the article on the Internet I was unsuccessful. Luckily, I have documented the solution for you in the following steps.

  1. Copy all the installation files from the CD to a hard disk, and then open the ManageScheduledTask.ps1 file in the scripts folder.
  2. Locate the following lines.
    function Get-CurrentUserName
    {
    [System.Security.Principal.WindowsIdentity]$id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
    $id.Name
    }
  3. Change the lines as below.
    function Get-CurrentUserName
    {
    [System.Security.Principal.WindowsIdentity]$id = [System.Security.Principal.WindowsIdentity]::GetCurrent()
    [System.String]$fixedName = $id.Name.Replace(‘&’,'`&’)
    return $fixedName
    }
  4. Save the file, and then try to install Exchange Server 2010 SP1 from the hard disk.
  5. Install Update Rollup 4 for Exchange Server 2010 Service Pack 1.

Copyright ©2011 Zubair Alexander. All rights reserved.

July 7, 2011

Unable to Open PDF Files on a SharePoint Site in IE9

by @ 4:09 pm. Filed under Browsers, SharePoint, Tips & Tricks

I recently noticed that I was unable to open PDF files in SharePoint 2010 when I used Internet Explorer 9. I didn’t have the same problem in Mozilla Firefox 5. If you have encountered similar problem, here’s one solution that might help you.

  1. Start Internet Explorer.
  2. Go to Tools, Internet options, Advanced tab.
  3. In the Security section, clear the box Do not save encrypted pages to disk. I tend to check this option on most of my computers running Internet Explorer but noticed that clearing this option lets me open the PDF files. Because my site uses SSL, by disallowing the ability to save encrypted pages to disk, SharePoint is unable to open PDF files.

July 5, 2011

How to Increase Virtual Machine Disk Space in VMware ESXi 4.1

by @ 8:48 am. Filed under Articles, Tips & Tricks, Virtualization, Windows 2008

If you are running VMware ESXi 4.1 you can increase the size of the virtual machine (VM) relatively easily once you know how. But if you have any snapshots, it can be a pain. Keep in mind that increasing the size of the VM is different than increasing the size of the disk partition on the host computer.

Let’s use the following scenario as an example. Your ESXi server’s hard disk is 1TB in size and you have a VM running a Windows Server 2008 R2 guest operating system that has two drives, a 30GB drive C and a 20GB drive D. After a few months you realize that you have installed a lot of programs and your VM hard disk is running out of space. Over the last few months you have taken a dozen snapshots. You go to the vSphere Client utility and select the VM. You select Edit Settings and select the hard disk that is running out of disk space but the option to expand the disk is grayed out. This is likely if the VM has snapshots. You must power off the VM and then delete the snapshots before you can expand the disks.

Once that is take care of, you need to edit the VM’s settings. Here are the steps.

NOTE: The option to Edit Settings will be grayed out if you are in the middle of deleting a snapshot.

  1. Make sure your ESXi 4.1 server has been backed up.
  2. Start the vSphere Client utility.
  3. Select the VM that’s running out of disk space.
  4. Right click the VM and select Edit Settings.
  5. On the Hardware tab select the virtual hard disk (e.g. Hard disk 1).
  6. On the right hand side, under Disk Provisioning increase the Provisioned Size then click OK. For example, if you have two disks and you want to increase the size for drive C from 30 to 50GB and drive D from 20 to 25GB, increase the size using the up arrow and then click OK.
  7. Restart the VM.
  8. At this point you have increased the size of the disk in VMware but you need to do the same in the operating system. In Windows Server 2008 R2 go to Server Manager, Storage, Disk Management. You will notice unallocated space at the end of the disks.
  9. Right-click drive C and select Extend Volume. Follow the wizard to extend the volume. It should take only a few seconds to run through the wizard. Repeat the steps for drive D.
  10. Your drive size will increase right away and there is no need to reboot the computer.

Troubleshooting VMware Snapshots Issues

If in step 6 you are unable to increase the size of the disk because the provisioning option is grayed out, you need to make sure that you delete all the existing snapshots. VMware snapshots are very different than Hyper-V snapshots. Frankly, they are much more complicated and are meant to be used only temporarily. You heard me right. Unlike Hyper-V snapshots which can be actually useful in the long term because you can keep a bunch of snapshots indefinitely and go back and forth between them without any problem, VMware is not designed to use snapshot for similar purposes. It is meant to be used for 24-28 hours after which you should delete them. If you don’t, you can run into some serious problems. First of all, deleting snapshots takes seconds or a couple of minutes in Hyper-V. In VMware it can take hours. If you have a 30GB VM disk and you have old snapshots that you didn’t delete within a couple of days, it can take anywhere from an hour to several hours to delete each snapshot. And that’s not the bad news. What’s worse is that VMware is infamous for hanging at 95% (or sometimes at 99%) when you delete a snapshot. On my ESXi server it always hangs at 99%. Sometimes if you wait a few hours it may finish the process. Other times you can wait over 12 hours and it will still be stuck at 95% (or 99%). This is a known issue with VMware for some time now. Do an Internet search for “VMware stuck at 95%” and see how many hits you get.

VMware can get stuck not just when you delete the snapshots (a common occurrence) but also when you shutdown or power off the VM. Although this problem is relatively uncommon. To work around this problem, you can either use SSH to connect to your server and restart the Management Agents, or you can go to your VMware server’s console and restart the services. Here are the steps as documented by VMware in this KB article.

Restart Management Agents Using SSH

  1. Logon to the ESXi host as root.
  2. Type service mgmt-vmware restart and press Enter.
  3. Type service vmware-vpxa restart and press Enter.
  4. Type logout and press Enter to disconnect from the ESX host.

Restart Management Agents Using the Console

  1. Connect to the console of your ESXi host.
  2. Press F2 to customize the system.
  3. Login as root.
  4. Using the Up/Down arrows navigate to Restart Management Agents.
  5. Press F11 to restart the services.
  6. When the service has been restarted, press Enter to exit.
  7. Press ESC to logout of the system.

If you are deleting one snapshot at a time you may have to repeat the above step for restarting the Management Agents each time when the snapshot hangs at 95%.

The quicker way to delete the snapshots is to use the Delete All option. Depending on how old the snapshots are, the size of the snapshots can be large and it can take considerable time. If you notice that you have deleted all the snapshots and the provisioning option is still grayed out, this is because the snapshots are not actually deleted, even though there is nothing in the Snapshot Manager. You can browse the Datastore and see all the snapshots. If you run into this issue, try the following tips.

Tip #1

Create a snapshot and then delete it right away. This may delete all the existing snapshots and you will be able to provision the disks.

Tip #2

Power down the VM, create a snapshot and the delete it right away. I have experienced that when the first technique doesn’t work, the second one does.

Moral of the Story

Do not use snapshot in VMware ESXi 4.1 for more than 1-2 days. Use snapshots temporarily, not as a method to backup or to go back and forth between snapshots. If you are a developer, trainer or a tester that needs to use snapshots on a consistent basis then consider switching to Microsoft Hyper-V as a solution. While Hyper-V’s snapshots have their own issues, they are not quite as problematic as in VMware.


Copyright ©2011 Zubair Alexander. All rights reserved.

July 4, 2011

Things to Consider When You host Active Directory Domain Controllers in Virtual Environments

by @ 11:18 am. Filed under Active Directory, Articles, Tips & Tricks, Virtualization

We all know that it is fairly easy to host servers in virtual environments these days. In fact, it is so easy that people can often overlook the implications of hosting Active Directory Domain Controllers (DCs) in a virtual environment. Because Active Directory doesn’t support any method that restores snapshots of the operating system due to the fact that it can cause an Update Sequence Number (USN) rollback, one can argue that Domain Controllers are not really supported in a virtual environment.

Although I wouldn’t go as far as stating that DCs are not supported in a virtualized environment but clearly snapshots are not supported for virtualized DCs because of the way Active Directory was designed. If you decide to run DCs in a virtualized environment, here are some solutions that are documented in Microsoft’s KB article 888794. This is only a partial list. For the complete listing check out the KB article.

If the virtual hosting environment software correctly supports a SCSI emulation mode that supports forced unit access (FUA), un-buffered writes that Active Directory performs in this environment are passed to the host operating system. If forced unit access is not supported, you must disable the write cache on all volumes of the guest operating system that host the Active Directory database, the logs, and the checkpoint file.

Make sure that all the domain controllers perform inbound replication on all locally held Active Directory partitions according to the schedule defined on site links and connection objects, especially in the number of days that is specified by the tombstone lifetime attribute.

When a domain controller runs in a virtual hosting environment, do not pause the domain controller for long periods of time before you resume the operating system image. If you do pause the domain controller for a long time, replication may stop and cause lingering objects.

An Active Directory domain controller requires regular system state backups to recover from user, hardware, software, or environmental problems. The default useful life of a system state backup is 60 or 180 days, depending on the operating system version and the service pack revision at play during the installation. This useful life is controlled by the tombstone lifetime attribute in Active Directory. At least one domain controller in every domain in the forest should be backed up every tombstone lifetime number of days. In a production environment, you should make system state backups from two different DCs on a daily basis.

In an effort to boot with the latest zone contents, the Microsoft DNS Server service waits 15 or more minutes for Active Directory to inbound replicate before loading an AD-integrated DNS zone. Configuring DC guests to point to themselves as primary for name resolution causes domain controllers to hang while applying network connections during OS startup. Virtualized domain controllers should point to one or two reliable off-box DNS Servers to insure faster OS startup. Similarly, virtual host computers should point to one or two off-box DNS Servers for name resolution. Virtual host computers should not point to virtualized DNS Server running on the local virtual host computer.

To roll back the contents of Active Directory to a previous point in time, restore a valid system state backup. A system state backup can be restored up to the tombstone lifetime number of days after the backup was performed. The backup must have also been made on the same operating system installation as the operating system that you are restoring. Active Directory does not support other methods to roll back the contents of Active Directory. In particular, Active Directory does not support any method that restores a “snapshot” of the operating system or the disk volume the operating system resides on. This kind of method causes a rollback in the update sequence number (USN) used to track changes in Active Directory. When a USN rollback occurs, the contents of the Active Directory databases on the improperly restored domain controller and its replication partners may be permanently inconsistent.

If you are running servers, or plan to run servers, in a virtual environment it is good for you to know the support policy documented by Microsoft in the KB article 897615: Support policy for Microsoft software running in non-Microsoft hardware virtualization software.


Copyright ©2011 Zubair Alexander. All rights reserved.

Contact E-mail | Terms of Use | Privacy Policy

Copyright ©2010 Zubair Alexander. All rights reserved.

Internal Links

Search Blog

Categories

Archives

July 2011
M T W T F S S
« Jun   Aug »
 123
45678910
11121314151617
18192021222324
25262728293031

RSS Feeds

TechGalaxy Visitors

24 queries. 0.412 seconds