How to use rsync when running NAT?

This is for discussing general topics about how to use VirtualBox.
Post Reply
DavidA
Posts: 82
Joined: 21. Dec 2010, 12:31
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Centos 5

How to use rsync when running NAT?

Post by DavidA »

Hi

I am running VirtualBox 4.0.8 on a Windows 7 64-bit host with a Centos 5.5 guest.

I am happily using shared folders between the guest and the host.

I need to run rsync between the guest VM and a network drive that is accessible to the host, in order to synchronise a shared folder with the network drive. My guest VM uses NAT. Our IT people do not want us to use Bridge networking because that will open the VM up to the internet and they will then have to maintain secuirty updates on the VM.

If I try to mount the remote drive I get:

mount: can't find <remote drive> in /etc/fstab or /etc/mtab

Would it be possible to support rsync with NAT?

(The alternative is to do the directory synchronisation from Windows, but we need to support working over a slow ADSL connection and have found that RoboCopy is too slow in that environment.)

Best regards

David
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to use rsync when running NAT?

Post by Sasquatch »

DeltaCopy is the rsync method for Windows. You can also use cygwin to run rsync in Windows.
The mount command failed, because you didn't specify it entirely. When you mount things that are not noted in fstab, you have to specify all the parameters. This means you enter the following:

Code: Select all

mount -t <file system type, probably cifs, ask your IT dept> //remote/location /local/mount/point
You may have to use -o to specify additional options like username and password.

To use rsync from the VM using NAT, you have to think about how it connects. If it's just the client, then it should not be required to make any changes. Else you have to forward ports using the port forward options.
As for the security issues that may come when using bridged: it's not as severe if it was a Windows machine. Linux is very secure compared to Windows, so it doesn't matter much if you have it on NAT or bridged setting.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
DavidA
Posts: 82
Joined: 21. Dec 2010, 12:31
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Centos 5

Re: How to use rsync when running NAT?

Post by DavidA »

Thanks for your reply - it was very helpful.
Post Reply