There are two ways to accomplish this
The first:

Open the following path from the admin console page.


configuration
your cluster/instance configuration.
jvm settings
jvm options
you will find this line some where in the list of items
-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as


Change the s1as value to the certificate alias you want to use.

The other option is to add a system property to your code
System.setProperty("com.sun.enterprise.security.httpsOutboundKeyAlias", "your certificate alias");

How does my app know what private key to use
I have a three-node Hyper-V cluster running on Windows Server 2008 R2 which is working quite flawlessly: there are no errors, live migration works, all hosts can and will happily run all virtual machines, and so on.

But one specific virtual machinee is trying to make me go mad: it works on two nodes of the cluster, but not on the third one.

Whenever I try to move the VM to that node, be it in a live migration or with the VM powered off, it always fails. In the event log of the host these events are logged:

Source: Hyper-V-VMMS
Event ID: 16300
Cannot load a virtual machine configuration: General access denied error (0x80070005) (Virtual machine ID &lt;GUID&gt;)

Source: Hyper-V-VMMS
Evend ID: 20100
The Virtual Machine Management Service failed to register the configuration for the virtual machine '&lt;GUID&gt;' at 'C:\ClusterStorage\&lt;PATH&gt;\&lt;VM&gt;': General access denied error (0x80070005)

Source: Hyper-V-High-Availability
Event ID: 21102
'Virtual Machine Configuration &lt;VM&gt;' failed to register the virtual machine with the virtual machine management service.


All other VMs can be moved to/from the offending host, and the offending VM can be moved between the other two hosts. Also, this is not a storage problem, because there are other VMs in the same cluster volume, and the host has no troubles running them.

What's going on here?
