Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Monitor VirtualBox shared folder #2

Elufimov opened this Issue · 4 comments

2 participants

Michael Elufimov Maher Sallam
Michael Elufimov

In a host I have disk D:\, I need to watch that disk from the virtual machine. I create a shared folder d_d associated with the logical host disk D:\
Alt text
Then I plug in the guest folder \vboxsvr\d_d as a network drive z:\
Alt text
And try to monitor it

C:\Users\Test\Desktop>ruby monitor.rb
[DEBUG] (../../../../ext/wdm/wdm.c@35): Registering WDM with Ruby!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@507): Registering WDM::Monitor with Ruby!
[DEBUG] (../../../../ext/wdm/rb_change.c@181): Registering WDM::Event with Ruby!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@102): --------------------------------
[DEBUG] (../../../../ext/wdm/rb_monitor.c@103): Allocating a new monitor object!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@104): --------------------------------
[DEBUG] (../../../../ext/wdm/rb_monitor.c@193): New path to watch: 'Z:\'
[DEBUG] (../../../../ext/wdm/rb_monitor.c@234): Watching directory: 'Z:\\'
Running the monitor...
[DEBUG] (../../../../ext/wdm/rb_monitor.c@434): Running the monitor!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@327): Starting the monitoring thread!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@315): Failed registering directory: 'Z'!

After displaying in the console Failed registering directory: 'Z'! wdm not respond on change in disk D:\

Maher Sallam

Thanks for opening a new issue. What operating system are you trying to run inside the VM?

Michael Elufimov

Host and guest is Windows 7 x64

Maher Sallam

Ok, I'll look into it. Just bear in mind that WDM isn't meant to be used to monitor virtual machines because they don't fire events. We are currently working on a new feature in Listen to handle this in a better way.

Maher Sallam

After debugging this, it appears to me that the Win32 function used in WDM to monitor changes does not support vboxsvr folders. That docs for that function says (I highlighted the important part):

If the network redirector or the target file system does not support this operation, the function fails with ERROR_INVALID_FUNCTION.

As I said in my previous comment, it's better to wait for Listen to implement a mechanism to handle this kind of situations.

Maher Sallam Maher4Ever closed this issue from a commit
Maher Sallam Inform the user about unwatchable directories
WDM will raise an exception when it's passed an unwatchable directory.

Closes #2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.