Failing to deploy LXD VM

solved
(Andy) #1

After setting up OpenNebula (5.8.1 on Ubuntu 18.04) + Sunstone, I’ve deployed two LXD nodes: 1st on the same node as one and sunstone and 2nd completely independent (different sub network). I use shared fs network and distinct storages for image and shared system datastores.

I can start and import Wild VMs in both. I can only deploy to the node with OpenNebula. Deploying to the 2nd node (either via shared or ssh system datastore) produces BOOT_FAILURE and this log:

[Z0][VM][I]: New state is ACTIVE
[Z0][VM][I]: New LCM state is PROLOG
[Z0][VM][I]: New LCM state is BOOT
[Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/37/deployment.0
[Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
[Z0][VMM][I]: Successfully execute network driver operation: pre.
[Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/lxd/deploy ‘/var/lib/one//datastores/115/37/deployment.0’ ‘’ 37
[Z0][VMM][I]: /usr/lib/ruby/2.5.0/open3.rb:199:in spawn': No such file or directory - file (Errno::ENOENT) [Z0][VMM][I]: from /usr/lib/ruby/2.5.0/open3.rb:199:inpopen_run’
[Z0][VMM][I]: from /usr/lib/ruby/2.5.0/open3.rb:95:in popen3' [Z0][VMM][I]: from /usr/lib/ruby/2.5.0/open3.rb:258:incapture3’
[Z0][VMM][I]: from /var/tmp/one/vmm/lxd/command.rb:35:in execute' [Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:459:innew_disk_mapper’
[Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:375:in setup_disk' [Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:258:inblock in setup_storage’
[Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:251:in each' [Z0][VMM][I]: from /var/tmp/one/vmm/lxd/container.rb:251:insetup_storage’
[Z0][VMM][I]: from /var/tmp/one/vmm/lxd/deploy:71:in `’
[Z0][VMM][I]: ExitCode: 1
[Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
[Z0][VMM][E]: Error deploying virtual machine
[Z0][VM][I]: New LCM state is BOOT_FAILURE

Any hints on where to search for a fix or a workaround would be greatly appreciated :slight_smile:

(Daniel Clavijo Coca) #2

I can start and import Wild VMs in both. I can only deploy to the node with OpenNebula. Deploying to the 2nd node (either via shared or ssh system datastore) produces BOOT_FAILURE and this log:

Does this mean you can succesfully import the wild containers on both nodes, but the you, for example, try to deploy wild container from host A on host B ?

(Andy) #3

Hi Daniel :slight_smile: Thank you for your answer.
No, I’m not trying to deploy a wild container to another host.
I tested and mentioned wild containers just to confirm that the node is operational and to isolate the problem to only deployment.

The problem I’m facing is occurring with the image downloaded from the marketplace: Ubuntu_bionic - LXD. I also tried LXD images for Alpine 3.8, 3.9 from the marketplace with the same result. :frowning:

(Daniel Clavijo Coca) #4

It seems oneadmin cannot access the image file, whose path should be something like "#{sysds_path}/#{vm_id}/disk.#{disk_id}", can you check, in the node the VM will be deployed, that image file exists (replacing the variables with your scenario context) and if it does exists, run file -L -s as oneadmin?

should be something like /var/lib/one/datastores/0/666/disk.0

(Andy) #5

Yes, you’re spot on. Below are the contents of the 114 Datastore (on shared fs) and 4 respective VMs, where 2 that succeeded have the “disk” files and two that failed don’t have them.

oneadmin@Ubuntu-1804-bionic-64-minimal:~$ ls ~/datastores/114/4*

/var/lib/one/datastores/114/42:
context.sh  deployment.0  disk.0  disk.1  transfer.0.prolog

/var/lib/one/datastores/114/43:
context.sh  deployment.0  disk.0  disk.1  mapper  transfer.0.prolog

/var/lib/one/datastores/114/44:
context.sh  deployment.0  transfer.0.prolog

/var/lib/one/datastores/114/45:
context.sh  deployment.0  transfer.0.prolog

I’m guessing its something wrong with deployment of the LXD VM, tested a bunch of combinations with storage, but didn’t get to anything meaningful. Any ideas how to debug / fix this?

Even missing those files I’ve run (looking what package to install to get it working…):

oneadmin@Ubuntu-1804-bionic-64-minimal:~$ file -L -s
bash: file: command not found

Maybe this is the problem?

(Andy) #6

Yup :slight_smile: I was missing:

  apt-get install file libmagic1

Thank you Daniel @dann1 for your quick response and help :slight_smile:

(Daniel Clavijo Coca) #7

Glad to help :slight_smile: