Como faço para que a área de transferência funcione no CentOS dentro do VirtualBox no Windows?

1

Eu tenho o CentOS 7.3.1611 rodando com o XFCE dentro do Oracle VirtualBox 5.1.16 no Windows 8.1. As outras perguntas são para versões mais antigas ou o convidado / host são alternados. Eu defino Dispositivos > Área de Transferência Compartilhada > Bidirecional, mas nada que eu copie no Windows é pastável no CentOS, e nada que eu copie no CentOS é passável no Windows.

Eu usei o Vagrant para criar a caixa. vagrant init centos/7; vagrant up

==> default: Checking for guest additions in VM...
    default: No guest additions were detected on the base box for this VM! Guest
    default: additions are required for forwarded ports, shared folders, host only
    default: networking, and more. If SSH fails on this machine, please install
    default: the guest additions and repackage the box to continue.
    default:
    default: This is not an error message; everything may continue to work properly,

Também adicionei manualmente uma unidade óptica e carreguei VBoxGuestAdditions.iso da pasta VirtualBox, reiniciei, montei o CDROM manualmente e executei o script manualmente, mas:

[vagrant@localhost ~]$ sudo mount /dev/sr0/ /mnt
mount: /dev/sr0 is write-protected, mounting read-only
[vagrant@localhost ~]$ cd /mnt
[vagrant@localhost mnt]$ sudo ./autorun.sh
Linux guest additions installer not found -- try to start them manually.
[vagrant@localhost mnt]$ ls
32Bit  AUTORUN.INF  cert  runasroot.sh            VBoxSolarisAdditions.pkg        VBoxWindowsAdditions.exe
64Bit  autorun.sh   OS2   VBoxLinuxAdditions.run  VBoxWindowsAdditions-amd64.exe  VBoxWindowsAdditions-x86.exe

Então, agora eu não sei como fazer a área de trabalho funcionar.

Aqui está o log da execução de VBoxLinuxAdditions.run .

[vagrant@localhost mnt]$ sudo ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.16 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.16 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.
[vagrant@localhost mnt]$ cat /var/log/VBoxGuestAdditions.log

vboxadd.sh: failed: Look at /var/log/vboxadd-install.log to find out what went wrong.
vboxadd.sh: failed: Please check that you have gcc, make, the header files for your Linux kernel and possibly perl installed..
[vagrant@localhost mnt]$ cat /var/log/vboxadd-install.log
/tmp/vbox.0/Makefile.include.header:97: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.
[vagrant@localhost mnt]$ gcc
gcc: fatal error: no input files
compilation terminated.
[vagrant@localhost mnt]$
    
por Chloe 14.03.2017 / 20:08

1 resposta

0

Acho que você não conseguirá que o compartilhamento da área de transferência funcione sem as adições instaladas. Você pode executar manualmente o arquivo VBoxLinuxAdditions.run e ver se ele será instalado ou dará a você um erro apropriado?

    
por 14.03.2017 / 21:41