LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-12-2008, 04:39 PM   #1
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Rep: Reputation: 15
Unhappy vmware server 2.0 - remote usb error


I upgraded vmware server from 1.0.7 to 2.0 and I have problems with the usb devices.

I am running Centos 5.2 x86_64 as host and I have a Windows XP Pro virtual machine as guest, which was created in vmware server 1.0.4. The upgrade went fine so far, but I am not able to access the usb devices in the guest except if I am logged in as root in the host.

Here is my /etc/fstab:

Code:
/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
sysfs                   /sys                    sysfs   defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/fd0                /media/floppy           auto    rw,exec,noauto,user,sync, 0 0
usbfs                   /proc/bus/usb           usbfs                       0  0
none                   /proc/bus/usb             usbfs   devgid=500,devmode=664      0    0
I have added the last two lines but even with them the error is still there: "remote usb device error: remote device disconnected: an error occured while sending data".

Of course I can launch the browser as root and run vmware, but if there is another solution I would prefer it.

Thanks in advance.
 
Old 10-15-2008, 02:18 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,393
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by dralexpe View Post
I am running Centos (..) but I am not able to access the usb devices in the guest except if I am logged in as root in the host.
Maybe check device access rights configuration in /etc/security?
 
Old 10-15-2008, 08:47 PM   #3
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I looked through the /etc/security but I have not been able to find anything related to usb devices access rights.

Thank you.
 
Old 10-17-2008, 02:35 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,393
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Should be in /etc/security/console.perms or /etc/security/console.perms.d/*. If none, please post relevant loglines from both VMware daemon process and VMware client.
 
Old 10-18-2008, 02:57 PM   #5
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I looked in /etc/security/console.perms and in the folder /etc/security/console.perms.d but I could not find any references to usb.

Now I am assuming that the log file for the vmware daemon is in /var/log/vmware/hostd-8.log which I have uploaded at dralexpe.rockin.net/hostd-8.log because it's too long to post here. Then the client log file I am assuming is in /var/lib/vmware/Virtual Machines/Windows XP Professional/vmware.log (Windows XP Professional is the name of my virtual machine) which I have uploaded at dralexpe.rockin.net/vmware.log because again it's too long.


Thank you for your time.
 
Old 10-21-2008, 03:02 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,393
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
There's some things going on in the logs, but AFAIK the guest log shows it recognises USB (as evidenced by the Memorex entry) OK I think. If you say in your OP "logged in as root", devices get chowned to the user logging into the console, still an access rights issue AFAIK. Problem is I don't run GSX and I haven't been able to reproduce this with VMware-server-1.0.7-108231. If you can't fix perms (and I do wonder which devices need chowning) and the VMware fora don't show workarounds or fixes, then maybe roll back to 1.0.7 for the time being?..
 
Old 10-24-2008, 07:54 PM   #7
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I tried to chown /var/lib/vmware/Virtual Machines/... from root to a regular user, but I still cannot get the USB drive to be seen. I am running the free Vmware server 2.0, not GSX and this issue was not present in 1.0.7.

I posted this question in the vmware forums without success.

Thank you for your time.
 
Old 10-26-2008, 07:08 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,393
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by dralexpe View Post
I tried to chown /var/lib/vmware/Virtual Machines/... from root to a regular user, but I still cannot get the USB drive to be seen. I am running the free Vmware server 2.0, not GSX and this issue was not present in 1.0.7.
VMware relies on the host system to offer access to devices, so that'll be those in /dev. Whatever you got in /var/lib/vmware/Virtual Machines/... will be configs and virtual disks and stuff, not devices. When I want to allow a mcrsft host access to the hosts USB devices I have to explicitly go through the menu to enable the device so the guest "sees" it. Can you do that or doesn't that work or does it throw an error? Did downgrading to 1.0.7 work?
 
Old 10-27-2008, 09:37 PM   #9
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Original Poster
Rep: Reputation: 15
When I boot the guest OS, at the top of the console I select "Devices". When I plug an USB stick it appears disconnected; if I select "Connect" and I haven't started the browser in which I am running VMware as root, then after a while I get the error message: "Remote USB device error: Remote device disconnected: an error occured while sending data". I am not sure what menu you refer to, I am guessing is the one at the top of the VMware console which shows "Devices" on it.

I haven't downgraded to VMware 1.0.7 yet. I saw that I can login the host as a regular user, then if I start a console and su - as root and start the browser from there it works. I am willing to accept this inconvenience as long as it's relatively safe.

When I attach the USB stick to the host it is mounted as /dev/scd1 (so if I understand correctly this is as SCSI) into the mount point /media/TravelDrive. I looked into /dev and I see there are some character devices of the form usbdev(1.1 or 2.1 or 3.1 or 4.1)_ep(00 or 81) which are owned by root and can be rw only by root.

I have also removed the last two lines in the /etc/fstab shown in my first post because they were not helping at all.

Thank you very much for your time.
 
Old 10-28-2008, 05:39 PM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,393
Blog Entries: 55

Rep: Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565Reputation: 3565
Quote:
Originally Posted by dralexpe View Post
When I boot the guest OS (..) , then after a while I get the error message: "Remote USB device error: Remote device disconnected: an error occured while sending data".
Unfortunately I'm not able to produce those results but then again I'm not running x86_64 nor VMware server 2.0...


Quote:
Originally Posted by dralexpe View Post
I saw that I can login the host as a regular user, then if I start a console and su - as root and start the browser from there it works. I am willing to accept this inconvenience as long as it's relatively safe.
Could set it up running 'vmware' browser commandline as a Sudo NOPASSWD rule for that particular user. Of course that doesn't mean nothing in terms of vulnerabilities and running things as root account user. If this is a production machine I'd rather downgrade to tried-n-true 1.0.7 or press VMware and wait for a fix. If you're continuing running things as root account user I'd beef up hardening and auditing (should be done regardless IMHO).


Quote:
Originally Posted by dralexpe View Post
When I attach the USB stick to the host it is mounted as /dev/scd1 (so if I understand correctly this is as SCSI) into the mount point /media/TravelDrive. I looked into /dev and I see there are some character devices of the form usbdev(1.1 or 2.1 or 3.1 or 4.1)_ep(00 or 81) which are owned by root and can be rw only by root.
That's the point. In /etc/security/console.perms and /etc/security/console.perms.d/* you'll find rules that allow the system to temporarily grant access rights on /dev devices to console logins. Things in /media are governed by Udev: see rules in /etc/udev/rules.d/*. Looking around the VMware forum for your error message brings up talk of chmodding /dev/bus/usb devices and this: http://www.linuxquestions.org/questi...13#post3227413 which seems to have helped some people. See if it works for you? BTW, the "usbfs" lines I read elsewhere are
Code:
usbfs /proc/bus/usb usbfs auto 0 0
none /proc/bus/usb usbfs devgid=46,devmode=664 0 0
There's some subtle differences.
 
Old 03-24-2009, 11:54 AM   #11
christophevr
LQ Newbie
 
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
device usb Error: Vmware2

Hello, I had the same problems , Whenmounting an usb device device error:

Actually it's a small problem. As from the beginning a thought it must be some where wrong rights to acces the device.

And yes I spend almost 2 day's in finding this really simple solution.

First to know is that vmware is running as the user you give at install time, Which of course is wonderfull since it's using your id (if it's that you give) and passwords which are crypted on you're harddisk using pam. But yes the basic device procbususb for the usbfs file systems are mounted with only read/write acces to the device owner (which is root).

The group has only read acces. To change this You can use the none ... devmode=664 as mentioned previously into fstap but this wil give you an error at boot time.

But For debian which I use do this eighter straight by at boot time for the device procbususb. Debian 2.6.26-1 amd64kernel (lenny)

Change line number 75 in the file mountkernfs.sh located in map /etc/init.d
from:
domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid
into:
domount usbfs usbdevfs /proc/bus/usb usbfs -onodev,noexec,nosuid,devmode=664

If you self are also member of root group, you won't have any problem anymore whit all fs type like usb devices like usbsticks,harddisks,ipod's,phones and soone ...

Do not forget to reboot after the change is done. Or maybe just a reload of mountkernfs.sh before you plug any usb device in.
 
Old 03-28-2009, 02:07 PM   #12
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I am running Centos 5.2 x86_64 and I couldn't find the script mountkernfs.sh.

I don't know what the equivalent script would be in Centos.

Thank you for your help.
 
Old 04-09-2009, 05:09 PM   #13
PaulGA
LQ Newbie
 
Registered: Apr 2009
Location: Georgia, USA
Distribution: Debian
Posts: 5

Rep: Reputation: 0
Quick Fix...

http://communities.vmware.com/thread/174015 ---
"Searching around, I stumble on this thread as well as others. Putting together the suggestions, I found this works for me:

* close the browser/webUI

* ensure USB device is not in use by host

* start the browser with sudo

* now the WebUI has the USB button at the top of the VM taskbar.

Using this to add the USB storage devices works as expected.

Hope this will be helpful to you."
 
Old 04-11-2009, 11:08 AM   #14
dralexpe
LQ Newbie
 
Registered: Jun 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I was able to use the USB port in the guest only if I started the browser/WebUI as root in the host. Then the USB port is available in the guest. I cloned the VM and upgraded the hardware to version 7 but I am getting the same behavior.

I wanted to be able to run the browser/WebUI in the host as non-admin, but then the USB port is not available in the guest.

Thank you.
 
Old 04-12-2009, 01:21 AM   #15
PaulGA
LQ Newbie
 
Registered: Apr 2009
Location: Georgia, USA
Distribution: Debian
Posts: 5

Rep: Reputation: 0
You should be able to chmod/chown the usb device to allow non root users to access them.

Last edited by PaulGA; 04-12-2009 at 02:21 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vmware server install error, The VMware VmPerl Scripting API was not installed. fakie_flip Linux - Software 4 12-28-2008 05:49 AM
VMware server - error when starting a VM 1bloke Linux - Software 8 10-02-2007 10:24 PM
vmware server error message heffo_j Ubuntu 6 11-08-2006 04:54 AM
linux vmware server OS usb recognition issue lmcilwain Linux - Software 3 09-21-2006 01:09 PM
vmware server config error lordtweety Linux - Software 4 08-22-2006 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration