Vagrant-Fehler: Fehler beim Mounten von Ordnern in Linux-Gast
Ich habe einige Probleme mit Vagrant freigegebene Ordner, mein Basissystem ist Ubuntu 13.10 desktop.
Verstehe ich nicht, warum ich diese Fehlermeldung ist etwas, das ist nicht richtig konfiguriert ? Ist ein NFS-Problem oder Virtualbox Guest Additions ? Ich habe versucht, mit verschiedenen viele Boxen, aber das gleiche Problem.
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
Hier ist der komplette Prozess nach 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
Meine Vagrantfile Konfiguration :
# -*- 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
Personalisierung Datei :
# 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"
Folgende plugins sind aktiviert 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)
InformationsquelleAutor der Frage Ek Kosmos | 2014-03-28
Du musst angemeldet sein, um einen Kommentar abzugeben.
Den plugin-Landstreicher-vbguest mein problem gelöst:
Ausgabe:
Nur sicherstellen, dass Sie die neueste version von VirtualBox
InformationsquelleAutor der Antwort karlingen
Fand ich dieses Thema hier angesprochen vagrant Probleme. Zwei Möglichkeiten, es zu tun:
Führen Sie diese auf-Gast (d.h. nachdem Sie ssh in vbox über
vagrant ssh
)Führen
vagrant reload
richtig zu mounten, die Ordner.Als @klang wies darauf hin, aktualisieren Sie die VBoxGuestAdditions.iso -Datei auf Ihrem mac:
UPDATE (16may2014)
Da die iso nicht mehr verfügbar ist, können Sie mit der 4.3.12 (http://dlc.sun.com.edgesuite.net/virtualbox/4.3.12/VBoxGuestAdditions_4.3.12.iso)
Hinweis : die binäre vbox4.3.12 für os X ist zur Zeit nicht verfügbar
InformationsquelleAutor der Antwort kenzie
Kam ich auf diese Seite während der Suche für die gleiche Fehlermeldung.
Für mich war die Ursache: ich hatte lief
yum update
auf dem system installiert den neuen kernel. Die guest additions, wo die out-of-date, also kann es nicht laden.Ich neu aufgebaut mit
Und ein
vagrant reload
später mein Gast war und läuft wieder.Bin ich nur hinzufügen, dass es hier in den Fall, dass jemand anderes kommt hier das gleiche, wie ich es Tat.
Bearbeiten (Pro KCD-Kommentar):
Es ist möglich, dass Sie eine Fehlermeldung erhalten, sagen:
Dieses Problem kann behoben werden durch die Installation
kernel-devel
(yum install kernel-devel
)InformationsquelleAutor der Antwort Blizz
Update Schritt für Schritt:
Wenn Sie nicht haben vbguest plugin installieren:
Ausführen Vagrant
Wird es zeigen eine Fehlermeldung.
Login auf VM
Fix!
In der Gast VM (angemeldet).
Zurück auf den host Vagrant reload
InformationsquelleAutor der Antwort Dadaso Zanzane
Update Februar 2016
Dies hat mich Stunden zu lösen unabhängig. Ja, dieses problem existiert noch mit den neuesten Vagrant und Virtual Box installiert:
Die Symptome waren für mich die Nachrichten so etwas wie:
Checking for guest additions in VM... The guest additions on this VM do not match the installed version of VirtualBox!
gefolgt durch einen Fehler beim mounten von NFS Laufwerken.
1). Installieren Sie die
vagrant-vbguest
plugin.Je nach version von Vagrant, die Sie verwenden, führen Sie einen der folgenden Befehle:
Als Nächstes tun
vagrant halt
gefolgt vonvagrant up
- die Chancen sind, haben Sie immer noch Probleme.2). ssh in Ihrem Gast-und setup ein soft-link auf die richtige version der Guest Additions (hier 5.0.14).
Sollten Sie alles gut. Standardmäßig, wird das bereitgestellte Laufwerk Gast bei
/vagrant
Letzter Kommentar:
WENN Sie immer noch Probleme mit mounten von NFS Laufwerken ist, dann ist hier ein workaround, der für mich gearbeitet. Ich hatte eine
vagrantfile
mit config etwas wie:Entfernen Sie einfach die Halterung geben Informationen und Verschlankung der mount_options Einstellungen, damit Sie funktionieren universell. Vagrant wird nun automatisch wählen Sie die beste synchronisiert Ordner-option für Ihre Umgebung.
InformationsquelleAutor der Antwort arcseldon
Installieren Sie die vagrant-vbguest plugin mit dem folgenden Befehl:
InformationsquelleAutor der Antwort ngonidzashe
Erlebte ich das gleiche Problem mit Centos 7, ich nehme an, aufgrund eines veralteten kernel in Kombination mit einer aktualisierten version von VirtualBox. Basierend auf Blizz update, das ist was für mich gearbeitet (vagrant-vbguest plugin bereits installiert):
InformationsquelleAutor der Antwort user3006381
Für mich, mit VBoxGuestAdditions 5.1.20, das problem war, dass
/sbin/mount.vboxsf
spitz an der falschen Stelle.sudo ln -sf /opt/VBoxGuestAdditions-5.1.20/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf
fixiert es für mich
InformationsquelleAutor der Antwort bartv
Wie bereits in Vagrant Ausgabe #3341 das war ein Virtualbox Fehler #12879.
Es wirkt sich nur auf VirtualBox 4.3.10 und war ganz Fix in 4.3.12.
InformationsquelleAutor der Antwort tsusanka
Ich glaube, das ist der aktuellste Antwort jetzt und es funktionierte für mich (
Guest Additions Version: 5.0.6
VirtualBox Version: 4.3.16
Ubuntu 14.04 LTS
)https://github.com/mitchellh/vagrant/issues/3341#issuecomment-144271026
Grundsätzlich habe ich sagt:
InformationsquelleAutor der Antwort psychok7
Nur für die Zukunft, dieses problem mit mir geschehen, mit Vagrant 1.7.4 und VirtualBox 5.0.10 r104061, wenn ich bereitgestellt ist, einen freigegebenen Ordner in
/
und erstellt einen symbolischen link von meinem home-Ordner. So etwas wie dieses:Offenbar, dieser Vorgang ist nicht zulässig, durch die Wandernden wegen der Sicherheit und wirft den beschriebenen Fehler.
Ich löste es, indem die Bereitstellung der gewünschten Ordner direkt auf mein home-Verzeichnis, wie
/home/vagrant/folder
.InformationsquelleAutor der Antwort Matheus Portela
In meinem Fall auf einem zuvor Ubuntu 16.04 Bild, der Fehler begann, nachdem die Installation von vagrant-vbguest für einen anderen Gast-abbild, und starten Sie dann die Ubuntu-VM. Es verbessert die guest additions zu 5.1.20, und da dann die mounts begann zu scheitern. Aktualisiert die box, apt update + upgrade und die gleichen, vbguest installieren Sie die neuere version 5.1.20.
Es wurde gelöst, indem manuell ausgeführt werden:
Und auch deaktivieren:
config.vbguest.auto_update = false
für diese VM (vielleicht nicht notwendig).
InformationsquelleAutor der Antwort Nico
(aus meinem Kommentar oben)
Folgenden das problem auf seine Wurzeln: , speziell den Teil in den Kommentaren sagen:
Danach habe ich business as usual mit alle meine virtuellen Maschinen (und Ihre aktuellen Vagrantfiles, natürlich)
Wenn Sie etwas tun muss, um in einer neu erstellten virtuellen Maschine, damit es funktioniert, ist etwas falsch.
InformationsquelleAutor der Antwort klang
In der Konfiguration auf dem windows host und linux als Gast fand ich die Lösung des gleichen Problems in anderen Ort.
Also nochmal, die Fehlermeldung war "Fehler beim mounten von Ordnern im Linux-guest ist. Dies ist in der Regel, weil die "vboxsf" Dateisystem ist nicht verfügbar." (...)
Dies verursacht wurde, da habe ich einen Fehler gemacht haben, indem Sie tun, symlink innerhalb des Gast-Systems aus /vagrant in /home/vagrant/vagrant. Der Punkt ist, dass das Verzeichnis /vagrant ist ein normaler linux-Verzeichnis mit einem symlink (also alles ok), aber beim Booten durch "vagrant up", versucht er zu mounten windows-Verzeichnis auf diesem Ort, und windows-Verzeichnis nicht funktionieren, da ein symlink. Windows host unterstützt keine linux-symlinks.
Also, was können Sie dann tun, ist, um ssh zu Gast, den symbolischen Link entfernen, wo immer Sie es haben, und laden Maschine.
In meiner Konfiguration war es: Vagrant 1.7.2, VBoxGuestAdditions 4.3.28 und VBox 4.3.28.
InformationsquelleAutor der Antwort BartoszK
Dies ist 2017. Nur für den Fall jemand mit den gleichen Problem.
Für bento - /centos-6.7, war ich immer die gleichen Fehler. Das wurde gelöst durch das hinzufügen von plugin-Landstreicher-vbguest (0.13.0).
c:> vagrant plugin install vagrant-vbguest
Feld url: http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box
Dieser centos-7-version gab mir die gleichen Fehler
Fehler:
Meine Konfiguration:
Da ich schon Landstreicher-vbguest plugin, es versucht zu aktualisieren, die VBoxGuestAdditions in centos-7, wenn er sieht andere version von VBGuestAdditions sind installiert in den Host-5.0.10 und Gast 4.3.20.
Ich habe sogar überprüft, dass die symbolische Verbindung vorhanden ist.
Funktionierte dies nicht wie vorgeschlagen von user3006381
Lösung für centos-7: wie psychok7 gearbeitet
Diabled autoupdate.
config.vbguest.auto_update = false
Dann
vagrant destroy --force
undvagrant up
Ergebnis:
InformationsquelleAutor der Antwort samarjit samanta
Ihre log beschwert sich über nicht finden exportfs:
sudo: /usr/bin/exportfs: command not found
Den Befehl exportfs macht lokale Verzeichnisse für NFS-clients gemountet.
InformationsquelleAutor der Antwort kenzie
Scheint dies aufgrund einer Inkompatibilität mit dem vbguest vagrant plugin und die neueste version(en) von vagrant. Es versucht, zu aktualisieren, die guest additions und dann nicht zu tun, es vollständig/richtig.
InformationsquelleAutor der Antwort Hickeroar
Versuchen wie es:
In Vagrantfile hinzufügen:
Run:
InformationsquelleAutor der Antwort user8034098
Ich war Gast mit VirtualBox 5.1.X, und musste ein downgrade auf VirtualBox 5.0.40, und installieren Sie die vbguest plugin um dieses problem zu lösen.
Meine Schritte waren:
vagrant up
für mein vagrant. Es werde scheitern.vagrant plugin install vagrant-vbguest
während meiner VM ausgeführt wird, installieren Sie die vagrant plugin. Diese verwaltet die Synchronisierung VirtualBox-Guest-Versionen zwischen host und Gast.vagrant reload
neu laden meiner virtuellen MaschineInformationsquelleAutor der Antwort Brad Parks
mittlerweile die Montage-arbeiten auf einigen Rechnern (ubuntu) und einige nicht (centos 7)
aber bei der Installation das plugin löst es
zimmerreserviereung, ohne das Sie irgendetwas anderes tun, oben auf, dass, nur
InformationsquelleAutor der Antwort George Mogilevsky
Einen weiteren Schritt hatte ich abgeschlossen, nachdem der erste Vorschlag, dass kenzie gemacht war, laufen die
mount
- Befehle aufgeführt, die in der Fehlermeldung mitsudo
von der Ubuntu-Befehlszeile [14.04 Server]. Danach war alles gut gehen!InformationsquelleAutor der Antwort Yossarian