Providing vmware guest access to a physical disk driver hosted on Linux
This document (7001976) is provided subject to the disclaimer at the end of this document.
- Note that as a Root user the message which appears next to the Hard Disk in the Guest says, "Using Partitions"
- Now login as the non-root user and note the message which appears next to the Hard Disk in the Guest which reports "Using Device"
1. This problem occurs because the non-root user does not have RW access to the required Linux device driver.
2. Granting the non-root user permissions or changing ownership to the device, e.g. /dev/sdb will not work after a reboot
At Linux boot time (each time) disk device drivers files are created
- Look at the device name on YOUR system (as per the sample vmdk file), using root permissions:
- at a terminal window:
# ls -al /dev/sdb
brw-r----- 1 root disk 8, 16 Nov 21 11:20 /dev/sdb
- Note that 'b' means block and the 8, 16 identify the device as per the file devices.txt (e.g. /usr/src/linux-18.104.22.168-0.2/Documentation/devices.txt)
A) Add these commands to "/etc/init.d/boot.local",
- where 'myuser' is the non-root user name:
- AND using the block device numbers returned on YOUR system
- name the device something that is not already in directory /dev. (It will be the name you place in the vmdk file in the next step)
mknod /dev/sdbvm b8 16
chown myuser:disk /dev/sdbvm
B) Edit the appropriate vmware guest vmdk file (only edit the device name):
Sample of portion of vmware file: WinXP-Notebook-0.vmdk
# Extent description
RW 63 FLAT "WinXP-Notebook-0-pt.vmdk" 0
RW 146801907 FLAT "/dev/sdbvm" 63
RW 37752750 FLAT "/dev/sdbvm" 146801970
RW 440582625 ZERO
RW 5103 ZERO
No doubt this could be made to work with any user by using a variable in the boot.local
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7001976
- Creation Date: 20-Nov-2008
- Modified Date:03-Mar-2020
- SUSE Linux Enterprise Desktop
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: firstname.lastname@example.org