Starting VM with RBD image


(Eugene) #1

Hello.

I try to run a virtual machine with an rbd image in ceph, but I get a bad result.

  • /var/log/one/oned.log
Tue Sep 18 15:27:13 2018 [Z0][AuM][D]: Message received: AUTHENTICATE SUCCESS 440 -

Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:5856 UID:0 one.vm.info invoked , 134
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:5856 UID:0 one.vm.info result SUCCESS, "<VM><ID>134</ID><UID..."
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:3392 UID:0 one.vm.action invoked , "resume", 134
Tue Sep 18 15:27:13 2018 [Z0][DiM][D]: Resuming VM 134
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:3392 UID:0 one.vm.action result SUCCESS, 134
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:176 UID:0 one.vm.info invoked , 134
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:176 UID:0 one.vm.info result SUCCESS, "<VM><ID>134</ID><UID..."
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:5776 UID:0 one.vm.info invoked , 134
Tue Sep 18 15:27:13 2018 [Z0][ReM][D]: Req:5776 UID:0 one.vm.info result SUCCESS, "<VM><ID>134</ID><UID..."
Tue Sep 18 15:27:13 2018 [Z0][VMM][D]: Message received: LOG I 134 Successfully execute transfer manager driver operation: tm_context.

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 ExitCode: 0

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 Successfully execute network driver operation: pre.

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy '/var/lib/one//datastores/104/134/deployment.55' '10.255.238.23' 134 10.255.238.23

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 error: Failed to create domain from /var/lib/one//datastores/104/134/deployment.55

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 error: internal error: qemu unexpectedly closed the monitor: 2018-09-18T12:27:14.383146Z qemu-kvm: -drive file=rbd:rbd/one-108-134-18:id=oneadmin:key=AQCBjo9bW9h2MBAAkJ9SNFeJ87JnnomhK4ISEw==:auth_supported=cephx\;none:mon_host=15.16.113.140\:6789,format=qcow2,if=none,id=drive-virtio-disk1,cache=none: could not open disk image rbd:rbd/one-108-134-18:id=oneadmin:key=AQCBjo9bW9h2MBAAkJ9SNFeJ87JnnomhK4ISEw==:auth_supported=cephx\;none:mon_host=15.16.113.140\:6789: Image is not in qcow2 format

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG E 134 Could not create domain from /var/lib/one//datastores/104/134/deployment.55

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 ExitCode: 255

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 Failed to execute virtualization driver operation: deploy.

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: DEPLOY FAILURE 134 Could not create domain from /var/lib/one//datastores/104/134/deployment.55

  • /var/log/one/vm_number.log
Tue Sep 18 15:33:19 2018 [Z0][VM][I]: New state is ACTIVE
Tue Sep 18 15:33:19 2018 [Z0][VM][I]: New LCM state is BOOT_POWEROFF
Tue Sep 18 15:33:19 2018 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/134/deployment.56
Tue Sep 18 15:33:19 2018 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Tue Sep 18 15:33:19 2018 [Z0][VMM][I]: ExitCode: 0
Tue Sep 18 15:33:19 2018 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Tue Sep 18 15:33:20 2018 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy '/var/lib/one//datastores/104/134/deployment.56' '10.255.238.23' 134 10.255.238.23
Tue Sep 18 15:33:20 2018 [Z0][VMM][I]: error: Failed to create domain from /var/lib/one//datastores/104/134/deployment.56
Tue Sep 18 15:33:20 2018 [Z0][VMM][I]: error: internal error: qemu unexpectedly closed the monitor: 2018-09-18T12:33:20.127285Z qemu-kvm: -drive file=rbd:rbd/one-108-134-18:id=oneadmin:key=AQCBjo9bW9h2MBAAkJ9SNFeJ87JnnomhK4ISEw==:auth_supported=cephx\;none:mon_host=15.16.113.140\:6789,format=qcow2,if=none,id=drive-virtio-disk1,cache=none: could not open disk image rbd:rbd/one-108-134-18:id=oneadmin:key=AQCBjo9bW9h2MBAAkJ9SNFeJ87JnnomhK4ISEw==:auth_supported=cephx\;none:mon_host=15.16.113.140\:6789: Image is not in qcow2 format
Tue Sep 18 15:33:20 2018 [Z0][VMM][E]: Could not create domain from /var/lib/one//datastores/104/134/deployment.56
Tue Sep 18 15:33:20 2018 [Z0][VMM][I]: ExitCode: 255
Tue Sep 18 15:33:20 2018 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Tue Sep 18 15:33:20 2018 [Z0][VMM][E]: Error deploying virtual machine: Could not create domain from /var/lib/one//datastores/104/134/deployment.56
Tue Sep 18 15:33:20 2018 [Z0][VM][I]: New state is POWEROFF
Tue Sep 18 15:33:20 2018 [Z0][VM][I]: New LCM state is LCM_INIT

On ceph image was created one-108-134-18

Has anyone encountered a similar problem?

  • Config VM
AUTOMATIC_DS_REQUIREMENTS = "(\"CLUSTERS/ID\" @> 101)"
AUTOMATIC_REQUIREMENTS = "(CLUSTER_ID = 101) & !(PUBLIC_CLOUD = YES)"
CONTEXT = [
  CONTEXT = "true",
  DISK_ID = "2",
  ETH0_CONTEXT_FORCE_IPV4 = "",
  ETH0_DNS = "",
  ETH0_GATEWAY = "",
  ETH0_GATEWAY6 = "",
  ETH0_IP = "",
  ETH0_IP6 = "",
  ETH0_IP6_PREFIX_LENGTH = "",
  ETH0_IP6_ULA = "",
  ETH0_MAC = "02:00:c0:72:15:92",
  ETH0_MASK = "",
  ETH0_MTU = "",
  ETH0_NETWORK = "",
  ETH0_SEARCH_DOMAIN = "",
  ETH0_VLAN_ID = "",
  ETH0_VROUTER_IP = "",
  ETH0_VROUTER_IP6 = "",
  ETH0_VROUTER_MANAGEMENT = "",
  IMAGE = "Context",
  NETWORK = "YES",
  SSH_PUBLIC_KEY = "",
  TARGET = "hdb" ]
CPU = "1"
CPU_MODEL = [
  MODEL = "host-passthrough" ]
DISK = [
  ALLOW_ORPHANS = "NO",
  CLUSTER_ID = "101",
  DATASTORE = "SYS",
  DATASTORE_ID = "104",
  DEV_PREFIX = "hd",
  DISK_ID = "1",
  DISK_TYPE = "FILE",
  FORMAT = "raw",
  SIZE = "40960",
  TARGET = "hdc",
  TM_MAD = "shared",
  TYPE = "fs" ]
DISK = [
  ALLOW_ORPHANS = "NO",
  CLONE = "NO",
  CLONE_TARGET = "SYSTEM",
  CLUSTER_ID = "0,101",
  DATASTORE = "default",
  DATASTORE_ID = "1",
  DEV_PREFIX = "hd",
  DISK_ID = "10",
  DISK_SNAPSHOT_TOTAL_SIZE = "0",
  DISK_TYPE = "FILE",
  DRIVER = "raw",
  IMAGE = "virtio.iso",
  IMAGE_ID = "67",
  IMAGE_STATE = "2",
  IMAGE_UNAME = "oneadmin",
  LN_TARGET = "SYSTEM",
  ORIGINAL_SIZE = "302",
  READONLY = "YES",
  SAVE = "NO",
  SIZE = "302",
  SOURCE = "/var/lib/one//datastores/1/cc4c4157918bedf5ae5fef37df06f311",
  TARGET = "hda",
  TM_MAD = "ssh",
  TYPE = "CDROM" ]
DISK = [
  ALLOW_ORPHANS = "NO",
  CLONE = "NO",
  CLONE_TARGET = "SYSTEM",
  CLUSTER_ID = "0,101",
  DATASTORE = "default",
  DATASTORE_ID = "1",
  DEV_PREFIX = "hd",
  DISK_ID = "16",
  DISK_SNAPSHOT_TOTAL_SIZE = "0",
  DISK_TYPE = "FILE",
  DRIVER = "raw",
  IMAGE = "Windows 2008 R2 LOCALSTORE",
  IMAGE_ID = "109",
  IMAGE_STATE = "2",
  IMAGE_UNAME = "oneadmin",
  LN_TARGET = "SYSTEM",
  ORDER = "1",
  ORIGINAL_SIZE = "3100",
  READONLY = "YES",
  SAVE = "NO",
  SIZE = "3100",
  SOURCE = "/var/lib/one//datastores/1/54127a6062804ba2da3365fe30a42a73",
  TARGET = "hdd",
  TM_MAD = "ssh",
  TYPE = "CDROM" ]
DISK = [
  ALLOW_ORPHANS = "NO",
  CLONE = "YES",
  CLONE_TARGET = "SYSTEM",
  CLUSTER_ID = "0,101",
  DATASTORE = "default",
  DATASTORE_ID = "1",
  DEV_PREFIX = "vd",
  DISK_ID = "17",
  DISK_SNAPSHOT_TOTAL_SIZE = "0",
  DISK_TYPE = "FILE",
  DRIVER = "qcow2",
  IMAGE = "IDE_QCOW2_LOCAL",
  IMAGE_ID = "106",
  IMAGE_STATE = "2",
  IMAGE_UNAME = "oneadmin",
  LN_TARGET = "SYSTEM",
  ORIGINAL_SIZE = "5120",
  READONLY = "NO",
  SAVE = "NO",
  SIZE = "5120",
  SOURCE = "/var/lib/one//datastores/1/45b478a9eff79e308140ff79e19704bc",
  TARGET = "vda",
  TM_MAD = "ssh",
  TYPE = "FILE" ]
DISK = [
  ALLOW_ORPHANS = "YES",
  CEPH_HOST = "15.16.113.140:6789",
  CEPH_SECRET = "f4309be0-5e23-4797-b4f6-842d124a2d72",
  CEPH_USER = "oneadmin",
  CLONE = "YES",
  CLONE_TARGET = "SELF",
  CLUSTER_ID = "0,101",
  DATASTORE = "ceph_images",
  DATASTORE_ID = "140",
  DEV_PREFIX = "vd",
  DISK_ID = "18",
  DISK_SNAPSHOT_TOTAL_SIZE = "0",
  DISK_TYPE = "RBD",
  DRIVER = "qcow2",
  IMAGE = "IDE_QCOW2_CEPH",
  IMAGE_ID = "108",
  IMAGE_STATE = "2",
  IMAGE_UNAME = "oneadmin",
  LN_TARGET = "NONE",
  ORIGINAL_SIZE = "10240",
  POOL_NAME = "rbd",
  READONLY = "NO",
  SAVE = "NO",
  SIZE = "10240",
  SOURCE = "rbd/one-108",
  TARGET = "vdb",
  TM_MAD = "ceph",
  TYPE = "RBD" ]
FEATURES = [
  ACPI = "yes",
  APIC = "yes",
  LOCALTIME = "yes" ]
GRAPHICS = [
  LISTEN = "0.0.0.0",
  PORT = "6034",
  TYPE = "VNC" ]
INPUT = [
  BUS = "usb",
  TYPE = "tablet" ]
MEMORY = "2048"
NIC = [
  AR_ID = "0",
  BRIDGE = "br0",
  CLUSTER_ID = "0,101",
  MAC = "02:00:c0:72:15:92",
  NETWORK = "client1",
  NETWORK_ID = "2",
  NETWORK_UNAME = "oneadmin",
  NIC_ID = "0",
  SECURITY_GROUPS = "",
  TARGET = "one-134-0",
  VN_MAD = "dummy" ]
OS = [
  ARCH = "x86_64",
  BOOT = "disk16,disk14,disk15",
  MACHINE = "pc" ]
TEMPLATE_ID = "26"
VCPU = "2"
VMID = "134"

Facilities
Front-end: OpenNebula 5.6.0
KVM_NODE: OpenNebula 5.6.0
Ceph: ceph version 13.2.1 (5533ecdc0fda920179d7ad84e0aa65a127b20d77) mimic (stable)


(Sergio) #2

Your issue might be located on this line:

Tue Sep 18 15:27:14 2018 [Z0][VMM][D]: Message received: LOG I 134 error: internal error: qemu unexpectedly closed the monitor: 2018-09-18T12:27:14.383146Z qemu-kvm: -drive file=rbd:rbd/one-108-134-18:id=oneadmin:key=AQCBjo9bW9h2MBAAkJ9SNFeJ87JnnomhK4ISEw==:auth_supported=cephx\;none:mon_host=15.16.113.140\:6789,format=qcow2,if=none,id=drive-virtio-disk1,cache=none: could not open disk image rbd:rbd/one-108-134-18:id=oneadmin:key=AQCBjo9bW9h2MBAAkJ9SNFeJ87JnnomhK4ISEw==:auth_supported=cephx\;none:mon_host=15.16.113.140\:6789: Image is not in qcow2 format

It looks like an it was expecting a qcow2 image but instead got a raw image. You should try to upload the image again, in raw format, and specify it is a raw image (although by default OpenNebula assumes the image in RAW format).