Bug #1128

Problems using allocateFromTemplate(Client client, int templateId) java OCA

Added by Sajith Kalathingal over 9 years ago. Updated over 9 years ago.

Status:ClosedStart date:02/10/2012
Priority:NormalDue date:
Assignee:Carlos Martín% Done:

0%

Category:-
Target version:Release 3.4 - S0
Resolution:fixed Pull request:
Affected Versions:OpenNebula 3.2

Description

I'm trying to allocate virtual machines using the following statement allocateFromTemplate(Client client, int templateId). While doing this VM goes from pending->boot->fail.

There is nothing interesting on oned.log or OneResponse.

However individual VM log shows

Thu Feb 9 12:36:28 2012 [DiM][I]: New VM state is ACTIVE.
Thu Feb 9 12:36:28 2012 [LCM][I]: New VM state is PROLOG.
Thu Feb 9 12:36:28 2012 [VM][I]: Virtual Machine has no context
Thu Feb 9 12:36:28 2012 [LCM][I]: New VM state is BOOT
Thu Feb 9 12:36:28 2012 [VMM][I]: Generating deployment file: /var/lib/one/54/deployment.0
Thu Feb 9 12:36:28 2012 [VMM][E]: No MEMORY defined and no default provided.
Thu Feb 9 12:36:28 2012 [VMM][E]: deploy_action, error generating deployment file: /var/lib/one/54/deployment.0
Thu Feb 9 12:36:28 2012 [DiM][I]: New VM state is FAILED

The template which I used is

NAME = ttylinux
CPU = 1
MEMORY = 450
PATH = /var/lib/one/public/ttylinux.img

OS = [ KERNEL = /vmlinuz,
INITRD = /initrd.img,
ROOT = sda1,
KERNEL_CMD = "ro xencons=tty console=tty1"]

DISK = [
source = "/var/lib/one/public/ttylinux.img",
target = "hda",
readonly = "no" ]

NIC = [ NETWORK = "Small network1" ]

FEATURES=[ acpi="no" ]

I tried the same template with : onetemplate instantiate `templateid` and it is working fine.

The problem is that xmlrpc call with TEMPLATE_ID = is not working properly.

Associated revisions

Revision 3e21d79a
Added by Carlos Martín over 9 years ago

Bug #1128: Remove deprecated method from Java OCA

Revision b70b8e2d
Added by Carlos Martín over 9 years ago

Bug #1128: Remove deprecated method from Java OCA
(cherry picked from commit 3e21d79a2215846b758640b45fd4a3794d7147f6)

History

#1 Updated by Carlos Martín over 9 years ago

  • Target version set to Release 3.4

Hi,

You are right, that method was deprecated and must be removed from the Java OCA.
The correct way to instantiate a template is the method Template.instantiate()

Thanks for the feedback!

#2 Updated by Carlos Martín over 9 years ago

  • Assignee set to Carlos Martín

#3 Updated by Carlos Martín over 9 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

#4 Updated by Ruben S. Montero over 9 years ago

  • Target version changed from Release 3.4 to Release 3.4 - S0

Also available in: Atom PDF