Hello,
I’ve installed OpenNebula 5.12.0.3 together with a ceph cluster for personal use, and facing with a confusing issue.
- Created ceph data stores (image:103 and system:102)
- Downloaded a kvm image from MarketPlaces into the image datastore
- Tried to instantiate the associated template into the ceph_system data store - no success
- To narrow down the issue, tried to instantiate into system data store - no success
VM log:
Sun Oct 25 12:13:55 2020 [Z0][VM][I]: New state is ACTIVE
Sun Oct 25 12:13:55 2020 [Z0][VM][I]: New LCM state is PROLOG
Sun Oct 25 12:14:13 2020 [Z0][VM][I]: New LCM state is BOOT
Sun Oct 25 12:14:13 2020 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/16/deployment.0
Sun Oct 25 12:14:17 2020 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Sun Oct 25 12:14:19 2020 [Z0][VMM][I]: ExitCode: 0
Sun Oct 25 12:14:19 2020 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Sun Oct 25 12:14:20 2020 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/16/deployment.0’ ‘node8-kvm’ 16 node8-kvm
Sun Oct 25 12:14:20 2020 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/16/deployment.0
Sun Oct 25 12:14:20 2020 [Z0][VMM][I]: error: internal error: process exited while connecting to monitor: 2020-10-25T11:14:20.216694Z qemu-system-x86_64: -drive file=rbd:one/one-3-16-0:id=libvirt:auth_supported=cephx;none:mon_host=10.20.0.11:6789;10.20.0.12:6789;10.20.0.13:6789,file.password-secret=virtio-disk0-secret0,format=raw,if=none,id=drive-virtio-disk0: error connecting: Permission denied
Sun Oct 25 12:14:20 2020 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/16/deployment.0
Sun Oct 25 12:14:20 2020 [Z0][VMM][I]: ExitCode: 255
Sun Oct 25 12:14:20 2020 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Sun Oct 25 12:14:20 2020 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/16/deployment.0
Sun Oct 25 12:14:20 2020 [Z0][VM][I]: New LCM state is BOOT_FAILURE
I noticed that Opennebula created some files on the compute node:
oneadmin@node8:~/datastores/0/16$ ls -l
total 1163636
-rw-rw-r-- 1 oneadmin oneadmin 1776 Oct 25 12:14 deployment.0
-rw-r–r-- 1 oneadmin oneadmin 2361393152 Oct 25 12:14 disk.0
-rw-r–r-- 1 oneadmin oneadmin 372736 Oct 25 12:14 disk.1
oneadmin@node8:~/datastores/0/16$ qemu-img info disk.0
image: disk.0
file format: raw
virtual size: 2.2G (2361393152 bytes)
disk size: 1.1G
oneadmin@node8:~/datastores/0/16$ qemu-img info disk.1
image: disk.1
file format: raw
virtual size: 364K (372736 bytes)
disk size: 364K
oneadmin@node8:~/datastores/0/16$ file -L -s disk.0
disk.0: DOS/MBR boot sector, extended partition table (last)
oneadmin@node8:~/datastores/0/16$ file -L -s disk.1
disk.1: ISO 9660 CD-ROM filesystem data ‘CONTEXT’
Tried to create the VM by hand:
oneadmin@node8:~/datastores/0/16$ virsh -c qemu:///system create deployment.0
error: Failed to create domain from deployment.0
error: internal error: process exited while connecting to monitor: 2020-10-25T11:18:19.784321Z qemu-system-x86_64: -drive file=rbd:one/one-3-16-0:id=libvirt:auth_supported=cephx;none:mon_host=10.20.0.11:6789;10.20.0.12:6789;10.20.0.13:6789,file.password-secret=virtio-disk0-secret0,format=raw,if=none,id=drive-virtio-disk0: error connecting: Permission denied
Noticing that only the owner allowed to write disk.0, I modified the file permissions by hand:
oneadmin@node8:~/datastores/0/16$ ls -l
total 1163636
-rw-rw-r-- 1 oneadmin oneadmin 1776 Oct 25 12:14 deployment.0
-rw-rw-rw- 1 oneadmin oneadmin 2361393152 Oct 25 12:14 disk.0
-rw-r–r-- 1 oneadmin oneadmin 372736 Oct 25 12:14 disk.1
The retried vm creation either by hand or via the Opennebula GUI (Recover->Retry) produced the same results as above.
oneadmin@node8:~/datastores/0/16$ virsh -c qemu:///system create deployment.0
error: Failed to create domain from deployment.0
error: internal error: process exited while connecting to monitor: 2020-10-25T11:20:17.967780Z qemu-system-x86_64: -drive file=rbd:one/one-3-16-0:id=libvirt:auth_supported=cephx;none:mon_host=10.20.0.11:6789;10.20.0.12:6789;10.20.0.13:6789,file.password-secret=virtio-disk0-secret0,format=raw,if=none,id=drive-virtio-disk0: error connecting: Permission denied
oneadmin@node8:~/datastores/0/16$ virsh list
Id Name State
Retry (Recover->Retry) on opennebula GUI:
Sun Oct 25 12:14:20 2020 [Z0][VM][I]: New LCM state is BOOT_FAILURE
Sun Oct 25 12:22:11 2020 [Z0][VM][I]: New LCM state is BOOT
Sun Oct 25 12:22:11 2020 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/16/deployment.0
Sun Oct 25 12:22:15 2020 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: ExitCode: 0
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/16/deployment.0’ ‘node8-kvm’ 16 node8-kvm
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/0/16/deployment.0
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: error: internal error: process exited while connecting to monitor: 2020-10-25T11:22:18.687631Z qemu-system-x86_64: -drive file=rbd:one/one-3-16-0:id=libvirt:auth_supported=cephx;none:mon_host=10.20.0.11:6789;10.20.0.12:6789;10.20.0.13:6789,file.password-secret=virtio-disk0-secret0,format=raw,if=none,id=drive-virtio-disk0: error connecting: Permission denied
Sun Oct 25 12:22:18 2020 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/0/16/deployment.0
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: ExitCode: 255
Sun Oct 25 12:22:18 2020 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Sun Oct 25 12:22:18 2020 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/0/16/deployment.0
Sun Oct 25 12:22:18 2020 [Z0][VM][I]: New LCM state is BOOT_FAILURE
At this point I decided to create a VM on node8 by virt-manager, using the same disk files as Opennebula created. For my biggest surprise, that VM creation was successful, the VM booted and its console is accessible by virt-manager GUI.
oneadmin@node8:~/datastores/0/16$ virsh list
Id Name State
16 one-16-copy running
My current conclusion is that every components that takes part of a vm creation works properly, yet the end result is unsuccessful. Moreover, I can create lxc containers on any compute node by Opennebula using images from MarketPlaces.
oneadmin@node8:~$ lxc list
±------±--------±---------------------±-----±-----------±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±------±--------±---------------------±-----±-----------±----------+
| one-6 | RUNNING | 192.168.1.101 (eth0) | | PERSISTENT | 0 |
±------±--------±---------------------±-----±-----------±----------+
Any advice to solve my issue would be welcome.
Some detailed information follows.
The xml created by virt-manager:
oneadmin@node8:~/datastores/0/16$ sudo cat /etc/libvirt/qemu/one-16-copy.xml
Opennebula-generated xml:
oneadmin@node8:~/datastores/0/16$ cat ./deployment.0
one-16
Ubuntu 18.04 KVM local 2nd
2048
2097152
hvm
<one:vm xmlns:one=“http://opennebula.org/xmlns/libvirt/1.0”>
one:system_datastore</one:system_datastore>
one:name</one:name>
one:uname</one:uname>
one:uid0</one:uid>
one:gname</one:gname>
one:gid0</one:gid>
one:opennebula_version5.10.1</one:opennebula_version>
one:stime1603624413</one:stime>
one:deployment_time1603624931</one:deployment_time>
</one:vm>
oneadmin@node8:~/datastores/0/16$ rbd list -l one
NAME SIZE PARENT FMT PROT LOCK
one-3 2.20GiB 2
one-3@snap 2.20GiB 2 yes
one-4 1GiB 2
one-4@snap 1GiB 2 yes
one-4-6-0 1GiB one/one-4@snap 2 excl
one-4-7-0 20GiB one/one-4@snap 2 excl
oneadmin@node8:~$ cat /etc/hosts
127.0.0.1 localhost
10.20.0.11 node1
10.20.0.12 node2
10.20.0.13 node3
10.20.0.15 node5
10.20.0.15 node5-lxd
10.20.0.15 node5-kvm
10.20.0.16 node6
10.20.0.16 node6-lxd
10.20.0.16 node6-kvm
10.20.0.17 node7
10.20.0.17 node7-lxd
10.20.0.17 node7-kvm
10.20.0.18 node8
10.20.0.18 node8-lxd
10.20.0.18 node8-kvm
10.20.0.30 one-fe
root@node8:/var/log/libvirt# cat libvirtd.log
…
2020-10-25 12:06:08.520+0000: 25845: debug : qemuMonitorJSONIOProcessLine:193 : Line [{“return”: [{“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 372736, “filename”: “/var/lib/one/datastores/0/16/disk.1”, “format”: “raw”, “actual-size”: 372736, “dirty-flag”: false}, “iops_wr”: 0, “ro”: true, “node-name”: “#block375”, “backing_file_depth”: 0, “drv”: “raw”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.1”, “encryption_key_missing”: false}, {“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 372736, “filename”: “/var/lib/one/datastores/0/16/disk.1”, “format”: “file”, “actual-size”: 372736, “dirty-flag”: false}, “iops_wr”: 0, “ro”: true, “node-name”: “#block205”, “backing_file_depth”: 0, “drv”: “file”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.1”, “encryption_key_missing”: false}, {“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 2361393152, “filename”: “/var/lib/one/datastores/0/16/disk.0”, “format”: “raw”, “actual-size”: 1197514752, “dirty-flag”: false}, “iops_wr”: 0, “ro”: false, “node-name”: “#block149”, “backing_file_depth”: 0, “drv”: “raw”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.0”, “encryption_key_missing”: false}, {“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 2361393152, “filename”: “/var/lib/one/datastores/0/16/disk.0”, “format”: “file”, “actual-size”: 1197514752, “dirty-flag”: false}, “iops_wr”: 0, “ro”: false, “node-name”: “#block070”, “backing_file_depth”: 0, “drv”: “file”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.0”, “encryption_key_missing”: false}], “id”: “libvirt-212”}]
2020-10-25 12:06:08.520+0000: 25845: info : qemuMonitorJSONIOProcessLine:213 : QEMU_MONITOR_RECV_REPLY: mon=0x7f83f40540c0 reply={“return”: [{“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 372736, “filename”: “/var/lib/one/datastores/0/16/disk.1”, “format”: “raw”, “actual-size”: 372736, “dirty-flag”: false}, “iops_wr”: 0, “ro”: true, “node-name”: “#block375”, “backing_file_depth”: 0, “drv”: “raw”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.1”, “encryption_key_missing”: false}, {“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 372736, “filename”: “/var/lib/one/datastores/0/16/disk.1”, “format”: “file”, “actual-size”: 372736, “dirty-flag”: false}, “iops_wr”: 0, “ro”: true, “node-name”: “#block205”, “backing_file_depth”: 0, “drv”: “file”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.1”, “encryption_key_missing”: false}, {“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 2361393152, “filename”: “/var/lib/one/datastores/0/16/disk.0”, “format”: “raw”, “actual-size”: 1197514752, “dirty-flag”: false}, “iops_wr”: 0, “ro”: false, “node-name”: “#block149”, “backing_file_depth”: 0, “drv”: “raw”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.0”, “encryption_key_missing”: false}, {“iops_rd”: 0, “detect_zeroes”: “off”, “image”: {“virtual-size”: 2361393152, “filename”: “/var/lib/one/datastores/0/16/disk.0”, “format”: “file”, “actual-size”: 1197514752, “dirty-flag”: false}, “iops_wr”: 0, “ro”: false, “node-name”: “#block070”, “backing_file_depth”: 0, “drv”: “file”, “iops”: 0, “bps_wr”: 0, “write_threshold”: 0, “encrypted”: false, “bps”: 0, “bps_rd”: 0, “cache”: {“no-flush”: false, “direct”: false, “writeback”: true}, “file”: “/var/lib/one/datastores/0/16/disk.0”, “encryption_key_missing”: false}], “id”: “libvirt-212”}
2020-10-25 12:06:08.520+0000: 25850: debug : qemuMonitorJSONCommandWithFd:306 : Receive command reply ret=0 rxObject=0x55781f6c30c0
2020-10-25 12:06:08.520+0000: 25850: debug : qemuDomainObjExitMonitorInternal:5142 : Exited monitor (mon=0x7f83f40540c0 vm=0x7f83f4046eb0 name=one-16-copy)
2020-10-25 12:06:08.520+0000: 25850: debug : qemuDomainObjEndJob:5050 : Stopping job: query (async=none vm=0x7f83f4046eb0 name=one-16-copy)
…
oneadmin@one-fe:~$ onevm show -x 16
not attached yet because of character number limit…
oneadmin@one-fe:~$ onedatastore list -x
<DATASTORE_POOL>
103
0
0
oneadmin
oneadmin
cephds
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>0</OWNER_A>
<GROUP_U>1</GROUP_U>
<GROUP_M>0</GROUP_M>
<GROUP_A>0</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
<DS_MAD></DS_MAD>
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
0
<DISK_TYPE>3</DISK_TYPE>
0
0
<TOTAL_MB>5436909</TOTAL_MB>
<FREE_MB>5431676</FREE_MB>
<USED_MB>5232</USED_MB>
3
4
<ALLOW_ORPHANS></ALLOW_ORPHANS>
<BRIDGE_LIST></BRIDGE_LIST>
<CEPH_HOST></CEPH_HOST>
<CEPH_SECRET></CEPH_SECRET>
<CEPH_USER></CEPH_USER>
<CLONE_TARGET></CLONE_TARGET>
<CLONE_TARGET_SHARED></CLONE_TARGET_SHARED>
<CLONE_TARGET_SSH></CLONE_TARGET_SSH>
<DATASTORE_CAPACITY_CHECK></DATASTORE_CAPACITY_CHECK>
<DISK_TYPE></DISK_TYPE>
<DISK_TYPE_SHARED></DISK_TYPE_SHARED>
<DISK_TYPE_SSH></DISK_TYPE_SSH>
<DS_MAD></DS_MAD>
<LN_TARGET></LN_TARGET>
<LN_TARGET_SHARED></LN_TARGET_SHARED>
<LN_TARGET_SSH></LN_TARGET_SSH>
<POOL_NAME></POOL_NAME>
<RESTRICTED_DIRS></RESTRICTED_DIRS>
<SAFE_DIRS></SAFE_DIRS>
<TM_MAD></TM_MAD>
<TM_MAD_SYSTEM></TM_MAD_SYSTEM>
102
0
0
oneadmin
oneadmin
ceph_system
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>1</OWNER_A>
<GROUP_U>1</GROUP_U>
<GROUP_M>1</GROUP_M>
<GROUP_A>1</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
<DS_MAD></DS_MAD>
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
1
<DISK_TYPE>3</DISK_TYPE>
0
0
<TOTAL_MB>5436909</TOTAL_MB>
<FREE_MB>5431676</FREE_MB>
<USED_MB>5232</USED_MB>
<ALLOW_ORPHANS></ALLOW_ORPHANS>
<BRIDGE_LIST></BRIDGE_LIST>
<CEPH_HOST></CEPH_HOST>
<CEPH_SECRET></CEPH_SECRET>
<CEPH_USER></CEPH_USER>
<DATASTORE_CAPACITY_CHECK></DATASTORE_CAPACITY_CHECK>
<DISK_TYPE></DISK_TYPE>
<DS_MIGRATE></DS_MIGRATE>
<POOL_NAME></POOL_NAME>
<RESTRICTED_DIRS></RESTRICTED_DIRS>
<SAFE_DIRS></SAFE_DIRS>
<TM_MAD></TM_MAD>
2
0
0
oneadmin
oneadmin
files
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>0</OWNER_A>
<GROUP_U>1</GROUP_U>
<GROUP_M>0</GROUP_M>
<GROUP_A>0</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
<DS_MAD></DS_MAD>
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
2
<DISK_TYPE>0</DISK_TYPE>
0
0
<TOTAL_MB>30107</TOTAL_MB>
<FREE_MB>20701</FREE_MB>
<USED_MB>7855</USED_MB>
<ALLOW_ORPHANS></ALLOW_ORPHANS>
<CLONE_TARGET></CLONE_TARGET>
<DS_MAD></DS_MAD>
<LN_TARGET></LN_TARGET>
<RESTRICTED_DIRS></RESTRICTED_DIRS>
<SAFE_DIRS></SAFE_DIRS>
<TM_MAD></TM_MAD>
1
0
0
oneadmin
oneadmin
default
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>0</OWNER_A>
<GROUP_U>1</GROUP_U>
<GROUP_M>0</GROUP_M>
<GROUP_A>0</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
<DS_MAD></DS_MAD>
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
0
<DISK_TYPE>0</DISK_TYPE>
0
0
<TOTAL_MB>30107</TOTAL_MB>
<FREE_MB>20701</FREE_MB>
<USED_MB>7855</USED_MB>
<ALLOW_ORPHANS></ALLOW_ORPHANS>
<CLONE_TARGET></CLONE_TARGET>
<DISK_TYPE></DISK_TYPE>
<DS_MAD></DS_MAD>
<LN_TARGET></LN_TARGET>
<RESTRICTED_DIRS></RESTRICTED_DIRS>
<SAFE_DIRS></SAFE_DIRS>
<TM_MAD></TM_MAD>
0
0
0
oneadmin
oneadmin
system
<OWNER_U>1</OWNER_U>
<OWNER_M>1</OWNER_M>
<OWNER_A>0</OWNER_A>
<GROUP_U>1</GROUP_U>
<GROUP_M>0</GROUP_M>
<GROUP_A>0</GROUP_A>
<OTHER_U>0</OTHER_U>
<OTHER_M>0</OTHER_M>
<OTHER_A>0</OTHER_A>
<DS_MAD></DS_MAD>
<TM_MAD></TM_MAD>
<BASE_PATH></BASE_PATH>
1
<DISK_TYPE>0</DISK_TYPE>
0
0
<TOTAL_MB>0</TOTAL_MB>
<FREE_MB>0</FREE_MB>
<USED_MB>0</USED_MB>
<ALLOW_ORPHANS></ALLOW_ORPHANS>
<DISK_TYPE></DISK_TYPE>
<DS_MIGRATE></DS_MIGRATE>
<RESTRICTED_DIRS></RESTRICTED_DIRS>
<SAFE_DIRS></SAFE_DIRS>
<TM_MAD></TM_MAD>
</DATASTORE_POOL>