OpenNebula broken on Ubuntu 20.04

Hello, trying to get create LXC instances working on a PC running Ubuntu 20.04 using OpenNebula.
Before install OpenNebula, i have been able to easily create LXC instances from the LXD snap package. But so far cannot get anything done on OpenNebula.
Specifically instances fail after boot. Using image Ubuntu 20.04 from OpenNebula Public (OpenNebula - Marketplace)

The logs show the following failure:

Sat Jan 9 23:45:23 2021 [Z0][VM][I]: New state is ACTIVE
Sat Jan 9 23:45:23 2021 [Z0][VM][I]: New LCM state is PROLOG
Sat Jan 9 23:45:25 2021 [Z0][VM][I]: New LCM state is BOOT
Sat Jan 9 23:45:25 2021 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/5/deployment.0
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/lxd/deploy '/var/lib/one//datastores/0/5/deployment.0' 'btc1' 5 btc1
Sat Jan 9 23:45:26 2021 [Z0][VMM][E]: deploy: Error: not found
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: /var/tmp/one/vmm/lxd/client.rb:102:in `wait': {"type"=>"sync", "status"=>"Success", "status_code"=>200, "operation"=>"", "error_code"=>0, "error"=>"", "metadata"=>{"id"=>"4cd259ec-0018-413a-ae6f-ebec7b119c8c", "class"=>"task", "description"=>"Creating container", "created_at"=>"2021-01-09T23:45:26.62876652+08:00", "updated_at"=>"2021-01-09T23:45:26.62876652+08:00", "status"=>"Failure", "status_code"=>400, "resources"=>{"containers"=>["/1.0/containers/one-5"], "instances"=>["/1.0/instances/one-5"]}, "metadata"=>nil, "may_cancel"=>false, "err"=>"Invalid devices: Device validation failed for \\"context\\": Missing source \\"/var/lib/one/datastores/0/5/mapper/disk.1\\" for disk \\"context\\"", "location"=>"none"}} (LXDError)
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:517:in `wait?'
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:135:in `create'
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: from /var/tmp/one/vmm/lxd/deploy:52:in `<main>'
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: ExitCode: 1
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: Successfully execute network driver operation: clean.
Sat Jan 9 23:45:26 2021 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Sat Jan 9 23:45:26 2021 [Z0][VMM][E]: Error deploying virtual machine
Sat Jan 9 23:45:26 2021 [Z0][VM][I]: New LCM state is BOOT_FAILURE

In the host file system i only find the following:

$ find /var/lib/one//datastores/0/5/
/var/lib/one//datastores/0/5/
/var/lib/one//datastores/0/5/disk.0
/var/lib/one//datastores/0/5/disk.1

There is no “mapper” in the path. Any ideas what could be the issue?
Same problem when I try an image [ubuntu_focal - LXD] (https://uk.images.linuxcontainers.org//images/ubuntu/focal/amd64/default/20210109_07:42)

Can you check the LXD version you currently have ? lxd --version

4.0.4 as snap package on ubuntu 20.04

LXD 4 is not supported LXD Node Installation — OpenNebula 5.12.7 documentation

1 Like

Hi,
Got it working this way:
snap remove lxd
snap install lxd --channel=3.0/stable
Saw somewhere in the docs that v. 3 is supported.
HTH.

1 Like