Bug 838057
Summary: | converted XML from XEN to KVM lacks cache='none' section, leading to errors when trying to live migrate | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Harald Klein <hklein> | |
Component: | virt-v2v | Assignee: | Matthew Booth <mbooth> | |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.3 | CC: | ddumas, dyasny, lnovich, mzhan, rjones, tzheng, yupzhang | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | virt-v2v-0.8.9-1.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
When creating a new libvirt guest, virt-v2v would not disable caching for disks as is recommended.
Consequence:
Guests created by a virt-v2v used caching for their disks, unless explicitly disabled by the user after conversion.
Fix:
virt-v2v now explicitly disables caching for all disks when creating a new libvirt guest.
Result:
Guests create by virt-v2v now have caching disabled for all disks. The user can enable it again if required after conversion.
|
Story Points: | --- | |
Clone Of: | ||||
: | 852654 (view as bug list) | Environment: | ||
Last Closed: | 2013-02-21 10:59:22 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 782183, 840699, 852654 |
Description
Harald Klein
2012-07-06 10:35:31 UTC
I can reproduce this issue with virt-v2v-0.8.7-6.el6.x86_64. virt-v2v convert all guests,whatever from xen or kvm,to kvm,the disk drive doesn't have cache='none'. <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/rhel6u1-64b-hv.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> When do migration,it will fail. # virsh migrate --live xen-hvm-rhel6.2-x86_64 qemu+ssh://10.66.7.56/system xen-hvm-rhel6.2-x86_64 error: Unsafe migration: Migration may lead to data corruption if disks use cache != none More test steps: 1.Xen guest xml,before conversion: <disk type='file' device='disk'> <driver name='file'/> <source file='/var/lib/xen/images/rhel6u1-64b-hv.img'/> <target dev='hda' bus='ide'/> </disk> 2.Xen guest,after conversion <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/rhel6u1-64b-hv.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> 3.KVM guest,before conversion: <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/kvm-rhel/kvm-rhel6.2-i386.img'/> <target dev='hda' bus='ide'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 4.KVM guest,after conversion: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/var/lib/libvirt/images/kvm-rhel6.2-i386.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> For xen guest,before conversion,the guest disk driver didn't have cache='none',I think it's reasonable that v2v doesn't add cache='none' to it.Added --safe when migrate the guest use virsh. For KVM guest,before conversion,the guest disk drive had cache='none',but after conversion,the guest doesn't have cache='none'. I think this should be a bug,the xml should keep the same. isk>
>
> For xen guest,before conversion,the guest disk driver didn't have
> cache='none',I think it's reasonable that v2v doesn't add cache='none' to
> it.Added --safe when migrate the guest use virsh.
Typo,it should be add --unsafe parameter,not --safe.
#virsh help migrate
--unsafe force migration even if it may be unsafe
This is fixed upstream in commit d907c8a260daa0be5347bccea404d8977edd830c Tested the bug with: virt-v2v-0.8.9-2.el6.x86_64 libguestfs-1.16.32-2.el6.x86_64 libvirt-0.10.2-5.el6.x86_64 1.Prepare a xen guest. # virsh dumpxml xen-hvm-rhel6.3-x86_64 <disk type='file' device='disk'> <driver name='file'/> <source file='/var/lib/xen/images/xen-hvm-rhel6.3-x86_64.img'/> <target dev='hda' bus='ide'/> </disk> 2.Use virt-v2v to convert the guest to libvirt. # virt-v2v -ic xen+ssh://10.66.72.23 -os default -b breth0 xen-hvm-rhel6.3-x86_64xen-hvm-rhel6.3-x86_64.img: 100% [=====================================================================]D 0h02m15s virt-v2v: WARNING: The connected hypervisor does not support feature pae. virt-v2v: xen-hvm-rhel6.3-x86_64 configured with virtio drivers. 3.After conversion,check the xml file of the guest,there is cache='none' added. # virsh dumpxml xen-hvm-rhel6.3-x86_64 <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/var/lib/libvirt/images/xen-hvm-rhel6.3-x86_64.img'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> So change the bug to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-0477.html |