This article describes how to install a trusted SSL Certificate on the VDI-in-a-Box virtual appliance.
Version 5.3 of VDI-in-a-Box introduced a web-based interface for managing SSL certificates. The web-based interface can be used to create a CSR to submit to a CA. The certificate signed and returned from the CA from the CSR generated from the web-based interface can be imported into VDI-in-a-Box through the Web interface in version 5.3. If a pre-existing trusted certificate is to be imported, then the steps outlined in this article must be used for versions 5.3 and earlier.
Version 5.4 of VDI-in-a-Box introduces the ability to import a pre-existing certificate through the Manage SSL Certificate option in the VDI Management Console.
VDI-in-a-Box 5.0 or newer server
Valid SSL Certificate obtained from Trusted Certificate Authority
From VDI-in-a-Box 5.4 or newer, logon to the VDI Management Console.
Select the Admin tab.
Click Manage SSL Certificate.
Select Existing Certificate.
Click Upload Cert and navigate to the pre-existing certificate in PKCS12 format.
Before importing the files, refer to the following article to create the SSL certificate for VDI-in-a-Box virtual appliance:
CTX132235 - How to Create SSL Certificate for VDI-in-a-Box Virtual Appliance
Note: For easy access, the script to generate Certificate Request and the script to import the certificates are available in the same zip file.
Download and unzip the attached file.
Use the SFTP utility (such as FileZilla) to copy the two script files to /home/kvm/kvm directory on the VDI-IN-A-Box appliance.
Copy the certificate files (*.crt format) to /home/kvm/kvm/vdimgrkeystore folder.
Execute the following command from /home/kvm/kvm folder:
chmod 777 sslcertimport.sh
Note: The command cd /home/kvm/kvm ensures that you are in the right place.
Run the script to import the certificates using the following syntax:
sh sslcertimport.sh
Before importing the files, refer to the following article to create the SSL certificate for VDI-in-a-Box virtual appliance:
CTX132235 - How to Create SSL Certificate for VDI-in-a-Box Virtual Appliance
Use the SFTP utility (such as FileZilla); copy the certificate files back to the /home/kvm/keystore directory on the VDI-in-a-Box virtual appliance.
Use the keytool utility to import the intermediate certificate file(s) to the keystore. Replace the chain.crt file with the intermediate certificate file name provided by the Trusted CA (file name will vary):
keytool –import –trustcacerts –alias intermediate –file chain.crt –keystore kmgr.keystore
Use the keytool utility to import the root certificate file(s) to the keystore. Replace the chain.crt file with the root certificate file name provided by the Trusted CA (file name will vary):
keytool –import –trustcacerts –alias root –file chain.crt –keystore kmgr.keystore
Type the keystore password when prompted.
A ‘Certificate was added to the keystore’ message appears if successful.
Use the keytool utility to import the public certificate file to the keystore. Replace the kmgr alias with the VDI-in-a-Box server hostname. Replace the kmgr.crt file with the certificate file name sent by the Trusted CA:
keytool –import –trustcacerts –alias kmgr –file kmgr.crt –keystore kmgr.keystore
Type the keystore password when prompted.
A ‘Certificate reply was installed in keystore’ message appears if successful, as displayed in the following screen shot:
Change to the conf directory:
cd /home/kvm/kvm/install/servlet_container/conf
Backup the default keystore file:
mv .keystore old.keystore
Copy the new keystore file to the conf directory:
cp /home/kvm/kvm/keystore/kmgr.keystore .keystore
Verify that the .keystore and old.keystore files exist:
ls –al
Save and exit vi text editor.
Restart Tomcat to use the new SSL certificate:
tc_start
Type the kvm password if prompted:
kaviza123
Open any Web browser.
Access the VDI-in-a-Box hostname.
Note: There should not be a certificate warning. Each Web browser is different but there will be either green text or a padlock icon in the Address bar indicating the SSL certificate is valid and the connection is secure.