Bug #4835

opennebula says the disk image is not in qcow2 format but it is.

Added by Gunwoo Gim almost 5 years ago. Updated about 4 years ago.

Status:PendingStart date:09/29/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Resolution:worksforme Pull request:
Affected Versions:OpenNebula 4.14

Description

OpenNebula says the disk image is not in qcow2 format but it is. it is in qcow2 format; I had made it by issuing a 'qemu-img convert' command

oneadmin@0-h0:~$ oned --version

Copyright 2002-2016, OpenNebula Project, OpenNebula Systems

OpenNebula 5.0.2 is distributed and licensed for use under the terms of the
Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0).

/var/log/one/oned.log :
(After trying 'onetemplate instantiate win-2k8-r2-contextualized --name win2k8r2-qcow2')

Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG I 60 Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy '/var/lib/one//datastores/101/60/deployment.0' '116.193.90.131' 60 116.193.90.131
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG I 60 error: Failed to create domain from /var/lib/one//datastores/101/60/deployment.0
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG I 60 error: internal error: process exited while connecting to monitor: 2016-09-29T14:45:40.173804Z qemu-system-x86_64: -drive file=/var/lib/one//datastores/101/60/disk.0,if=none,id=drive-virtio-disk0,format=qcow2,cache=none: could not open disk image /var/lib/one//datastores/101/60/disk.0: Image is not in qcow2 format
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG I 60
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG E 60 Could not create domain from /var/lib/one//datastores/101/60/deployment.0
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG I 60 ExitCode: 255
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: LOG I 60 Failed to execute virtualization driver operation: deploy.
Thu Sep 29 23:45:40 2016 [Z0][VMM][D]: Message received: DEPLOY FAILURE 60 Could not create domain from /var/lib/one//datastores/101/60/deployment.0

oneadmin@0-h0:~$ oneimage show win2k8r2-160926-qcow2

IMAGE 29 INFORMATION
ID : 29
NAME : win2k8r2-160926-qcow2
USER : oneadmin
GROUP : oneadmin
DATASTORE : ids0000000000
TYPE : OS
REGISTER TIME : 09/29 13:12:46
PERSISTENT : No
SOURCE : /var/lib/one//datastores/100/43f1b10c584a14eed95a22290b2bd757
PATH : /var/lib/one/safe/win2k8r2-20160927.qcow2
FSTYPE : qcow2
SIZE : 40G
STATE : rdy
RUNNING_VMS : 0

PERMISSIONS
OWNER : um-
GROUP : ---
OTHER : ---

IMAGE TEMPLATE
DESCRIPTION="Windows Server 2008 R2 20160926-qcow2"
DEV_PREFIX="hd"
DRIVER="qcow2"

VIRTUAL MACHINES

oneadmin@0-h0:~$ qemu-img info /var/lib/one/datastores/100/43f1b10c584a14eed95a22290b2bd757

image: /var/lib/one/datastores/100/43f1b10c584a14eed95a22290b2bd757
file format: qcow2
virtual size: 40G (42949672960 bytes)
disk size: 27G
cluster_size: 65536
Format specific information:
compat: 1.1
lazy refcounts: false

oneadmin@0-h0:~$ onetemplate show win-2k8-r2-contextualized

TEMPLATE 15 INFORMATION
ID : 15
NAME : win-2k8-r2-contextualized
USER : oneadmin
GROUP : oneadmin
REGISTER TIME : 07/15 17:36:03

PERMISSIONS
OWNER : um-
GROUP : ---
OTHER : ---

TEMPLATE CONTENTS
CONTEXT=[
FILES_DS="$FILE[IMAGE_ID=13]",
FORGODSAKE="\"nomnomnom\"",
HELLO_WORLD="$HELLO_WORLD",
NETWORK="YES",
REPORT_READY="YES",
SSH_PUBLIC_KEY="$USER[SSH_PUBLIC_KEY]",
START_SCRIPT="#!/bin/sh
echo 'ss' > /ss.txt
export TESTASAKE='thanks'
",
TOKEN="YES" ]
CPU="0.5"
CPU_COST="0.05"
DISK=[
CACHE="none",
DEV_PREFIX="vd",
DRIVER="qcow2",
IMAGE="win2k8r2-160926-qcow2",
IMAGE_UNAME="oneadmin",
SIZE="40960" ]
DISK_COST="0.00000005"
FEATURES=[
ACPI="yes",
PAE="yes" ]
GRAPHICS=[
LISTEN="0.0.0.0",
RANDOM_PASSWD="YES",
TYPE="VNC" ]
HYPERVISOR="kvm"
INPUT=[
BUS="usb",
TYPE="tablet" ]
LOGO="images/logos/windowsxp.png"
MEMORY="512"
MEMORY_COST="0.0000075"
NAME="win-2k8-r2-contextualized"
NIC=[
MODEL="virtio",
NETWORK="private_net-0-0-1",
NETWORK_UNAME="oneadmin",
SECURITY_GROUPS="0" ]
NIC_DEFAULT=[
MODEL="virtio" ]
OS=[
BOOT="disk0" ]
RAW=[
DATA="<clock offset='localtime'/>
<devices>
<controller type='usb' index='1' model='ehci' ports='8'/>
<controller type='usb' index='2' model='nec-xhci' ports='8'/>
</devices>
<clock offset='localtime'/>",
TYPE="kvm" ]
SCHED_DS_REQUIREMENTS="NAME=\"sds0000000000\""
USER_INPUTS=[
CPU="M|range-float||0.1..4.0|0.5",
HELLO_WORLD="M|list|for testing purposes|hi,hey,how are you,what'sup,how do you do,how's it going|hi",
MEMORY="M|range||512..8192|2048",
VCPU="M|range||1..4|1" ]

I believe there was another instance of this bug happened in the past: http://dev.opennebula.org/issues/4624

History

#1 Updated by Ruben S. Montero over 4 years ago

  • Resolution set to worksforme
  • Affected Versions OpenNebula 4.14 added

The error message is from libvirt/qemu, it has nothing to do with opennebula. Maybe you need to restart the VM? You may even try to create the VM manually with the generated deployment file (i.e. login in the node and execute virsh create deployment.0)

#2 Updated by Gunwoo Gim over 4 years ago

It seems like OpenNebula LVM datastore mounts images in raw format

oneadmin@0-h0:~$ onevm list
ID USER GROUP NAME STAT UCPU UMEM HOST TIME
52 oneadmin oneadmin win2k8r2-160926 poff 0.0 0K 116.193.90 20d 06h39
64 oneadmin oneadmin win2k8r2-qcow2 fail 0 0K 116.193.90 0d 04h47
oneadmin@0-h0:~$ su - root

root@0-h0:~# less /var/lib/one//datastores/101/64/deployment.0
<disk type='block' device='disk'>
<source dev='/var/lib/one//datastores/101/64/disk.0'/>
<target dev='vda'/>
<boot order='1'/>
<driver name='qemu' type='qcow2' cache='none'/>
</disk>

root@0-h0:~# ls -l /var/lib/one//datastores/101/64/disk.0
lrwxrwxrwx 1 oneadmin oneadmin 27 Oct 17 17:56 /var/lib/one//datastores/101/64/disk.0 -> /dev/vg-one-101/lv-one-64-0

root@0-h0:~# qemu-img info /dev/vg-one-101/lv-one-64-0
image: /dev/vg-one-101/lv-one-64-0
file format: raw
virtual size: 40G (42949672960 bytes)
disk size: 0

Best Wishes
From Korea

#3 Updated by Edouard Bourguignon over 4 years ago

Same bug here on OpenNebula 5.2. Add to convert the image to boot the VM again. This only happens on attached disks.

#4 Updated by Daejuan Jacobs about 4 years ago

This looks like it could be related #3705

I have the same issue on 5.2 regardless if the image is uploaded by me or from the marketplace to my ceph datastores.

Also available in: Atom PDF