SUSE Support

Here When You Need Us

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.

Environment

Mostly desktop users and specifically those who login with a non-root account.

Situation

First configure VMWare guest to use physical disk partition as a Root user

- 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

Resolution

A) Firstly identify the type of disk device used by the vmware guest

- 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-2.6.25.18-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

Additional Information

The reason for this specific disk setup is to boot Windows from a vmdisk but have access to a physical NTFS disk partition for data. Also provides access to a FAT32 physical disk partition located on the same physical disk as NTFS partition, for the purpose of shared file access between Linux host and Windows guest.

Disclaimer

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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.