Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 537655 - qemu-img: error creating a new preallocated volume image on FCP storage
qemu-img: error creating a new preallocated volume image on FCP storage
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4.z
All Linux
urgent Severity high
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
: Regression
: 540883 (view as bug list)
Depends On:
Blocks: 511072 550957
  Show dependency treegraph
 
Reported: 2009-11-15 09:03 EST by yeylon@redhat.com
Modified: 2016-04-18 02:27 EDT (History)
13 users (show)

See Also:
Fixed In Version: kvm-83-147.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-30 03:52:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0271 normal SHIPPED_LIVE Important: kvm security, bug fix and enhancement update 2010-03-29 09:19:48 EDT

  None (edit)
Description yeylon@redhat.com 2009-11-15 09:03:35 EST
Description of problem:

SPM node: ovirt - 5.5-2.1.98 
VDSM: vdsm-4.5-4

when creating a new pre-allocated virtual disk on FCP storage an error occurs on the VDSM level 

1621f383-fa7a-475a-8ae8-c8feb54e0c5c::WARNING::2009-11-15 14:09:06,033::misc::97::irs::FAILED: <err> = 'qemu-img: Error while formatting\n'; <rc> = 1
1621f383-fa7a-475a-8ae8-c8feb54e0c5c::DEBUG::2009-11-15 14:09:06,034::vg::95::irs::(vg) fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef: syncExecCmd obj 51760b89-3eff-4e83-8ec0-014726393630 cmd ['/usr/sbin/lv
s', '-o', 'attr', '--noheadings', 'fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630'] ex False try False


1621f383-fa7a-475a-8ae8-c8feb54e0c5c::ERROR::2009-11-15 14:09:06,307::task::312::irs::(runCmd): Exception in <bound method Secure.run of <storage.spm.Secure instance at 0x2b1ed20cfe18>> - Error cr ating a new volume: (["Formatting '/rhev/data-center/26592a60-9726-42b3-9372-fd141e3e746f/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/images/d58ad81f-5dcd-4d5d-91ca-4e2353fbe8d2/51760b89-3eff-4e83-8ec0-0 4726393630', fmt=raw, size=2097152 kB"],)


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create a new VM from blank (on FC SD)
2. attach for this VM a new virtual disk (IDE/pre-allocated)
3. see that the disk is not created in the GUI
4. check out VDSM log
  
Actual results:


Expected results:


Additional info:
Comment 2 Ayal Baron 2009-11-15 11:08:18 EST
There is a regression with qemu-img.
For some reason, formatting with raw format always fails:

[root@green-vdsa ~]# /usr/bin/qemu-img create -f raw /dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630 1G
Formatting '/dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630', fmt=raw, size=1048576 kB
qemu-img: Error while formatting


[root@green-vdsa ~]# /usr/bin/qemu-img create -f host_device /dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630 1G
Formatting '/dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630', fmt=host_device, size=1048576 kB
Comment 3 Dor Laor 2009-11-16 10:46:53 EST
What is the kvm version? Do you know when it worked?
Comment 4 Kevin Wolf 2009-11-16 10:56:43 EST
If it works with -f host_device, then it's a device and not a raw file. That it doesn't work any more with -f raw is a bug fix (errors during image creation were not always reported), not a regression. You need to correct your call.
Comment 22 Ayal Baron 2010-01-17 03:19:21 EST
I may be missing something but I think this doesn't work

[root@dhcp-X reg]# rpm -qa kvm
kvm-83-147.el5
[root@dhcp-X reg]# lvcreate -n test system --size 1g
  Logical volume "test" created
[root@dhcp-X reg]# qemu-img create -f raw /dev/system/test 500M
Formatting '/dev/system/test', fmt=raw, size=512000 kB
qemu-img: Error while formatting
Comment 23 Ayal Baron 2010-01-17 03:31:49 EST
(In reply to comment #22)
> I may be missing something but I think this doesn't work
> 
> [root@dhcp-X reg]# rpm -qa kvm
> kvm-83-147.el5
> [root@dhcp-X reg]# lvcreate -n test system --size 1g
>   Logical volume "test" created
> [root@dhcp-X reg]# qemu-img create -f raw /dev/system/test 500M
> Formatting '/dev/system/test', fmt=raw, size=512000 kB
> qemu-img: Error while formatting    

I was indeed missing something (didn't update kvm-qemu-img).  Seems to work now.
Comment 24 Kevin Wolf 2010-01-20 08:26:27 EST
*** Bug 540883 has been marked as a duplicate of this bug. ***
Comment 27 errata-xmlrpc 2010-03-30 03:52:40 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0271.html

Note You need to log in before you can comment on or make changes to this bug.