Wie kann ich einen Ordner in VirtualBox freigeben?

376
user40509

Ich möchte einen Ordner zwischen Windows 10 und VirtualBox (CentOS OS) freigeben.

1

2 Antworten auf die Frage

2
jalbarl

Installieren Sie die Gastzugänge in CentOS (Geräte-> GA-CD-Image einfügen, navigieren Sie dann zur CD-ROM und führen Sie das Installationsprogramm aus). Sobald diese installiert sind, können Sie in das Einstellungsmenü dieser VM gehen, "Freigegebene Ordner" auswählen und beliebig viele Ordner hinzufügen (wählen Sie auch die Option zum automatischen Mounten, wenn Sie sie nicht manuell laden möchten). CentOS-Neustarts sind nach jeder Operation erforderlich (GA-Installation und Hinzufügen neuer Ordner).

2
James T Snell

As an alternative to jalbarl's answer, which gives the typical method of doing this in Virtual Box, you could try and somewhat more generic approach and just connect your CentOS VM to a file share you create on your Windows machine.

Here's a link to CentOS instructions for doing this.

The key steps are:

  1. yum install samba-client samba-common cifs-utils
  2. mkdir /mnt/win (or create some other directory to mount the share to)
  3. Add this to your /etc/fstab: \\winbox\getme /mnt/win cifs user,uid=500,rw,suid,username=sushi,password=yummy 0 0 (alter it accordingly, you may need to replace 'winbox' with the IP of your Windows machine)
  4. Mount the share: mount /mnt/win

Note the link above where these steps came from has more secure and alternative methods explained as well.

This approach has the merit of not depending on Virtual Box's addons, which are fine, but if you move your VM to other platforms (VMware, for example), you may find you like this more generic approach