Wednesday, December 23, 2009

XenServer - There was an error while attempting to unmount the NFS share

Recently in XenServer I was attempting to remove an ISO Library (CIFS) that I had created that no longer existed. All attempts using Destroy, Forget, Detach from XenCenter failed with error "There was an error while attempting to unmoun the NFS Share".

At this point I went to one of the hosts consoles and typed xe sr-list name-label="name of iso directory". This returned the uuid of the SR (which isn't listed in the GUI). From here I was able to run xe sr-destroy uuid=thesr'suuid. This returned "The SR is still connected to a host via a PBD. It cannot be destroyed."

Okay, what hosts and pbd's have it locked?

xe pbd-list sr-uuid=1c5a224d-f265-c84f-8e7d-8f4f891559c1. This returned that each host had a pbd to it... Taking note of each hosts pbd uuid I ran xe pbd-unplug uuid=xxxxxx for each uuid that displayed "currently-attached (RO): true. Each one unplugged successfully except one which returned "error code: SR_Backend_Failure_74 Error parameters: , NFS unmount error [opterr=error is 255],". This told me at least which host was at fault since the pbd uuid is listed directly above the host uuid ( xe host-list host-uuid=xxxxxxxx).

At this point a reboot of the host that was at fault cleared up the issue and I was able to forget the Library

Tuesday, December 8, 2009

Server 2008 System State Backups

In Server 2008 they removed ntbackup and replaced it with Windows Server Backup Utility. Unfortunately this doesn't backing up the systemstate to a network share anymore. In addition you can't backup to volumes listed as critical volumes (ie the OS volume).

First off, you can disable the inability to backup to critical volumes:

With this method you could backup to your C: drive and the use scheduled tasks to copy the backup to another location.

wbadmin start systemstatebackup -backupTarget:C: -quiet


If you have access to an iSCSI SAN you can give the server a new drive attached to the SAN which it will detect as a valid local disk. At this point you can dump the backup to this volume (which isn't local so less risk of loss) and then backup using your remote backup solution.

Note that for Windows 2008 R2 the commands are different

Also plan ahead for the size of the backup. I found that my total System State backup on a 2003 server was only 700MB, but on my 2008 servers it increased to over 10GB!

Tuesday, December 1, 2009

Citrix Access Gateway Virtual Appliance on XenServer

Thanks to ervik for this!

I'm placing my version of it here for my ease of access and also because I found loading his site very slow.

XenServer v5.5
CAG v4.6.1
  1. Create new VM
  2. Other Install Media
  3. Use the CAG iso for install media
  4. Add 512MB RAM
  5. Add Virtual Disk 12GB (appears that you can get away with as little as 5GB)
  6. Add 2 NIC's (must have 2)
  7. It will do it's thing and then display to remove install media and reboot
  8. Remove the iso image and reboot
  9. When it displays "Adding IPv4 address to the eth1 interface..." your done
  10. Give your management workstation an additional ip of 10.20.30.x
  11. Navigate to and install the admin tools
  12. Username: root Password: rootadmin