LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 03-29-2012, 03:05 PM   #1
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Rep: Reputation: Disabled
How to access other drives on the VM Host


Just checking I am doing this right. To access disk drives other than C: from a Win 7 VM I guess I need to use Samba on the KVM host to share those drives first don't I? There is not some other way using iSCSI or something else that I should be using instead is there.
 
Old 03-29-2012, 03:29 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi Nick_C,

From what you said it appears that you have got KVM installed on linux host and Windows 7 is a guest OS. You said that if you want to access drives other than C (which is there on your Windows 7 machine) then yes you can use Samba client on host OS. If you want to access other drives on your Windows 7 VM then just make those drives sharable and that will be it. You will be able to access these drive using smb-client. However, if you are thinking of doing vice-versa that is making linux share available to your Windows 7 VM then you have to configure Samba server on linux machine.

I would say that samba is the easiest way to achieve this objective. In short you are on the right track.
 
Old 03-30-2012, 08:44 AM   #3
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
can you elaborate on what you want to do? The description is a bit vague...
 
Old 03-31-2012, 08:42 AM   #4
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by dyasny View Post
can you elaborate on what you want to do? The description is a bit vague...
VM is Win 7, VM Host is Debian. Actually both on the same machine as this is workstation virtualization. There are multiple disks and partitions on this machine which I want to make available to the Win 7 VM.

I have installed Samba on the Debian host but can't seem to find anyway to actually share a drive or directory, using Xfce4 desktop on Debian.
 
Old 04-01-2012, 02:41 PM   #5
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Well got samba installed and I can see the samba server from the Win 7 VMs but as soon as I try to go into it to browse the shares I get error: The network path was not found. Any suggestions.
 
Old 04-01-2012, 02:48 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

You might want to have a look at: http://nwlinux.com/access-samba-shar...-professional/
 
Old 04-02-2012, 04:39 AM   #7
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
yup, this has nothing to do with virtualization actually - purely samba config issue
 
Old 04-02-2012, 05:37 AM   #8
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Yep thanks but tried all the suggested registry hacks and still no access. Not sure this is Win 7 related because I have also tried it from a seperate Win 2003 on tghe same network and that has the same problem.

Last edited by Nick_C; 04-02-2012 at 05:43 AM.
 
Old 04-02-2012, 06:28 AM   #9
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Are you able to mount samba share on debian machine or it does not mount on that as well?
 
Old 04-02-2012, 09:44 AM   #10
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Are you able to mount samba share on debian machine or it does not mount on that as well?
No won't mount on Debian host machine either.
 
Old 04-02-2012, 11:16 AM   #11
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Can you share your smb.conf file. How you are authenticating to samba via tdsm or ldap? If tdsm then did you setup the password for the user using smbpasswd? It will be good if you also share the commond that you are using to mount samba share.
 
Old 04-03-2012, 08:29 AM   #12
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Can you share your smb.conf file. How you are authenticating to samba via tdsm or ldap? If tdsm then did you setup the password for the user using smbpasswd? It will be good if you also share the commond that you are using to mount samba share.
smb.conf
Quote:
[global]
netbios name = VMHost
server string = Samba file and print server
workgroup = Test1
security = user
hosts allow = 127.192.168.0. 192.168.10.0. 192.168.122.0
interfaces = 127.0.0.1/8 192.168.10.0/24 192.168.122.0/24
bind interfaces only = yes
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255
printcap name = cups
load printers = yes
cups options = raw
printing = cups
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
null passwords = no
username level = 6
password level = 6
encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
domain master = no
preferred master = no
domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
time server = no
name resolve order = wins lmhosts bcast
wins support = no
wins proxy = no
dns proxy = no
preserve case = yes
short preserve case = yes
client use spnego = no
client signing = no
client schannel = no
server signing = no
server schannel = no
nt pipe support = yes
nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
client plaintext auth = no
disable netbios = no
follow symlinks = no
update encrypted = yes
pam password change = no
passwd chat timeout = 120
hostname lookups = no
username map = /etc/samba/smbusers
passdb backend = tdbsam
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n\n *ReType*new*password* %n\n *passwd*changed*\n
add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
winbind refresh tickets = no
winbind offline logon = no

[homes]
comment = Home Directories
path = /home
read only = no
available = yes
browseable = yes
writable = yes
guest ok = no
public = no
printable = no
locking = no
strict locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
available = yes
browseable = yes
writable = no
guest ok = no
public = no
printable = no
locking = no
strict locking = no

[profiles]
comment = User Profiles
path = /var/samba/profiles
read only = no
available = yes
browseable = no
writable = yes
guest ok = no
public = no
printable = no
create mode = 0600
directory mask = 0700
locking = no
strict locking = no

[printers]
comment = All Printers
path = /var/spool/samba
browseable = yes
writable = no
guest ok = no
public = no
printable = yes
locking = no
strict locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
available = yes
browseable = yes
writeable = yes
guest ok = yes
locking = no
strict locking = no

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gadmin-samba-pdf %s %u
lpq command =
lprm command =

[Data]
path = /media/Data
comment = No comment
valid users = nick libvirt-qemu smbguest
write list = nick libvirt-qemu smbguest
admin users = nick libvirt-qemu smbguest
read only = no
available = yes
browseable = yes
writable = yes
guest ok = yes
public = yes
printable = no
locking = yes
strict locking = no
Extra additions suggested in previous link have been taken out as they didn't make any difference anyway.

Last edited by Nick_C; 04-03-2012 at 08:30 AM.
 
Old 04-03-2012, 03:06 PM   #13
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Please use code tag instead of quote when you are posting your configuration file as putting it in quote tag makes it difficult to read. As I can see you are using tdbsam. Did you setup password for the users nick libvirt-qemu smbguest? If yes, are you able to see them when you run the command:

Code:
pdbedit -L
If you are able to see the users after running the above command what is the syntax that you are using to mount samba share? If it returns any error paste the error message.

Let us know which are the shares that you want to access and put the configuration file in code tag instead of quote.
 
Old 04-04-2012, 05:55 AM   #14
Nick_C
Member
 
Registered: Jan 2012
Location: London, England, UK
Distribution: CentOS 6, CentOS 7
Posts: 299

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Please use code tag instead of quote when you are posting your configuration file as putting it in quote tag makes it difficult to read. As I can see you are using tdbsam. Did you setup password for the users nick libvirt-qemu smbguest? If yes, are you able to see them when you run the command:

Code:
pdbedit -L
If you are able to see the users after running the above command what is the syntax that you are using to mount samba share? If it returns any error paste the error message.

Let us know which are the shares that you want to access and put the configuration file in code tag instead of quote.
I have setup a password for the user nick but not specifically for libvirt-qemu or smbguest, these were both created automatically. pdbedit -L displays the following:
Code:
root@VmHost:/home/nick# pdbedit -L
Ignoring unknown parameter "update encrypted"
smbguest:1001:Samba guest account
smbguest:1001:Samba guest account
win7pro$:1006:No value has been set
root:0:root
win7ult$:1004:No value has been set
nick:1000:Nick Causton
libvirt-qemu:108:Libvirt Qemu
> what is the syntax that you are using to mount samba share

I'm not using any command, just going to 'network' in nautilus.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
qemu: use physical hard disk (host drives) - dangerous? gernonimo Linux - Software 10 09-18-2008 07:44 PM
Can't access windows drives Hisse SUSE / openSUSE 8 08-12-2006 10:38 PM
mapping windows network drives on a linux host kopite2012 Linux - Newbie 2 04-30-2004 10:00 AM
how to access 'drives' lewisdw Linux - Newbie 8 11-23-2003 12:16 AM
access to cd drives??? themightybuck Linux - Newbie 4 10-15-2002 02:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 02:21 PM.

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
Open Source Consulting | Domain Registration