My comments inline.

Thanks
Harikrishna
On 01-Aug-2013, at 7:05 PM, Daan Hoogland <daan.hoogl...@gmail.com>
 wrote:

> Harikrishna,
> 
> I suppose I have to register those templates before upgrading; i.e. in
> the 4.1.1 version management server.
Yes. in 4.1.1 these templates are registered as USER templates. During upgrade 
to 4.2 these are converted to SYSTEM templates

> Is this procedure described somewhere?
Usually upgrade instructions are given in the release notes. 
For 4.1 upgrade you can look at Chapter 4 
http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.1.0/html/Release_Notes/upgrade-instructions.html#upgrade-from-4.0-to-4.1

> Do I bake the templates myself first or should I use publicly offered 
> templates?
No need to prepare templates. I guess there is some discussion happening for 
place to download system templates.
You can download these templates from jenkins URL 
http://jenkins.cloudstack.org/view/master/job/build-systemvm-master/

> 
> thanks,
> Daan
> 
> On Thu, Aug 1, 2013 at 3:16 PM, Harikrishna Patnala
> <harikrishna.patn...@citrix.com> wrote:
>> Hi Daan,
>> Before upgrading to 4.2 we need to register the new system templates for 
>> each hypervisor with specific names so that during upgrade these new 
>> templates are set to the system vms.
>> It is mandatory to upgrade the system vm template if we want upgrade to 4.2.
>> 
>> Here seems like you have a Xen cluster. So you need to register xen system 
>> template with name systemvm-xenserver-4.2.
>> So for the existing clusters you need to register system vm template per 
>> hypervisor.
>> System template names are for each hypervisor are
>> 1) systemvm-xenserver-4.2
>> 2) systemvm-kvm-4.2
>> 3) systemvm-vmware-4.2
>> 4) systemvm-hyperv-4.2
>> 5) systemvm-lxc-4.2
>> 
>> Thank you
>> Harikrishna
>> 
>> On 01-Aug-2013, at 5:29 PM, Daan Hoogland <daan.hoogl...@gmail.com> wrote:
>> 
>>> H,
>>> 
>>> I am testing an upgrade of my code for sdn based vpc private gateways
>>> (not in the mainstream code). It runs on a custom 4.1.1 based on the
>>> 4.1 branch. I have tested it against a 4.0 database and it upgrades
>>> fine.
>>> 
>>> Now I try to have a master version to which I applied my code to run
>>> against the same environment. I added
>>>       _upgradeMap.put("4.1.1", new DbUpgrade[] {new Upgrade410to420()});
>>> to the class com.cloud.upgrade.DatabaseUpgradeChecker.
>>> I have the systemvm.iso ready on the hypervisors, but not on my
>>> (windows) development machine. When I start my version in eclipse I
>>> get
>>> 
>>> INFO  [c.c.u.DatabaseUpgradeChecker] (Timer-2:null) Database upgrade
>>> must be performed from 4.1.1 to 4.2.0-SNAPSHOT
>>> WARN  [c.c.u.d.Upgrade410to420] (Timer-2:null) 4.2.0 Hyperv SystemVm
>>> template not found. Hyperv hypervisor is not used, so not failing
>>> upgrade
>>> WARN  [c.c.u.d.Upgrade410to420] (Timer-2:null) 4.2.0 KVM SystemVm
>>> template not found. KVM hypervisor is not used, so not failing upgrade
>>> ERROR [c.c.u.DatabaseUpgradeChecker] (Timer-2:null) Unable to upgrade
>>> the database
>>> com.cloud.utils.exception.CloudRuntimeException: 4.2.0 XenServer
>>> SystemVm template not found. Cannot upgrade system Vms
>>> at 
>>> com.cloud.upgrade.dao.Upgrade410to420.updateSystemVmTemplates(Upgrade410to420.java:259)
>>> ...
>>> ERROR [c.c.u.c.ComponentContext] (Timer-2:null) System integrity check
>>> failed. Refuse to startup
>>> com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the 
>>> database
>>> at 
>>> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:296)
>>> ...
>>> Caused by: com.cloud.utils.exception.CloudRuntimeException: 4.2.0
>>> XenServer SystemVm template not found. Cannot upgrade system Vms
>>> at 
>>> com.cloud.upgrade.dao.Upgrade410to420.updateSystemVmTemplates(Upgrade410to420.java:259)
>>> ...
>>> ... 5 more
>>> 2013-07-31 21:50:50.802:INFO::Shutdown hook executing
>>> 
>>> I found that vm_template should contain a line for this;
>>> 
>>>                   //Get 4.2.0 system Vm template Id for
>>> corresponding hypervisor
>>>                   pstmt = conn.prepareStatement("select id from
>>> `cloud`.`vm_template` where name = ? and removed is null order by id
>>> desc limit 1");
>>>                   pstmt.setString(1, hypervisorAndTemplateName.getValue());
>>>                   rs = pstmt.executeQuery();
>>> 
>>> Should I add a row by hand?
>>> Is there a readme/howto-upgrade, I should read (or create using my 
>>> findings)?
>>> Why is this not automatic this time?
>>> 
>>> sorry if I missed the mail thread explaining all of this,
>>> Daan Hoogland
>> 

Reply via email to