Bug 1425002

Summary: Failed to change iso file in scsi cdrom
Product: Red Hat Enterprise Linux 7 Reporter: Xujun Ma <xuma>
Component: qemu-kvm-rhevAssignee: Eric Blake <eblake>
Status: CLOSED DUPLICATE QA Contact: CongLi <coli>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: aliang, chayang, coli, eblake, juzhang, knoel, michen, qzhang, virt-maint, xuma, xuwei
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-12 18:19:15 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: 1406973    
Attachments:
Description Flags
guest xml none

Description Xujun Ma 2017-02-20 10:46:38 UTC
Description of problem:
Failed to change iso file in scsi cdrom.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.6.0-28.el7_3.6.ppc64le

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with commond
/usr/libexec/qemu-kvm \
 -name test \
 -smp 4 \
 -m 2048 \
 -M pseries \
 -rtc base=utc,clock=vm \
 -vnc :20 \
 -qmp tcp:0:4444,server,nowait \
 -nodefaults \
 -usb \
 -vga std \
 -device virtio-scsi-pci,bus=pci.0 \
 -monitor stdio \
 -device scsi-hd,id=scsi-hd0,drive=scsi-hd0-dr0,bootindex=0 \
 -drive file=RHEL-7.3-20161019.0-ppc64le.qcow2,if=none,id=scsi-hd0-dr0,format=qcow2,cache=none \
 -drive id=drive_none,if=none,snapshot=off,aio=native,cache=none,media=cdrom \
 -device scsi-cd,id=none,drive=drive_none \
 -device virtio-net-pci,netdev=net0,id=nic0,mac=52:54:00:c4:e7:84 \
 -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on  -device virtio-serial,id=virtio-serial0 \

2.change iso file in hmp
(qemu) change drive_none ks.iso 
3.

Actual results:
it displays error in step 2 as following
aio=native was specified, but it requires cache.direct=on, which was not specified.


Expected results:
Change iso file smoothly without any error.

Additional info:

the same issue on x86 platform.

Comment 2 Ademar Reis 2017-02-20 13:38:40 UTC
(In reply to Xujun Ma from comment #0)
> Description of problem:
> Failed to change iso file in scsi cdrom.
> 
...
> 2.change iso file in hmp
> (qemu) change drive_none ks.iso 

...

> Actual results:
> it displays error in step 2 as following
> aio=native was specified, but it requires cache.direct=on, which was not
> specified.
> 

I wonder if this can be reproduced over libvirt? If it's not, we can close this as WONTFIX.

Comment 3 Xujun Ma 2017-02-21 07:28:00 UTC
(In reply to Ademar Reis from comment #2)
> (In reply to Xujun Ma from comment #0)
> > Description of problem:
> > Failed to change iso file in scsi cdrom.
> > 
> ...
> > 2.change iso file in hmp
> > (qemu) change drive_none ks.iso 
> 
> ...
> 
> > Actual results:
> > it displays error in step 2 as following
> > aio=native was specified, but it requires cache.direct=on, which was not
> > specified.
> > 
> 
> I wonder if this can be reproduced over libvirt? If it's not, we can close
> this as WONTFIX.

It can be reproduced with libvirt,and will displays error as following:
virsh # change-media Server-base sdc /home/kvm_autotest_root/iso/linux/RHEL7.2-Server-x86_64.iso
error: Failed to complete action update on media
error: internal error: unable to execute QEMU command 'change': aio=native was specified, but it requires cache.direct=on, which was not specified.

the configuration of cdrom in xml:

    <disk type='file' device='cdrom'>
      <driver name='qemu' type="aio"  io='native' cache="none"/>
      <target dev='sdc' bus='scsi'/>
      <readonly/>
    </disk>

Comment 6 Eric Blake 2017-03-31 20:37:18 UTC
(In reply to Xujun Ma from comment #3)

> It can be reproduced with libvirt,and will displays error as following:
> virsh # change-media Server-base sdc
> /home/kvm_autotest_root/iso/linux/RHEL7.2-Server-x86_64.iso
> error: Failed to complete action update on media
> error: internal error: unable to execute QEMU command 'change': aio=native
> was specified, but it requires cache.direct=on, which was not specified.
> 
> the configuration of cdrom in xml:
> 
>     <disk type='file' device='cdrom'>
>       <driver name='qemu' type="aio"  io='native' cache="none"/>
>       <target dev='sdc' bus='scsi'/>
>       <readonly/>
>     </disk>

Can you post the entire domain xml?

Comment 7 Eric Blake 2017-03-31 20:57:53 UTC
(In reply to Xujun Ma from comment #0)
> Description of problem:
> Failed to change iso file in scsi cdrom.
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-rhev-2.6.0-28.el7_3.6.ppc64le

Is the problem specific to powerpc, or can it be reproduced on x86_64?

> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.Boot guest with commond
> /usr/libexec/qemu-kvm \

>  -drive id=drive_none,if=none,snapshot=off,aio=native,cache=none,media=cdrom
> \
>  -device scsi-cd,id=none,drive=drive_none \

These two lines appear to be the most relevant; trying a stripped down command line against upstream qemu 2.9-rc2, I'm getting:

$ ./ppc-softmmu/qemu-system-ppc  -name test  -m 2048  -qmp tcp:0:4444,server,nowait  -nodefaults  -device virtio-scsi-pci,bus=pci.0  -monitor stdio  -drive id=drive_none,if=none,snapshot=off,aio=native,cache=none,media=cdrom  -device scsi-cd,id=none,drive=drive_none  -device virtio-serial,id=virtio-serial0 qemu-system-ppc: -drive id=drive_none,if=none,snapshot=off,aio=native,cache=none,media=cdrom: Must specify either driver or file

so I'm not yet sure how to even start up a guest with an empty cdrom in a way that upstream qemu likes, since I'm failing even before getting a chance to try the hmp command.

Is there a powerpc box running rhel 7 that I can easily log on to, to see if I can reproduce there faster than it takes me to set up one locally?

Comment 8 Karen Noel 2017-03-31 21:56:05 UTC
(In reply to Eric Blake from comment #7)
> (In reply to Xujun Ma from comment #0)
> > Description of problem:
> > Failed to change iso file in scsi cdrom.
> > 
> > Version-Release number of selected component (if applicable):
> > qemu-kvm-rhev-2.6.0-28.el7_3.6.ppc64le
> 
> Is the problem specific to powerpc, or can it be reproduced on x86_64?
> 

The problem description says x86 as well:

> Additional info:
>
> the same issue on x86 platform.

Comment 10 Xujun Ma 2017-04-05 07:52:32 UTC
Created attachment 1268878 [details]
guest xml

Comment 12 Eric Blake 2017-05-11 18:53:01 UTC
May be a duplicate of bug 1402645 (I'm still investigating)

Comment 13 Eric Blake 2017-05-12 18:19:15 UTC

*** This bug has been marked as a duplicate of bug 1402645 ***