RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 624714 - Virt-install to a qcow2 disk gets error at end of kickstart
Summary: Virt-install to a qcow2 disk gets error at end of kickstart
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst
Version: 6.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Cole Robinson
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-17 14:42 UTC by David Knierim
Modified: 2011-05-19 13:45 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previous versions of virt-install checked the first bytes of the disk image's master boot to ensure the disk image was valid. However, this check only worked with raw disk. This update skips the check on non-raw disks.
Clone Of:
Environment:
Last Closed: 2011-05-19 13:45:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
XML file for domain in question (1.41 KB, text/xml)
2010-08-17 17:21 UTC, David Knierim
no flags Details
List of package versions for for host (248 bytes, application/octet-stream)
2010-08-17 17:24 UTC, David Knierim
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0636 0 normal SHIPPED_LIVE python-virtinst bug fix and enhancement update 2011-05-18 17:55:48 UTC

Description David Knierim 2010-08-17 14:42:42 UTC
Description of problem:
Installing RHEL 5.5 to a KVM guest using virt-install.   If the target disk for the guest is a qcow2 disk, an error is generated when rebooting after successfully completing the kickstart:
rebooting system
md: stopping all md devices.
Restarting system.
.
machine restart

Domain installation does not appear to have been
 successful.  If it was, you can restart your domain
 by running 'virsh start dave-b'; otherwise, please
 restart your installation.

The same install on the same host but with a raw disk or LVM LV for the disk does NOT fail.

Here is a sample of the virt-install that I executed:
# virt-install --accelerate --hvm --connect qemu:///system --network=bridge:installation --cdrom=/images/rhel-server-5.5-i386-dvd.iso --name dave-b --ram=4096 --vcpus=4 --mac=54:52:00:00:03:02 --os-type=linux --os-variant=rhel5 --nographics --disk /var/lib/libvirt/images/dave-b.qcow2,size=20,format=qcow2

Version-Release number of selected component (if applicable):
RHEL 6 beta2 refresh

How reproducible:
100% reproducible.

Steps to Reproduce:
1.  Use virt-install to kickstart install RHEL 5.5 to a guest using a qcow2 disk
2.  After kickstart completes, witness error message when guest reboots.
3.
  
Actual results:
Error shown above occurs.   Guest ends in a "shut off" state.
After manually starting guest, the guest boots and runs normally with no issues.

Expected results:
Guest should reboot with no errors.

Additional info:

Comment 2 Daniel Veillard 2010-08-17 14:57:07 UTC
Can you provide the XML which was generated for the guest ?
virsh dumpxml dave-b

 thanks,

Daniel

Comment 3 Daniel Veillard 2010-08-17 14:58:06 UTC
as well as installed versions for libvirt and python-virtinst, please

Daniel

Comment 4 RHEL Program Management 2010-08-17 14:58:24 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 5 David Knierim 2010-08-17 17:21:48 UTC
Created attachment 439171 [details]
XML file for domain in question

Comment 6 David Knierim 2010-08-17 17:24:04 UTC
Created attachment 439172 [details]
List of package versions for for host

Comment 7 Daniel Berrangé 2010-08-17 17:29:51 UTC
Actually the XML was a red-herring. The problem is easy

> Error shown above occurs.   Guest ends in a "shut off" state.
> After manually starting guest, the guest boots and runs normally with no
> issues.

This shows that installation was successfull. 

> Domain installation does not appear to have been
>  successful.  If it was, you can restart your domain
>  by running 'virsh start dave-b'; otherwise, please
>  restart your installation.

This message is the result of a hueristic that virt-install does. It checks the first bytes of the disk image to see if they are 0xaa55  which is what the DOS MBR has as a signature. This is great with a raw disk. Not so great with a qcow2 disk, because virt-install will read the qcow2 magic instead of the actual guest data !

Virt-install's post_install_check() needs to skip this check on non-raw disks.

Comment 8 RHEL Program Management 2010-08-18 21:29:30 UTC
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Red Hat Enterprise Linux. Unfortunately, we
are unable to address this request in the current release. Because we
are in the final stage of Red Hat Enterprise Linux 6 development, only
significant, release-blocking issues involving serious regressions and
data corruption can be considered.

If you believe this issue meets the release blocking criteria as
defined and communicated to you by your Red Hat Support representative,
please ask your representative to file this issue as a blocker for the
current release. Otherwise, ask that it be evaluated for inclusion in
the next minor release of Red Hat Enterprise Linux.

Comment 9 Cole Robinson 2010-08-23 20:39:43 UTC
Should be fixed now upstream:

http://hg.fedorahosted.org/hg/python-virtinst/rev/312e23391971

Comment 10 Cole Robinson 2011-01-14 22:10:48 UTC
Fix built in python-virtinst-0.500.5-1.el6

Comment 12 koka xiong 2011-01-21 07:35:38 UTC
Verified with python-virtinst-0.500.5-1.el6 and libvirt-0.8.7-1.el6.x86_64
1.Run virt-install --accelerate --hvm --connect qemu:///system
 --cdrom=/dev/cdrom --name dave --ram=4096 --vcpus=1 -os-type=linux
--os-variant=rhel5  --disk
/var/lib/libvirt/images/dave-b.qcow2,size=20,format=qcow2
2.After the completion of the installation of the guest,the guest can be started up.
So when the guest image is qcow2 format,the installation is correct.

Verification is passed.

Comment 13 zhe peng 2011-04-19 06:06:57 UTC
verified this bug with:
Linux localhost.localdomain 2.6.32-130.el6.x86_64 #1 SMP Tue Apr 5 19:58:31 EDT
2011 x86_64 x86_64 x86_64 GNU/Linux

python-virtinst-0.500.5-3.el6.noarch
libvirt-0.8.7-17.el6.x86_64

passed.

Comment 15 Michael Hideo 2011-05-16 02:44:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
* Previous versions of virt-install checked the first bytes of the disk image's master boot to ensure the disk image was valid. However, this check only worked with raw disk. This update skips the check on non-raw disks. (BZ#624714)

Comment 16 Michael Hideo 2011-05-16 21:42:38 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-* Previous versions of virt-install checked the first bytes of the disk image's master boot to ensure the disk image was valid. However, this check only worked with raw disk. This update skips the check on non-raw disks. (BZ#624714)+Previous versions of virt-install checked the first bytes of the disk image's master boot to ensure the disk image was valid. However, this check only worked with raw disk. This update skips the check on non-raw disks.

Comment 17 errata-xmlrpc 2011-05-19 13:45:53 UTC
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/RHBA-2011-0636.html


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