When I first installed CloudStack the latest System VM was Cloudstack 3.0 which was released in early 2012. Since then there have been many improvements and when I updated to 4.2 the System VMs stayed the same. Since I'd been undergoing all kinds of issues with NAT, I thought the simplest attempt at a fix would be to update to the latest System VM to see if a newer kernel resolved the tempermental problems I was having.

This proved more difficult than I expected, but nothing is ever impossible.

I'm using XenServer so per the instructions I installed the new Template of the System VM using the following values...

Name: systemvm-xenserver-4.2
Description: systemvm-xenserver-4.2
URL: http://download.cloud.com/templates/4.2/systemvmtemplate-2013-07-12-master-xen.vhd.bz2
Zone: Choose the zone where this hypervisor is used
Hypervisor: XenServer
Format: VHD
OS Type: Debian GNU/Linux 7.0 (32-bit) (or the highest Debian release number available in the dropdown)
Extractable: no
Password Enabled: no
Public: no
Featured: no

Wait until the template is downloaded, decompressed and READY before you continue.

Since I had already updated from 4.1.1 to 4.2, this wasn't in my roadmap and had no effect. So I needed to manually edit the SQL to make the new template work...

mysql> UPDATE `cloud`.`vm_template` SET type='SYSTEM' WHERE name='systemvm-xenserver-4.2′;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> UPDATE vm_instance SET vm_template_id=(SELECT id FROM vm_template WHERE name='systemvm-xenserver-4.2′ AND removed IS NULL) WHERE vm_template_id=1;
Query OK, 59 rows affected (0.03 sec)
Rows matched: 59 Changed: 59 Warnings: 0

Then I destroyed my Secondary Storage VM and Console VM and they regenerated with the new version...

root@v-213-VM:~# cat /etc/cloudstack-release
Cloudstack Release 4.2.0 Sat Jul 13 04:17:59 UTC 2013
root@v-213-VM:~# uname -a
Linux v-213-VM 3.2.0-4-686-pae #1 SMP Debian 3.2.41-2 i686 GNU/Linux

Another database modification was required to make the Virtual Routers find the new template however;

UPDATE `cloud`.`vm_template` set name="SystemVM Template (XenServer)" where display_text="systemvm-xenserver-4.2″;

After that change I was able to stop, then destroy my virtual routers from the Infrastructure tab and then click on the Network tab and restart each network one at a time to the new System VM template.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>