First of all, you will have to add more disk space to the System you are trying to expand.

In case of a virtual machine, simply edit the disk size in your virtualization management software.

In case of a RAID Disk, you could add more disks to the RAID, or replace the existing disks with larger ones, one by one. (e.g. replace one, wait for rebuild, replace the next one and so on.)

In the end, use your RAID Manager software to expand the RAID Partition .

Once this is done, fire up your server and open Computer Management. Check Disk Manager to see if the system can see the additional space (if you can’t see it, use the “rescan disks” command before you look further)

If you can see the free space, you are ready for the expand

Open a command prompt and run the extpart.exe command.

Enter your System partitions drive letter when asked (e.g. c:)

Then enter the amount by which you want to extend the partition in MB

So if you have a 15GB partition and 10GB additional space, enter 10240 (10*1024MB)

Then start setting the Values to a common URL. Here we are going to use mail.contoso.com.

Note the Get-xxx | before the Set-xxx command. This is so if you have multiple servers in your Organization, the Values are set for all servers automatically.

If you want to avoid this, remove the Get-xxx | in front of the commands, and use the Identity value to specify which server to configure. (just enter the command without the get-xxx and you will be asked for the identity)

To make sure all settings have been applied, specifically the Autodiscovery URLs, start the following command in an elevated command prompt on the CAS(right click cmd.exe and select “run as administrator”)

iisreset /noforce

Now that we have set the Access URLs, we need to make sure that the internal clients can actually resolve mail.contoso.com and are pointed to a CAS Server.

To enable this, head over to your DNS Server. In case your internal and external domains are the same, you will simply need to add an A Record in your contoso.com Zone pointing mail.contoso.com to the ip of your cas server.

If your internal and external domains are not the same, e.g. contoso.com externally and contoso.internal internally, add a new zone to your DNS server and name it contoso.com

Then add the mail.contoso.com record in there.

Now all that is left is to install an SSL Certificate that contains contoso.com as a value. I’d suggest a wildcard certificate with the name *.contoso.com

Now that we made sure the internal clients can actually resolve mail.contoso.com, we can now start to configure our outlook clients. Should they already be configured, open the account settings, and click on “Repair”. Autodiscovery will then repair the account and point to the right places.

To make sure or check the connections outlook makes, simply press the Ctrl Key while right clicking on the Outlook icon in your Taksbar, and select “Connection status”. Should one of the connections not contain the new name mail.contoso.com, then you will need to revisit the above commands and make sure you set all the URLs correctly.

Extending a local Xenserver storage repository can be a bit daunting, especially when dealing with GPT Partition tables, which for example Xenserver 6.0 uses by default.

Preflight Check

First of all, you will need to provide Xenserver with actual, additional storage space. If you are using lets say a HP Proliant Server with a RAID configuration, add some more disks, and use the ACU (Array controller Utility) to extend the array with the new disks. Or use any other tool your Storage provides to extend the space.

Only perform the steps in this article, if you have a good backup of your host, your vms and your pool metadata. While these commands should be perfectly safe to use, in rare cases, data loss could occur.

>>> hint: xe host-backup; xe pool-dump-database

Shutdown all Virtual machines that reside on the local storage. While I’m not sure it matters, I would advice it.

To find out whether you are having an installation with a GPT Partition table, run this command in the Xenservers local console:

fdisk -l /dev/sda

If you see an error like this in the output, skip this section and check the GPT section:

echo 1 > /sys/block/<the device name you copied from the previous step>/device/rescan

(e.g. echo 1 > /sys/block/sda3/device/rescan)

run this command:

pvresize <the device name from the previous step again>

(e.g. pvresize /dev/sda3)

run:

xe sr-scan uuid=<storage uuid you copied in the first step>

(e.g. xe sr-scan uuid=8b17697e-0329-be9d-404d-3f739350826b)

Now go back to the Xencenter and check whether the storage is indeed seeing the free space. You might have to also hit “rescan” in the storage tab on the local storage in Xencenter for it to reflect the changes.

If it does not work, give your Xenserver a reboot just for good measure, and check again.

Note that before, the last usable sector was 1171743802, and now is 1757614650

This confirms, the partition table was indeed expanded.

That was only half the rent though, we now need to delete the actual partition and recreate it using its startsector and the last usable sector as the end sector.

Note that under normal conditions, running these commands will indeed PRESERVER your data.Make sure you actually followed the pre-flight check to see if you are using a GPT partition or not.

remember that device name we wrote down earlier? In this example, it was /dev/sda3 (and usually is the default on the Xenserver)

We now use the command:

gdisk /dev/sda

Then enter the letter d and hit enter, enter the number 3 (corresponds to the device id (/dev/sda3) and hit enter.

type the letter n and hit enter, type the number 3 and hit enter, paste the Start sector number (from the previous step, in this example: 16779264), hit enter, paste the End Sector number (from previous step, in this example: 1757614650)

If the proposed default value of the start sector is off by only very little, you can simply confirm all the defaults, as the utility will automatically realign the partition and reflect the correct value)

Confirm the default for the next step about the HEX code by hitting enter. and finish the wizard. After that, type the letter w to actually apply the changes.

After this done, a reboot of the Xenserver will usually be enough to make Xenserver realize it has more space. If after the reboot, you can still not see the storage in Xencenter, simply rescan the storage using Xencenter, and you should be golden.

If you can not reboot the host, try running the command

xe-toolstack-restart and see if that worked. Haven’t tried this myself, but think this could also work instead of a restart.

Create a copy of the file cmd.exe in the same location and rename that to utilman.exe

Reboot your computer back into windows. (remove the live cd)

On your login screen you should find an icon for “Accessibility options”. Click on that and a black command window will open

If you want to reset the password for a user called User1, you will now have to type the following command:

net user User1 <password>
(replace <password> with the new password you want to set)

If you want to add User1 to the administrators group, use the following command:

net localgroup Administrators User1 /add

Then reboot your computer. You should now be able to logon using User1 and the new password you set.

This works because a click on the Accessibility options would usually open the file utilman.exe. Since we replaced that with cmd.exe, it will instead open a command prompt. This command prompt will be running under the System account which means it has all the rights it needs to reset users and passwords.

As alway, if you do such a thing, make sure you are authorized to run these steps on the machine. If you use this to get Administrative rights on your office computer, you could be breaking IT rules and could be fired.

4. Check for the necessary DNS Records that will have been created by this new KMS Server using this command:

nslookup -type=srv _vlmcs._tcp

This should then reply with all your KMS Servers in your Organisation.

If you dont get a response, try this:

c:\windows\system32\slmgr.vbs /sdns

This will instruct the KMS to resend the DNS entries

If you find that there are other KMS Hosts listed, check if they are still in use and if not, remove them by looking at the end of this article

To display information about the KMS Server use this command on the KMS Server:

cscript c:\windows\system32\slmgr.vbs /dlv

(to display office kms infos too, add ” all” at the end)

The Client Side

If your clients have previously used other methods of activation (e.g a MAK Key), you first will have to reset the Product Key to one of the microsoft provided rearm Keys. You can find a list of these on this other great article about this issue:

If you regularely use the Snapshot feature of Xenserver, or, like us, run an external backup tool (Alike by Quorumsoft) that uses Snapshots, you might sooner or later run into a problem, where Xenserver tells you that there is no more free disk space on the storage, when in fact there is ample space left.

This happens because the space used by the snapshots is not actually freed up until the storage is rescanned.

Since I got tired of doing this manually every time the storage “ran full”, I found this little tip to have Xenserver scan its Storage every 30 seconds.

Unfortunately, the interval of 30 seconds can not be changed, and might lead to performance problem on larger installations.

However, so far I have seen no negative repercussions since having this activated.

So here is how to do it.

In your xenserver console, first run: XE SR-LIST

This will show you alle the Storages configured on your host/pool.

Copy the UUID of the Storage you want to autoscan and then enter this command:

Configuring SQL Mirroring isn’t that hard. That is, until you need to set it up with the SQL Servers in different Domains. Or you SQL Servers do not use Domain Accounts to run their services Also needed if the services run under local system account or network.

In that case you will need to use Certificate Authentication on your Endpoints.

This requires you to set up certificates on your SQL Servers, transport them to the other Hosts, import them and assign them to users which then will need Access to your Endpoints.

All the information needed for this is available online, but I wasn’t able to find one single page that detailed the complete process.

I tried to use Query commands where I know them or it is easier using them.

So here you go:

————————————————-

On each Host involved, (Primary Server, Mirroring Partner and Witness Server) you will first need to create an endpoint that uses certificate authentication. Replace <hostnameA> with the name of the host you are working on (you can name it whatever you want, but for me it makes sense to call them like its host)

1. Generate a master key:

CREATE MASTER KEY ENCRYPTION BY PASSWORD = ‘<strongPassword>’;
GO

2. Create the certificate

You can select the expiry date of the certificate by changing EXPIRY_DATE

3. Create the endpoint and assign it the certificate

If you run multiple instances of SQL on one host and mirror both the instances, you will have to create endpoints for each of them. Also, you will need to use another port for additional endpoints. Do this by changing the LISTENER_PORT value.

Here, run through the wizard and select your source server, your mirroring partner and your witness server if needed. After the wizare finishes you will be asked if you want to start the mirroring. If all went right, the status of the source database will change to (Primary, Synchronized) and your mirror partner database will have a status of (Mirror, Synchronized).

If you receive an error about one of the involved hosts not being able to connect to TCP://hostname.domain.com:5022, it wil most probably be from incorrectly configured endpoints.

Make sure you create certificate on ALL hosts, import ALL the certificates to each other host and create users for ALL other host on EACH host involved.