Reading files in virtual machine shared folders/network drives

47 views
Skip to first unread message

Michael Sarahan

unread,
Sep 15, 2011, 7:02:31 AM9/15/11
to hypersp...@googlegroups.com
Hi guys,

This is a heads-up about a possible hang-up users might experience. A
user (Melanie Rohm) had a Ubuntu 10.04 virtual machine (using
VirtualBox). She had used the system python and all the system
packages. Upon trying to load a DM3 file, she got a traceback, with
the last offending line being:

fmap=mmap.mmap(dm3file.fileno(), 0, acess=mmap.ACCESS_READ)

and the error being:
[Errno 22] Invalid argument

When the user copied the file locally into the VM, instead of trying
to access from the shared folder, it works.

This is most certainly just a case of mmap not playing nice with the
VM shared folder stuff. I'm not sure whether mmap would play nice
with network shared folders.

We should emphasize that users should put data onto their local
computers before trying to load it into hyperspy. Of course, this is
good practice for speed, but people might naively try to use network
drives.

-Mike

Stefano

unread,
Sep 15, 2011, 8:31:55 AM9/15/11
to hypersp...@googlegroups.com

Mike,

I am pretty sure that the problem is what you said and I support your
suggestion. Can you suggest to the user to try and load any file (e.g. a text
file) with mmap alone just to be sure? I have attached an example (taken from
the Python documentation) that can be run either from the Python IDE or from
terminal.

If that's the case, it might be worth submitting (or looking for) a bug to
VirtualBox.

I presume that the user has Ubuntu as host computer and MS Windows as guest
(virtual) computer.

Also, I would encourage the users to subscribe to the users mailing list and
submit their questions themselves there... and there is also the git bugtracker,
right?

Thanks,

--
Stefano

Fortune of the day: "You have an unusual equipment for success. Be sure to use
it properly."

mmap_test.py

Michael Sarahan

unread,
Sep 16, 2011, 7:06:58 AM9/16/11
to hypersp...@googlegroups.com
Yes, your example file works fine. DM3 files work fine after you copy
them into the virtual machine locally, rather than using them from the
shared folder. I will report this to VirtualBox.

In particular case, it is a Windows host, and a Ubuntu guest.

Stefano

unread,
Sep 16, 2011, 9:35:11 AM9/16/11
to hypersp...@googlegroups.com
On Fri, Sep 16, 2011 at 7:06 AM, Michael Sarahan <msar...@superstem.org> wrote:
> Yes, your example file works fine.  DM3 files work fine after you copy
> them into the virtual machine locally, rather than using them from the
> shared folder.  I will report this to VirtualBox.

OK, I can also report that I can load DM3 files in a Linux environment
(NOT virtualized) from network folders without copying them locally.

> In particular case, it is a Windows host, and a Ubuntu guest.

Mmm... I have heard that VirtualBox is a bit unstable in Windows
hosts, that was some time ago though.

Best,

--
Stefano

Reply all
Reply to author
Forward
0 new messages