Connecting sandbox to Azure for cloud burstin fails

Setting up the OpenNebula sandbox with no issues.

Have an Azure account set up, generated the certificates, uploaded the .cer file etc to Azure subscription, modified oned.conf, az_driver.conf with subscription id and path to my cert etc, and modified VM templates.

Now, registering an azure region as a host in opennebula, it shows up under Hosts in sunstone, but with an error. Tailing oned.log gives the following:

Thu Aug 11 13:05:54 2016 [Z0][InM][I]: Command execution fail: /var/lib/one/remotes/im/run_probes az /var/lib/one//datastores 4124 20 2 north-europe
Thu Aug 11 13:05:54 2016 [Z0][InM][I]: /usr/local/share/gems/gems/azure-0.7.5/lib/azure/configurable.rb:184:in rescue in management_certificate=': Management certificate not valid. Error: PKCS12_parse: mac verify failure (ArgumentError) Thu Aug 11 13:05:54 2016 [Z0][InM][I]: from /usr/local/share/gems/gems/azure-0.7.5/lib/azure/configurable.rb:167:in management_certificate=’
Thu Aug 11 13:05:54 2016 [Z0][InM][I]: from /usr/lib/one/ruby/az_driver.rb:165:in block in initialize' Thu Aug 11 13:05:54 2016 [Z0][InM][I]: from /usr/local/share/gems/gems/azure-0.7.5/lib/azure/configurable.rb:113:in configure’
Thu Aug 11 13:05:54 2016 [Z0][InM][I]: from /usr/lib/one/ruby/az_driver.rb:164:in initialize' Thu Aug 11 13:05:54 2016 [Z0][InM][I]: from ./poll:32:in new’
Thu Aug 11 13:05:54 2016 [Z0][InM][I]: from ./poll:32:in `’
Thu Aug 11 13:05:54 2016 [Z0][InM][E]: Error executing poll
Thu Aug 11 13:05:54 2016 [Z0][InM][I]: ExitCode: 1
Thu Aug 11 13:05:54 2016 [Z0][ONE][E]: Error monitoring Host north-europe (2): Error executing poll

So, something goes wrong connecting to azure, probably something with the cert. Google searches points to some Ruby issues as well. Anyone have succeded wiith this?

Replying on my slef here. Found that a spelling issue in az_driver.conf caused the issue. Now in connects and monitor, and I can from bash list wild VM’s and import those running VM’s from my Azure into open nebula.

However, I fail to deploy a new VM in Azure. My template:

CONTEXT = [
NETWORK = “YES”,
SSH_PUBLIC_KEY = “root[SSH_PUBLIC_KEY]” ]
CPU = “1”
DESCRIPTION = “Launches an t2.micro Ubuntu”
DISK = [
IMAGE = “ttylinux” ]
FEATURES = [
ACPI = “no”,
APIC = “no” ]
GRAPHICS = [
LISTEN = “0.0.0.0”,
TYPE = “VNC” ]
MEMORY = “1”
NIC = [
NETWORK = “cloud” ]
PUBLIC_CLOUD = [
CLOUD_SERVICE=“MatsCloud”
IMAGE = “b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04-LTS-amd64-server-20140606.1-en-us-30GB”,
INSTANCE_TYPE = “Small”,
LOCATION = “north-europe”,
SSHPORT = “2222”,
TCP_ENDPOINTS = “80”,
TYPE = “AZURE”,
VM_PASSWORD = “mypass”,
VM_USER = “azuser”,
WIN_RM = “https” ]
SCHED_REQUIREMENTS = “PUBLIC_CLOUD = YES”

sched.log shows that it goes to the correct host(north-europe), but deploy fails. From oned.log:

Mon Aug 15 15:53:36 2016 [Z0][VM][I]: New state is ACTIVE
Mon Aug 15 15:53:36 2016 [Z0][VM][I]: New LCM state is PROLOG
Mon Aug 15 15:53:36 2016 [Z0][VM][I]: New LCM state is BOOT
Mon Aug 15 15:53:36 2016 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/16/deployment.0
Mon Aug 15 15:53:36 2016 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Mon Aug 15 15:54:27 2016 [Z0][VMM][I]: Command execution fail: /var/lib/one/remotes/vmm/az/deploy ‘/var/lib/one/vms/16/deployment.0’ ‘north-europe’ 16 north-europe
Mon Aug 15 15:54:27 2016 [Z0][VMM][I]: Error deploying Azure VM: [31m[1mFailed to create virtual machine : [31m[1m: [0m[0m[0m[0m
Mon Aug 15 15:54:27 2016 [Z0][VMM][I]: ExitCode: 255
Mon Aug 15 15:54:27 2016 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Mon Aug 15 15:54:27 2016 [Z0][VMM][E]: Error deploying virtual machine
Mon Aug 15 15:54:27 2016 [Z0][VM][I]: New LCM state is BOOT_FAILURE

Trying to find that exit code 255 as I believe it is Azure response. Right?

And yet again I answer on my own issues:-)

Thing is, the ntpd is NOT installed in the sandbox as default, and in virtualbox causes a drift in time, thus causing the issue.

Yum install ntp and service start ntpd solved the issue.

For next release of Sandbox, ntpd should be included.

THANKS for letting us know!

Just filled an issue for next release

http://dev.opennebula.org/issues/4719