Bug 975834 - [RFE] Foreign Menu Using REST
[RFE] Foreign Menu Using REST
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer (Show other bugs)
6.6
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Christophe Fergeau
Virtualization Bugs
Laura Novich
: FutureFeature
Depends On: 981678
Blocks: 975835 1200067
  Show dependency treegraph
 
Reported: 2013-06-19 08:32 EDT by Tomas Jelinek
Modified: 2016-01-26 20:56 EST (History)
13 users (show)

See Also:
Fixed In Version: virt-viewer-2.0-2.el6
Doc Type: Enhancement
Doc Text:
Hot-swappable CD images Using the remote-viewer tool to connect to an ovirt:// URI now displays a menu that allows the user to change the CD image inserted in the virtual machine (VM). This makes it possible to change the inserted CD while the VM is running without the need to use Red Hat Enterprise Virtualization or the oVirt portal.
Story Points: ---
Clone Of:
: 975835 1127156 (view as bug list)
Environment:
Last Closed: 2015-07-22 02:30:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Jelinek 2013-06-19 08:32:29 EDT
Create a client for the oVirt's REST API for requesting foreign menu (similar to dynamicMenu but using REST API).

For more information about the specific details please see the oVirt's feature page:
http://www.ovirt.org/Features/Foreign_Menu_Using_REST
Comment 2 Tomas Jelinek 2013-06-27 08:13:36 EDT
The nature of this RFE has been changed - originally the client should have parsed a menu provided by oVirt REST. This is not true anymore. The new description is:
Client should be able to get the list of available CD images and also perform the change CD using the oVirt REST. oVirt will provide the sessionId to authenticate with the REST and the vmGuid in the .vv file.
Comment 3 Christophe Fergeau 2014-03-12 11:47:13 EDT
This bug would be mine as I've done most of this work upstream. However, since this needs 2 new packages in RHEL6, maybe it's better to only have that in RHEL7 where these packages are already present.
Comment 4 Marc-Andre Lureau 2014-06-04 10:15:30 EDT
still not in upstream, missing deps, unlikely for 6.6..
Comment 5 Christophe Fergeau 2014-12-12 08:20:17 EST
Support is upstream and in RHEL7 now.
Comment 7 tingting zheng 2015-02-26 00:32:47 EST
Tested with:
libgovirt-0.3.2-1.el6.x86_64
virt-viewer-2.0-2.el6.x86_64
rhevm:3.5.0-0.32.el6ev

Steps:
1. Prepare a guset on rhevm, and a ISO domain to rhevm, add more than one cd images in the domain, and add user "admin" to virtual machine permissions

2. on client:
# wget http://rhevm.example.com/ca.crt
# remote-viewer --ovirt-ca-file=ca.crt ovirt://rhevm.example.com/$vm

3. Input right username and password to connect the guest

4.After the guest console is open, check the menu bar of virt-viewer, there are 5 menus:"File", "View", "Send key", "Help", "Change CD".

5.Test "Change CD" menu:
5.1.Click the same image:first click 'rhev-tools-setup.iso' to make the iso mounted in guest,then click the same image to remove it,the iso is still mounted in guest,debug info shows as:

(remote-viewer:12742): remote-viewer-DEBUG: 'rhev-tools-setup.iso' clicked
(remote-viewer:12742): remote-viewer-DEBUG: Updating VM cdrom image to 'rhev-tools-setup.iso'
(remote-viewer:12742): remote-viewer-DEBUG: Finished updating cdrom content
(remote-viewer:12742): remote-viewer-DEBUG: Spice foreign menu updated
(remote-viewer:12742): remote-viewer-DEBUG: Creating GtkMenu for foreign menu
(remote-viewer:12742): remote-viewer-DEBUG: Refreshing foreign menu iso list
(remote-viewer:12742): remote-viewer-DEBUG: 'rhev-tools-setup.iso' clicked
(remote-viewer:12742): remote-viewer-DEBUG: Removing current cdrom image
(remote-viewer:12742): remote-viewer-DEBUG: Finished updating cdrom content
(remote-viewer:12742): remote-viewer-DEBUG: Spice foreign menu updated
(remote-viewer:12742): remote-viewer-DEBUG: Creating GtkMenu for foreign menu

In guest,After second click 'rhev-tools-setup.iso',iso is still mounted.
# mount
/dev/sr0 on /run/media/root/Tools-3.2-17 type iso9660 (ro,nosuid,nodev,relatime,uid=0,gid=0,iocharset=utf8,mode=0400,dmode=0500,uhelper=udisks2)

If I umount the iso manualy then it can not be mounted.
# umount /dev/sr0
# mount /dev/sr0 /mnt
mount: no medium found on /dev/sr0


5.2 Click another image:first click 'rhev-tools-setup.iso' to make the iso mounted in guest,then click another image 'virtio-win.iso'.After a while,'rhev-tools-setup.iso' is still clicked and can be mounted,"Bad Request" warning shows in debug:

(remote-viewer:12985): remote-viewer-DEBUG: 'rhev-tools-setup.iso' clicked
(remote-viewer:12985): remote-viewer-DEBUG: Updating VM cdrom image to 'rhev-tools-setup.iso'
(remote-viewer:12985): remote-viewer-DEBUG: Finished updating cdrom content
(remote-viewer:12985): remote-viewer-DEBUG: Spice foreign menu updated
(remote-viewer:12985): remote-viewer-DEBUG: Creating GtkMenu for foreign menu
(remote-viewer:12985): remote-viewer-DEBUG: Refreshing foreign menu iso list
(remote-viewer:12985): remote-viewer-DEBUG: 'virtio-win.iso' clicked
(remote-viewer:12985): remote-viewer-DEBUG: Updating VM cdrom image to 'virtio-win.iso'
(remote-viewer:12985): remote-viewer-DEBUG: Finished updating cdrom content

(remote-viewer:12985): remote-viewer-WARNING **: failed to update cdrom resource: Bad Request

5.3,After 5.2,if I click 'virtio-win.iso' again,then the iso can be mounted without warning info in debug.

Would you pls help to check the above results in 5.1 and 5.2,is it by design?thanks.
Comment 8 Christophe Fergeau 2015-02-26 05:28:32 EST
In general, clicking on an already mounted CD should remove it from the VM (ie image unchecked, no more mounted in VM). Clicking on a different CD image should change the currently mounted CD (assuming you are using a desktop environment doing automount). However, with some images, I sometimes need to unmount them manually before being able to use the foreign menu (from GNOME, I right click on the CDRom and pick 'eject'). Maybe that's what you are seeing.
This mounting/unmounting is all handled by RHEV though, the foreign menu code is just asking it to mount/unmount, so if this part is not working as expected, I think this is more a RHEV bug than a virt-viewer/libgovirt one (unless we are not using the RHEV API correctly).
Comment 9 tingting zheng 2015-02-26 05:50:21 EST
(In reply to Christophe Fergeau from comment #8)
> In general, clicking on an already mounted CD should remove it from the VM
> (ie image unchecked, no more mounted in VM). Clicking on a different CD
> image should change the currently mounted CD (assuming you are using a
> desktop environment doing automount). However, with some images, I sometimes
> need to unmount them manually before being able to use the foreign menu
> (from GNOME, I right click on the CDRom and pick 'eject'). Maybe that's what
> you are seeing.
> This mounting/unmounting is all handled by RHEV though, the foreign menu
> code is just asking it to mount/unmount, so if this part is not working as
> expected, I think this is more a RHEV bug than a virt-viewer/libgovirt one
> (unless we are not using the RHEV API correctly).

Refer to the above comments,the asking mount/unmount action has been executed by virt-viewer GUI,so the bug has been fixed and I will move it to VERIFIED.For the RHEV issue,I will test more and file a new bug if needed.
Comment 14 errata-xmlrpc 2015-07-22 02:30:12 EDT
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.

https://rhn.redhat.com/errata/RHBA-2015-1322.html

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