Bug 90477 - Moving map-drive.bat to windows agent
Summary: Moving map-drive.bat to windows agent
Status: RESOLVED NOTOURBUG
Alias: None
Product: Spice
Classification: Unclassified
Component: win32 agent (show other bugs)
Version: unspecified
Hardware: Other All
: medium minor
Assignee: Lukas Venhoda
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-16 08:40 UTC by Victor Toso
Modified: 2016-06-30 12:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Victor Toso 2015-05-16 08:40:55 UTC
On windows guest it is necessary to run a script in order to mount the sharing folder [0]. Would be good to include this on windows agent to have it mount automatically. 

[0] https://elmarco.fedorapeople.org/manual.html#_folder_sharing
Comment 1 Christophe Fergeau 2015-05-16 09:00:04 UTC
[0] says "In a Windows guest, you must then install spice-webdavd service, and register the drive (by running map-drive.bat from Program Files/Spice webdav)."
Imo this script should ship with spice-webdavd, not with vdagent-win
Comment 2 Victor Toso 2015-07-13 08:18:19 UTC
(In reply to Christophe Fergeau from comment #1)
> [0] says "In a Windows guest, you must then install spice-webdavd service,
> and register the drive (by running map-drive.bat from Program Files/Spice
> webdav)."
> Imo this script should ship with spice-webdavd, not with vdagent-win

Indeed. I've tested last week with Lukas and it seems better to do on spice-webdavd. He is currently working on this.
Comment 3 Lukas Venhoda 2015-07-31 16:04:02 UTC
I managed to duplicate the script programatically in webdavd, but there are some issues.

Currently the biggest issue is that there is no way to disconnect the drive. This is because of mainly 2 reasons.
1. If we map the drive using the service, then user can't disconnect it manually
   This is most likely, because the service has SYSTEM privileges.
2. webdavd doesn't notice when we close the channel (turn of sharing)
   Because of this, we can't disconnect the drive in webdavd itself.
   This is most likely Windows issue.

Proposed fix is making it so that webdavd tries to find already connected drive on start, and if found, won't try to connect to it again.
On exit, webdavd will then disconnect the drive.

I propose that vd_agent could have aditional protocol for sending information whether sharing is enabled to the guest.
After enabling the sharing, vd_agent would start webdavd, which would map the drive.
After disabling sharing, vd_agent would stop the webdavd service, which would the unmap the drive.

This way the drive is always connected.
Comment 4 Pavel Grunt 2016-06-30 12:29:16 UTC
Automounting is done by phodav: https://git.gnome.org/browse/phodav/commit/?id=13151735cb97bc4e95deb72597c1024d139504e3


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.