How to fix XenServer 6.0 error ‘could not parse sgdisk’ when installing XenServer

The Xenserver 6.0 installation will in some cases come up with the following error: Could not parse sgdisk.

You will get this error if the storage you try to install XenServer on contains a previous VMWare ESX installation.

sgdisk cannot handle VMFS volumes.

The solution is to remove the ESX partition from storage. After this XenServer setup will continue installing.