If your system vm is not currently working you have to make it work. On XenServer you can do this by SSH'ing to it and upgrade java.
apt-get update && apt-get -y install openjdk-7-jre-headless openjdk-7-jre-lib && apt-get -y remove openjdk-6-jre-headless
and it should now work. In some rare cases you have to restart the cloud service
service cloud stop && sleep 3 && service cloud start
and in some even rarer cases you have to restart the ssvm. Do that from the Apache CloudStack UI.
If you experience problems upgrading due to lack of free space then stop the cloud service, and remove any log files, they can be big.
When your SSVM is properly working again add a new template. Depending on your hypervisor it should be named as follows:
XenServer:
systemvm-xenserver-4.4
KVM:
systemvm-kvm-4.4
Use the same in the description, set OS to the latest Debian (64-bit) release available.
Choose the correct template from this location as the URL, but make sure to use the 64 bit one. http://cloudstack.apt-get.eu/systemvm/4.4/
It should look like this for a XenServer installation:
After the template is successfully downloaded, connect to your cloud database and run the following queries:
# this will get you the id to use later. anywhere xenserver is mentioned you replace with your hypervisor
# if there is more than one (it shouldn't really...), use the highest id as $fromfirststep
mysql> select id,name from vm_template where name = 'systemvm-xenserver-4.4';
# this will change the template's type to SYSTEM
mysql> update vm_template set type='SYSTEM' where id = $fromfirststep;
# this will update any existing system vm to use the new template
# XenServer:
mysql> update vm_instance set vm_template_id = $fromfirststep where type <> 'USER' and hypervisor_type = 'XenServer';
# KVM:
mysql> update vm_instance set vm_template_id = $fromfirststep where type <> 'USER' and hypervisor_type = 'KVM';
# this will update the global configuration option for VRs to use the new template
# XenServer:
mysql> update configuration set value = 'systemvm-xenserver-4.4' where name = 'router.template.xen';
# KVM:
mysql> update configuration set value = 'systemvm-kvm-4.4' where name = 'router.template.kvm';
Now restart cloudstack-management, and hopefully your system vm's should work.
This is the version for KVM, please note that i explicitly did not upgrade the VR, since we experienced problems with the VR running CS4.4 with the 4.4 systemvm template
mysql> select * from vm_template where hypervisor_type='KVM';
mysql> update vm_template set type='SYSTEM' where id='$result_from_first_step';
mysql> update vm_instance set vm_template_id = $result_from_first_step where type='ConsoleProxy' and hypervisor_type = 'KVM';
mysql> update vm_instance set vm_template_id = $result_from_first_step where type='SecondaryStorageVm' and hypervisor_type = 'KVM';