0

I have 3 virtual machines and i fixed them as a team and in 1 local host now they can ping each other and see each other now how can I write a command to send 1 file from a virtual machine to another?

How to do this kind of file transfer? Is there any utility for this?

I have 2 opensuse gnome os and 1 opensuse kde

I have OpenSUSE running on all the three machines.

6
  • 1
    What does tc means in the title? Is it a typo for the ? Jan 8, 2012 at 19:59
  • No tc is a command in linux which you can make scripts tc is abbreviation of traffic controller
    – Nickool
    Jan 14, 2012 at 15:09
  • when sharing a file from os1 to os3 the os2 which is in the middle and has 2 network cards(net adapters) should output the traffic but I really don't know what should i do?
    – Nickool
    Jan 14, 2012 at 15:11
  • @nikparsa - Your last comment is significantly different than your original question, in which you stated that you had IP connectivity between the machines ("can ping each other"). If you now have another setup, and if os1 to os3 no longer have standard IP connectivity with each other, please open a new question detailing the new configuration.
    – ziesemer
    Jan 20, 2012 at 15:01
  • (Actually, he already did: superuser.com/questions/376070/…)
    – ziesemer
    Jan 20, 2012 at 15:02

2 Answers 2

7

It sounds like you have standard IP connectivity, which makes the fact that you're using VMs pretty much irrelevant. I'd just use scp.

just type man scp to get more info in this command.

1
  • scp [[user@]host1:]file1 ... [[user@]host2:]file2 does the trick
    – hookenz
    Jan 9, 2012 at 9:32
0

The most basic file transfer can be handle with netcat [nc].
In the following example, we transfert filename from a virtual machine (IP=a.b.c.d) to another one (VM2) using the port 8000:

  • on VM2 run: nc -l 8000 > filename
  • on VM1 run: nc a.b.c.d 8000 < filename

(if the port 8000 is blocked you can use another one)

OK, this is the most basic solution to use when NFS/rcp/scp/ftp are not available.

Note that, rsync may be the best file transfer tool when updating files (e.g. appending new data always at the end).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .