Upgrading VM templates from 4.14 to 5.0.2

Hello,

I just upgrade our production 4.14 OpenNebula to 5.0.2 following the documentation.

I just have an issue with already existing templates:

Thu Aug 18 16:33:30 2016 [Z0][ReM][E]: Req:8464 UID:5 TemplateInstantiate result FAILURE [TemplateInstantiate] Error allocating a new virtual machine template. Wrong OS/BOOT value: "hd" should be a comma-separated list of disk# or nic#

I thought this would be managed by the onedb upgrade.

Any idea?

Regards.

Here is my onedb fsck log:

[UNREPAIRED] History record for VM 8691 seq # 13 is not closed (etime = 0)
[UNREPAIRED] History record for VM 8691 seq # 14 is not closed (etime = 0)
[UNREPAIRED] History record for VM 8691 seq # 15 is not closed (etime = 0)
[UNREPAIRED] History record for VM 8691 seq # 16 is not closed (etime = 0)
[UNREPAIRED] History record for VM 8691 seq # 17 is not closed (etime = 0)
Host 2 CPU_USAGE has 519 	is	520
User 2 quotas: VNet 454	LEASES_USED has 1 	is	0
User 2 quotas: Datastore 101	IMAGES_USED has -1 	is	11
User 2 quotas: Datastore 101	SIZE_USED has 20480 	is	512000
User 3 quotas: Datastore 101	IMAGES_USED has 18 	is	21
User 3 quotas: Datastore 101	SIZE_USED has 770048 	is	892928
User 4 quotas: SYSTEM_DISK_SIZE_USED has 327680 	is	40960
User 4 quotas: Datastore 102	IMAGES_USED has 47 	is	52
User 4 quotas: Datastore 102	SIZE_USED has 55621 	is	60216
User 4 quotas: Datastore 101	IMAGES_USED has -57 	is	561
User 4 quotas: Datastore 101	SIZE_USED has -2365440 	is	22947840
User 6 quotas: Datastore 101	IMAGES_USED has 3 	is	4
User 6 quotas: Datastore 101	SIZE_USED has 122880 	is	163840
Group 100 quotas: Datastore 101	IMAGES_USED has 83 	is	124
Group 100 quotas: Datastore 101	SIZE_USED has 3493888 	is	5173248
Group 101 quotas: SYSTEM_DISK_SIZE_USED has 3092736 	is	2806016
Group 101 quotas: Datastore 101	IMAGES_USED has -86 	is	495
Group 101 quotas: Datastore 101	SIZE_USED has -3524106 	is	20273654
Group 101 quotas: Datastore 102	IMAGES_USED has 29 	is	34
Group 101 quotas: Datastore 102	SIZE_USED has 41867 	is	46462
Total errors found: 25
Total errors repaired: 20
Total errors unrepaired: 5

Daniel Dehennin opennebula@discoursemail.com writes:

Hello,

I just upgrade our production 4.14 OpenNebula to 5.0.2 following the documentation.

I just have an issue with already existing templates:

Thu Aug 18 16:33:30 2016 [Z0][ReM][E]: Req:8464 UID:5 TemplateInstantiate result FAILURE [TemplateInstantiate] Error allocating a new virtual machine template. Wrong OS/BOOT value: "hd" should be a comma-separated list of disk# or nic#

I thought this would be managed by the onedb upgrade.

I made a patch[1] for onedb, here is a use of it:

onedb patch -v -u oneadmin -d opennebula 5.0_boot_devices.rb
Version read:
Shared tables 4.90.0 : Database migrated from 4.11.80 to 4.90.0 (OpenNebula 4.90.0) by onedb command.
Local tables  4.90.0 : Database migrated from 4.13.85 to 4.90.0 (OpenNebula 4.90.0) by onedb command.

mysqldump: [Warning] Using a password on the command line interface can be insecure.
MySQL dump stored in /var/lib/one/mysql_localhost_opennebula_2016-8-19_16:30:49.sql
Use 'onedb restore' or restore the DB using the mysql command:
mysql -u user -h server -P port db_name < backup_file

  > Running patch 5.0_boot_devices.rb
  Skipping template 1380 Install CDROM 40Go (i386): No image named 'eole-2.4.1-rc2-i386.iso' for uid '9'
  Skipping template 1381 Install CDROM 40Go (amd64): No image named 'eole-2.4.1-rc2-amd64.iso' for uid '9'
  [...]
  Warning template 13219 coreos-amd64: skip nonexistent boot device 'cdrom'
  Template 13219 coreos-amd64: 'hd,cdrom' -> 'disk0'
  [...]
  Template 2349 Run Any: 'CDROM,hd' -> 'disk1,disk0'

Regards.

Footnotes:
[1] Bug #4728: Template boot order is not converted during upgrade to 5.0 - OpenNebula - OpenNebula Development pages

Daniel Dehennin
Récupérer ma clef GPG: gpg --recv-keys 0xCC1E9E5B7A6FE2DF
Fingerprint: 3E69 014E 5C23 50E8 9ED6 2AAD CC1E 9E5B 7A6F E2DF