10 Replies Latest reply: Aug 20, 2012 5:58 AM by Moh RSS

    mount share drive with Windows 7

    Moh
      Hi All,

      I created a new OVM with Linux 6.3 (basic installation) and want to connect to my system (Windows 7) via a share directory.
      I tried:

      mount -t vboxsf D:\myshare /mnt/share
      and get error unknown filesystem type "vboxsf"

      scond try:
      mount -t cifs -o username=myuser,password=mypassword //hostname/myshare /mnt/share

      CIFS VFS: Error connecting to socket. Aborting operation
      CIFS VFS: cifs_mount failed w/return code= -111

      What is wrong? How can I connect to share drive?

      Regards,
      Moh
        • 1. Re: mount share drive with Windows 7
          EdStevens
          Moh wrote:
          Hi All,

          I created a new OVM with Linux 6.3 (basic installation) and want to connect to my system (Windows 7) via a share directory.
          I tried:

          mount -t vboxsf D:\myshare /mnt/share
          and get error unknown filesystem type "vboxsf"
          Did you install the VBox Guest Additions? Did you actually create the share to be mounted?

          >
          scond try:
          mount -t cifs -o username=myuser,password=mypassword //hostname/myshare /mnt/share

          CIFS VFS: Error connecting to socket. Aborting operation
          CIFS VFS: cifs_mount failed w/return code= -111

          What is wrong? How can I connect to share drive?

          Regards,
          Moh
          • 2. Re: mount share drive with Windows 7
            Moh
            Hi,

            How can I install VBox Guest Additions?

            Thanks,
            Moh
            • 3. Re: mount share drive with Windows 7
              Dude!
              Does you virtual machine has internet access? You can simply do the following as root:

              <pre>
              # cd /etc/yum.repos.d
              # wget http://public-yum.oracle.com/public-yum-ol6.repo
              # yum install gcc kernel-uek-devel-$(uname -r)
              </pre>

              For the rest, please see the Virtualbox documentation:
              http://www.virtualbox.org/manual/ch04.html
              • 4. Re: mount share drive with Windows 7
                Moh
                Hi,

                Other Problem: I have internet connection, but VM can not ping any URL (only localhost). Any idea?

                Thanks and regards,
                Moh
                • 5. Re: mount share drive with Windows 7
                  Dude!
                  Yes. How did you setup the Network adapter of the virtual machine:

                  http://www.virtualbox.org/manual/ch06.html#networkingmodes

                  You will need to set it to NAT or Bridged adapter in order to access a network other than your host machiene, The later is necessary if you need to access the VM from outside.
                  • 6. Re: mount share drive with Windows 7
                    Moh
                    Hi,

                    NAT was configured, and I tried with Bridged adapter. But without any success. With other OVMs don't have any problem for connection with hosts but hier it can not connect to network...

                    Regards,
                    Mohammad
                    • 7. Re: mount share drive with Windows 7
                      Dude!
                      I never had trouble with the NAT or bridged adapter to connect from a virtual machine to the Internet using Virtualbox, and I currently have over 40 virtual machines installed, all sorts of OS's, and used about 10 different versions of Virtualbox in the past. So to me, your problem sounds configuration related.

                      Did you configure your virtual machine IP correctly? Can you ping the IP gateway, did you setup DNS properly? Are you using DHCP? Try the NAT interface and configure your Linux system to use DHCP. If your host system can connect to the Internet, this should work for your virtual machine too.
                      • 8. Re: mount share drive with Windows 7
                        Dude!
                        Also check the following, it might contain the info you need how to setup your machine:

                        Re: VirtualBox - somewhat off-topic
                        • 9. Re: mount share drive with Windows 7
                          EdStevens
                          Moh wrote:
                          Hi,

                          NAT was configured, and I tried with Bridged adapter. But without any success. With other OVMs don't have any problem for connection with hosts but hier it can not connect to network...

                          Regards,
                          Mohammad
                          Others may disagree, but the only way I get this to work they way I want is to create two NICs. eth0 is configured for NAT, which allows my vm to get to the internet and download rpms. But in VirtualBox NAT requires a DHCP assigned ip address. Servers want fixed addresses. So I create a second NIC, eth1, configured hostonly and with a fixed IP address.

                          With that configuration my vm can go to the internet and get rpms, I can give it a fixed address as is proper for a server, and my network admins never know it's there because the only IP address that is exposed to the network is that of the host os - my laptop. I can set up a putty session on my host desktop, connected to the vm using it's fixed IP address, and work the vm exactly as if it were a server in my data center.

                          Edited by: EdStevens on Aug 17, 2012 7:53 AM
                          • 10. Re: mount share drive with Windows 7
                            Moh
                            Hi,

                            Thanks for your reply. I used your solution and works.
                            configured hostonly and with a fixed IP address.
                            Regards,
                            Moh