particion montar kali desde compartir compartida carpetas carpeta anfitrion acceder ubuntu virtualbox vagrant nfs

ubuntu - desde - montar carpeta compartida kali linux



Error errante: Error al montar carpetas en el invitado de Linux (21)

Tengo algunos problemas con las carpetas compartidas de Vagrant, mi sistema base es el escritorio Ubuntu 13.10.

¿No entiendo por qué tengo este error es algo que no está configurado correctamente? ¿Es un problema de NFS o Virtualbox Guest Additions? He intentado con muchas cajas diferentes pero el mismo problema.

Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrant mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrant

Aquí está el proceso completo después de vagrant up :

$ vagrant up Bringing machine ''default'' up with ''virtualbox'' provider... ==> default: Importing base box ''u131032''... ==> default: Matching MAC address for NAT networking... ==> default: Setting the name of the VM: vagrant_default_1396020504136_46442 ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2: hostonly ==> default: Forwarding ports... default: 22 => 2222 (adapter 1) ==> default: Running ''pre-boot'' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key default: Error: Connection timeout. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... default: Error: Remote connection disconnect. Retrying... ==> default: Machine booted and ready! GuestAdditions versions on your host (4.3.10) and guest (4.2.16) do not match. * Stopping VirtualBox Additions ...done. Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required: dkms libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1-mesa-dri libglapi-mesa libice6 libllvm3.3 libpciaccess0 libpixman-1-0 libsm6 libtxc-dxtn-s2tc0 libxaw7 libxcomposite1 libxdamage1 libxfixes3 libxfont1 libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxt6 x11-common x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common xserver-xorg-core Use ''apt-get autoremove'' to remove them. The following packages will be REMOVED: virtualbox-guest-dkms* virtualbox-guest-utils* virtualbox-guest-x11* 0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded. After this operation, 11.1 MB disk space will be freed. (Reading database ... 65615 files and directories currently installed.) Removing virtualbox-guest-dkms ... -------- Uninstall Beginning -------- Module: virtualbox-guest Version: 4.2.16 Kernel: 3.11.0-18-generic (i686) ------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel. vboxguest.ko: - Uninstallation - Deleting from: /lib/modules/3.11.0-18-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxsf.ko: - Uninstallation - Deleting from: /lib/modules/3.11.0-18-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. vboxvideo.ko: - Uninstallation - Deleting from: /lib/modules/3.11.0-18-generic/updates/dkms/ - Original module - No original module was found for this module on this kernel. - Use the dkms install command to reinstall any previous module version. depmod.... DKMS: uninstall completed. ------------------------------ Deleting module version: 4.2.16 completely from the DKMS tree. ------------------------------ Done. Removing virtualbox-guest-x11 ... Purging configuration files for virtualbox-guest-x11 ... Removing virtualbox-guest-utils ... Purging configuration files for virtualbox-guest-utils ... Processing triggers for ureadahead ... Processing triggers for man-db ... Reading package lists... Building dependency tree... Reading state information... dkms is already the newest version. dkms set to manually installed. linux-headers-3.11.0-18-generic is already the newest version. linux-headers-3.11.0-18-generic set to manually installed. The following packages were automatically installed and are no longer required: libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libfontenc1 libgl1-mesa-dri libglapi-mesa libice6 libllvm3.3 libpciaccess0 libpixman-1-0 libsm6 libtxc-dxtn-s2tc0 libxaw7 libxcomposite1 libxdamage1 libxfixes3 libxfont1 libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxt6 x11-common x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common xserver-xorg-core Use ''apt-get autoremove'' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Copy iso file /usr/share/virtualbox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso mount: block device /tmp/VBoxGuestAdditions.iso is write-protected, mounting read-only Installing Virtualbox Guest Additions 4.3.10 - guest version is 4.2.16 Verifying archive integrity... All good. Uncompressing VirtualBox 4.3.10 Guest Additions for Linux............ VirtualBox Guest Additions installer Copying additional installer modules ... Installing additional modules ... Removing existing VirtualBox DKMS kernel modules ...done. Removing existing VirtualBox non-DKMS kernel modules ...done. Building the VirtualBox Guest Additions kernel modules ...done. Doing non-kernel setup of the Guest Additions ...done. Starting the VirtualBox Guest Additions ...done. Installing the Window System drivers Could not find the X.Org or XFree86 Window System, skipping. An error occurred during installation of VirtualBox Guest Additions 4.3.10. Some functionality may not work as intended. In most cases it is OK that the "Window System drivers" installation failed. ==> default: Checking for guest additions in VM... ==> default: Setting hostname... ==> default: Configuring and enabling network interfaces... ==> default: Exporting NFS shared folders... ==> default: Preparing to edit /etc/exports. Administrator privileges will be required... nfsd running sudo: /usr/bin/exportfs: command not found ==> default: Mounting NFS shared folders... ==> default: Mounting shared folders... default: /vagrant => /home/me/Documents/Work/project/vagrant Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` /vagrant /vagrant mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` /vagrant /vagrant

Mi configuración de Vagrantfile es:

# -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don''t touch unless you know what you''re doing! VAGRANTFILE_API_VERSION = "2" personalization = File.expand_path("../Personalization", __FILE__) load personalization Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = $base_box config.vm.box_url = $base_box_url config.vm.hostname = $vhost + ".dev" config.hostsupdater.aliases = ["api." + $vhost + ".dev", "mysql." + $vhost + ".dev"] config.hostsupdater.remove_on_suspend = true # set auto_update to ture to check the correct # additions version when booting the machine config.vbguest.auto_update = true config.vbguest.auto_reboot = true config.vm.network :private_network, ip: $ip config.vm.synced_folder "../", "/srv/www/vhosts/" + $vhost + ".dev", type: "nfs" config.vm.provider :virtualbox do |v| v.customize ["modifyvm", :id, "--memory", 2048] v.customize ["modifyvm", :id, "--cpus", "1"] v.customize ["modifyvm", :id, "--cpuexecutioncap", "100"] v.customize ["modifyvm", :id, "--ioapic", "off"] v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] end config.vm.provision "shell" do |s| s.path = "vagrant-bootstrap.sh" s.args = $vhost + " " + $mysql_password + " " + $application_database end end

El archivo de personalización es:

# Name of the vhost to create $vhost = "project" # Use the Ubunut 32bit or 64bit $base_box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-i386-vagrant-disk1.box" # VM IP $ip = "192.168.7.7" # Base box name $base_box = "u131032" # MySQL $mysql_password = "admin" $application_database = "project"

Los siguientes complementos están habilitados en Vagrant:

$ vagrant plugin list vagrant-hostsupdater (0.0.11) vagrant-login (1.0.1, system) vagrant-share (1.0.1, system) vagrant-vbguest (0.10.0)


(de mi comentario anterior)

Siguiendo el problema a sus raíces: específicamente la parte en los comentarios que dice esto:

wget https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.11-93070.iso‌​ sudo cp VBoxGuestAdditions_4.3.11-93070.iso /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso

Después de hacer eso, tengo negocios como de costumbre con todas mis máquinas virtuales (y sus archivos Vagrant actuales, por supuesto)

Cuando tienes que hacer algo en una máquina virtual recién creada, para que funcione, algo está mal.



Creo que esta es la respuesta más actualizada ahora y me funcionó ( Guest Additions Version: 5.0.6 , VirtualBox Version: 4.3.16 , Ubuntu 14.04 LTS )

https://github.com/mitchellh/vagrant/issues/3341#issuecomment-144271026

Básicamente yo digo:

Simple and Quick Solution for Failed to mount folders in Linux guest issue. Add the following line to your Homestead/Vagrantfile: config.vbguest.auto_update = false Your Homestead/Vagrantfile should looks like this: /... Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # To avoid install and uninstall VBoxGuessAdditions during vagrant provisioning. config.vbguest.auto_update = false .../ Save it and execute $ vagrant destroy --force $ vagrant up


El plugin vagrant-vbguest resuelto mi problema:

$ vagrant plugin install vagrant-vbguest

Salida:

$ vagrant reload ==> default: Attempting graceful shutdown of VM... ... ==> default: Machine booted and ready! GuestAdditions 4.3.12 running --- OK. ==> default: Checking for guest additions in VM... ==> default: Configuring and enabling network interfaces... ==> default: Exporting NFS shared folders... ==> default: Preparing to edit /etc/exports. Administrator privileges will be required... ==> default: Mounting NFS shared folders... ==> default: VM already provisioned. Run `vagrant provision` or use `--provision` to force it

Solo asegúrate de estar ejecutando la última versión de VirtualBox


En la configuración donde Windows es un host, y Linux es un invitado, encontré la solución del mismo problema en otro lugar.

Así que, nuevamente, el mensaje de error fue "Error al montar carpetas en un invitado de Linux. Esto suele ser porque el sistema de archivos" vboxsf "no está disponible". (...)

Esto se debió a que cometí un error al hacer un enlace simbólico dentro del sistema invitado desde / vagrant a / home / vagrant / vagrant. El punto es que el directorio / vagrant es un directorio normal de Linux que tiene un enlace simbólico (así que todo está bien), pero cuando se inicia con "vagrant up", intenta montar el directorio de Windows en ese lugar, y el directorio de Windows no puede funcionar como un enlace simbólico. El host de Windows no es compatible con los enlaces simbólicos de linux.

Entonces, lo que puede hacer es guardar el enlace simbólico donde lo tenga y volver a cargar la máquina.

En mi configuración fue: Vagrant 1.7.2, VBoxGuestAdditions 4.3.28 y VBox 4.3.28.


En mi caso, en una imagen de Ubuntu 16.04 que funcionaba anteriormente, el error comenzó después de instalar vagrant-vbguest para una imagen de vagrant diferente, y luego iniciar la VM de Ubuntu. Actualizó las adiciones de invitados a 5.1.20, y desde entonces los montajes empezaron a fallar. Actualizada la caja, apt update + upgrade y lo mismo, vbguest instalaría la versión 5.1.20 más nueva.

Se resolvió ejecutando manualmente:

sudo apt-get update sudo apt-get install virtualbox-guest-dkms

Y también deshabilitando: config.vbguest.auto_update = false para esta máquina virtual (puede que no sea necesario).


Estaba ejecutando Vagrant con VirtualBox 5.1.X, y tuve que bajar a VirtualBox 5.0.40, e instalar el complemento vbguest para resolver este problema.

Mis pasos fueron:

  • Desinstalar VirtualBox 5.1.X
  • Instalar Vagrant 5.0.40
  • Reiniciar mi maquina
  • Corre vagrant up por mi vagabundo. Va a fallar
  • Ejecutar vagrant plugin install vagrant-vbguest mientras mi VM se está ejecutando, para instalar el complemento vagrant. Esto gestiona la sincronización de las versiones de VirtualBox Guest entre el host y el invitado.
  • Ejecutar vagrant reload para recargar mi máquina virtual
  • ¡Mágico!

Esto parece deberse a una incompatibilidad con el complemento vbguest vagrant y las últimas versiones de vagrant. Está intentando actualizar las adiciones de invitados y no hacerlo de forma completa / adecuada.


Experimenté el mismo problema con Centos 7, supongo que debido a un kernel obsoleto en combinación con una versión actualizada de VirtualBox. Basado en la actualización de Blizz, esto es lo que me funcionó (el plugin vagrant-vbguest ya está instalado):

vagrant ssh sudo yum -y install kernel-devel sudo yum -y update exit vagrant reload --provision


He encontrado este problema abordado aquí cuestiones vagabundas. Dos formas de hacerlo:

  1. Ejecutar esto en el invitado (es decir, después de ssh en vbox a través de vagrant ssh )

    sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

    Luego ejecute vagrant reload para montar correctamente las carpetas.

  2. Como @klang señaló, actualice el archivo VBoxGuestAdditions.iso en su mac:

    wget https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.11-93070.iso‌​ sudo cp VBoxGuestAdditions_4.3.11-93070.iso /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso

ACTUALIZACIÓN (16may2014)

Como la iso ya no está disponible, puede usar el 4.3.12 uno ( http://dlc.sun.com.edgesuite.net/virtualbox/4.3.12/VBoxGuestAdditions_4.3.12.iso )

nota: el binario vbox4.3.12 para os X no está disponible en este momento


Instala el complemento vagrant-vbguest ejecutando este comando:

vagrant plugin install vagrant-vbguest


Llegué a esta página mientras buscaba el mismo mensaje de error. Para mí, la causa fue diferente: había ejecutado una yum update en el sistema que instaló un nuevo kernel. Las adiciones de invitados estaban desactualizadas, por lo que no se podían cargar.

Los reconstruí con

sudo /etc/init.d/vboxadd setup

Y una vagrant reload más tarde, mi invitado estaba funcionando nuevamente.

Solo lo estoy agregando aquí en caso de que alguien más llegue aquí de la misma manera que yo.

Editar (por el comentario de KCD):
Es posible que aparezca un error que diga:

No se encontraron los encabezados para el kernel en ejecución actual

Esto se puede resolver instalando kernel-devel ( yum install kernel-devel )


Para mí, con VBoxGuestAdditions 5.1.20, el problema era que /sbin/mount.vboxsf señalaba la ubicación incorrecta.

sudo ln -sf /opt/VBoxGuestAdditions-5.1.20/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf

arreglado para mí


Prueba como si:

vagrant plugin install vagrant-vbguest

En Vagrantfile añadir:

config.vbguest.iso_path = "http://download.virtualbox.org/virtualbox/VERSION/VBoxGuestAdditions_VERSION.iso" config.vbguest.auto_update = false config.vbguest.installer_arguments = %w{--nox11 -- --force}

Correr:

vagrant vbguest --do install -f -b vagrant reload


Solo para futuras referencias, este problema ocurrió conmigo, usando Vagrant 1.7.4 y VirtualBox 5.0.10 r104061, cuando aprovisioné una carpeta compartida en / y creé un enlace simbólico a mi carpeta de inicio. Algo como esto:

/folder ~/folder -> /folder

Aparentemente, esta operación no está permitida por Vagrant por razones de seguridad y arroja el error descrito.

Lo resolví aprovisionando la carpeta deseada directamente en mi directorio de inicio, como la /home/vagrant/folder .


Su registro se queja de no encontrar exportfs: sudo: /usr/bin/exportfs: command not found

Exportfs hace que los directorios locales estén disponibles para que los clientes NFS puedan montar.


Un paso más que tuve que completar después de seguir la primera sugerencia que hizo fue ejecutar los comandos de mount enumerados en el mensaje de error con sudo desde la línea de comandos de Ubuntu [14.04 Servidor]. Después de eso, todo fue bueno para ir!


por ahora el montaje funciona en algunas máquinas (ubuntu) y otras no (centos 7), pero la instalación del complemento lo resuelve

vagrant plugin install vagrant-vbguest

sin tener que hacer nada más que eso, solo

vagrant reload


Esto es 2017. Por si alguien se enfrenta al mismo problema.

Para bento / centos-6.7, estaba recibiendo el mismo error. Eso se resolvió agregando el plugin vagrant-vbguest (0.13.0). c:> plugin vagrant instalar vagrant-vbguest

Url del cuadro: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box

Esta versión de centos-7 me estaba dando el mismo error.

Error:

==> build: Mounting shared folders... build: /vagrant => C:/projects/ Vagrant was unable to mount VirtualBox shared folders. This is usually because the filesystem "vboxsf" is not available. This filesystem is made available via the VirtualBox Guest Additions and kernel module. Please verify that these guest additions are properly installed in the guest. This is not a bug in Vagrant and is usually caused by a faulty Vagrant box. For context, the command attempted was: mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant The error output from the command was: /sbin/mount.vboxsf: mounting failed with the error: No such device

Mi configuración:

C:/projects>vagrant -v Vagrant 1.9.1 C:/projects> vboxmanage -v 5.0.10r104061 C:/projects>vagrant plugin list vagrant-cachier (1.2.1) vagrant-hostmanager (1.8.5) vagrant-hosts (2.8.0) vagrant-omnibus (1.5.0) vagrant-share (1.1.6, system) vagrant-vbguest (0.13.0) vagrant-vbox-snapshot (0.0.10)

Como ya tengo el plugin vagrant-vbguest, intenta actualizar las VBoxGuestAdditions en centos-7 cuando ve que se instalan diferentes versiones de VBGuestAdditions en el Host 5.0.10 y el huésped 4.3.20.

Incluso he comprobado que existe el enlace simbólico.

[root@build VBoxGuestAdditions]# ls -lrt /usr/lib lrwxrwxrwx. 1 root root 53 Jan 14 12:06 VBoxGuestAdditions -> /opt/VBoxGuestAdditions-5.0.10/lib/VBoxGuestAdditions [root@build VBoxGuestAdditions]# mount -t vboxsf -o uid=1000,gid=1000 vagrant /vagrant /sbin/mount.vboxsf: mounting failed with the error: No such device

Esto no funcionó como lo sugirió el usuario 3006381

vagrant ssh sudo yum -y install kernel-devel sudo yum -y update exit vagrant reload --provision

Solución para centos-7: como lo dio psychok7 trabajado

Autoactualización retrasada. config.vbguest.auto_update = false Entonces config.vbguest.auto_update = false vagrant destroy --force y vagrant up

Resultado:

javareport: Guest Additions Version: 4.3.20 javareport: VirtualBox Version: 5.0 ==> javareport: Setting hostname... ==> javareport: Configuring and enabling network interfaces... ==> javareport: Mounting shared folders... javareport: /vagrant => C:/projects C:/project>


Actualización febrero 2016

Esto me tomó horas para resolver de forma independiente. Sí, este problema todavía existe con las últimas instalaciones de Vagrant y Virtual Box:

△ vagrant -v Vagrant 1.8.1 △ vboxmanage -v 5.0.14r105127

Los síntomas para mí fueron mensajes como:

Checking for guest additions in VM... The guest additions on this VM do not match the installed version of VirtualBox!

seguido por una falla al montar unidades NFS.

1). Instale el plugin vagrant-vbguest .

Dependiendo de la versión de Vagrant que esté utilizando, ejecute uno de los siguientes comandos:

# For vagrant < 1.1.5 $ vagrant gem install vagrant-vbguest # For vagrant 1.1.5+ $ vagrant plugin install vagrant-vbguest

A continuación, vagrant halt , seguido por vagrant up - es probable que todavía tenga problemas.

2). ssh en su invitado y configure un enlace flexible a la versión correcta de Guest Additions (aquí, 5.0.14).

$ vagrant ssh $ sudo ln -s /opt/VBoxGuestAdditions-5.0.14/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions $ exit $ vagrant reload

Deberías estar todo bien. Por defecto, la unidad montada en el invitado está en /vagrant

Comentario final:

Si aún tiene problemas relacionados con el montaje de unidades NFS, aquí hay una solución que funcionó para mí. Tuve un vagrantfile con config algo como:

Simplemente elimine la información de type montaje y reduzca la configuración de mount_options para que funcionen de manera universal. Vagrant ahora elegirá automáticamente la mejor opción de carpeta sincronizada para su entorno.


Fijar paso a paso:

Si no tiene el complemento vbguest, instálelo:

$ vagrant plugin install vagrant-vbguest

Corre vagabundo

Se muestra un error.

$ vagrant up

Iniciar sesión en VM

$ vagrant ssh

¡Fijar!

En el invitado (VM registrado).

$ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

De vuelta en el host, vuelve a cargar Vagrant.

$ vagrant reload