Bug 961850

Summary: RFE: add -spice disable-agent-file-transfer cmdline option
Product: Red Hat Enterprise Linux 6 Reporter: Hans de Goede <hdegoede>
Component: qemu-kvmAssignee: Hans de Goede <hdegoede>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, bsarathy, chayang, dblechte, hdegoede, juzhang, lnovich, mazhang, michen, mkenneth, qzhang, virt-maint
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.380.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 06:56:18 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: 961848    
Bug Blocks: 983018    

Description Hans de Goede 2013-05-10 14:48:34 UTC
Once bug 961848 is resolved, spice-server will offer API to disable file transfer messages on the agent channel. Once the API is in place qemu will need to modified to use it and support a disable-agent-file-transfer option for its -spice options, so that qemu can be invoked as:
qemu -spice port=5900,disable-agent-file-transfer

Comment 1 Qunfang Zhang 2013-05-20 08:55:14 UTC
HI, Hans
Does that mean without "disable-agent-file-transfer" option, we could transfer file through spice vdagent? If yes, is there some doc for QE to take as a reference?

Comment 2 Hans de Goede 2013-05-20 09:02:23 UTC
Hi,

(In reply to Qunfang Zhang from comment #1)
> HI, Hans
> Does that mean without "disable-agent-file-transfer" option, we could
> transfer file through spice vdagent? If yes, is there some doc for QE to
> take as a reference?

Yes, but only with the latest spice-gtk and Linux spice-vdagent. Neither of which is currently in RHEL.

Once bug 951596 and bug 961452 are resolved, files can be transferred from the client to the guest by dragging them from a file manager into the client (ie nautilus) onto the client window, note that file-transfers in the other direction are not supported.

You can already use / test this by using a Fedora 18 (or later) client + guest.

Comment 3 Qunfang Zhang 2013-05-21 02:56:58 UTC
(In reply to Hans de Goede from comment #2)
> Hi,
> 
> (In reply to Qunfang Zhang from comment #1)
> > HI, Hans
> > Does that mean without "disable-agent-file-transfer" option, we could
> > transfer file through spice vdagent? If yes, is there some doc for QE to
> > take as a reference?
> 
> Yes, but only with the latest spice-gtk and Linux spice-vdagent. Neither of
> which is currently in RHEL.
> 
> Once bug 951596 and bug 961452 are resolved, files can be transferred from
> the client to the guest by dragging them from a file manager into the client
> (ie nautilus) onto the client window, note that file-transfers in the other
> direction are not supported.
> 
> You can already use / test this by using a Fedora 18 (or later) client +
> guest.

OK, and if the windows guest will be supported as well?

Comment 4 Hans de Goede 2013-05-21 06:46:40 UTC
(In reply to Qunfang Zhang from comment #3)
> OK, and if the windows guest will be supported as well?

Maybe, this is being tracked in bug 956146, not sure when that will be ready.

Comment 5 Hans de Goede 2013-06-06 15:11:40 UTC
Patch posted upstream: http://lists.nongnu.org/archive/html/qemu-devel/2013-06/msg00956.html

Comment 12 mazhang 2013-08-12 11:04:25 UTC
Try verify this bug.

host:
rhel6u5
qemu-kvm-0.12.1.2-2.386.el6.x86_64
kernel-2.6.32-409.el6.x86_64
spice-server-0.12.4-2.el6.x86_64

guest:
rhel6u5-64/win7-64
spice-vdagent-0.14.0-1.el6.x86_64/vdagent-win-3.3-1

client:
fc18
virt-viewer-0.5.4-3.fc18.x86_64

steps:
1 boot up guest with
/usr/libexec/qemu-kvm \
-M pc \
-cpu SandyBridge \
-m 4G \
-smp 4,sockets=2,cores=2,threads=1,maxcpus=16 \
-enable-kvm \
-name rhel6u5 \
-uuid 990ea161-6b67-47b2-b803-19fb01d30d12 \
-smbios type=1,manufacturer='Red Hat',product='RHEV Hypervisor',version=el6,serial=koTUXQrb,uuid=feebc8fd-f8b0-4e75-abc3-e63fcdb67170 \
-k en-us \
-rtc base=localtime,clock=host,driftfix=slew \
-nodefaults \
-monitor stdio \
-qmp tcp:0:6666,server,nowait \
-boot menu=on \
-bios /usr/share/seabios/bios.bin \
-monitor unix:/tmp/monitor-unix,nowait,server \
-vga qxl \
-spice port=5900,disable-ticketing \
-device virtio-serial-pci,id=virtio-serial1 \
-chardev spicevmc,id=charchannel0,name=vdagent \
-device virtserialport,bus=virtio-serial1.0,nr=3,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 \
-netdev tap,id=hostnet0,vhost=on \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:39:13:2c \
-drive file=/home/rhel6u5.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=threads \
-device virtio-blk-pci,scsi=off,bus=pci.0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \

2 drag a file "from a file manager into the client (ie nautilus) onto the client window", check the file md5sum

3 shutdown guest and boot up with "-spice port=5900,disable-ticketing,disable-agent-file-xfer"

4 try drag some file to guest.

Result:
after 2, file can be drag to guest, and the md5sum value same as on client. but cant drag file from guest to client(file-transfers in the other direction are not supported).
after 4, file cant be drag to guest.

Comment 13 Hans de Goede 2013-08-12 12:02:28 UTC
(In reply to mazhang from comment #12)

> after 2, file can be drag to guest, and the md5sum value same as on client.
> but cant drag file from guest to client(file-transfers in the other
> direction are not supported).

Note the file-transfers not working from guest to client is expected, the file-transfer code only works in one direction. In other words, this is not a bug.

> after 4, file cant be drag to guest.

As expected, so everything looks good to me.

Comment 15 errata-xmlrpc 2013-11-21 06:56:18 UTC
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/RHSA-2013-1553.html