Windows + VirtualBox 5.0 + Vagrant 1.7.3 でエラー(chown: changing ownership of `/vagrant': Not a directory)になる
Oracle VM VirtualBox 5.0 + Vagrant 1.7.3 でchown: changing ownership of `/vagrant': Not a directory のエラーになるんだけど、対処方法がわからない。 教えてください。
現象
Vagrant assumes that this means the command failed! chown `id -u vagrant`:`id -g vagrant` /vagrant Stdout from the command: Stderr from the command: stdin: is not a tty chown: changing ownership of `/vagrant': Not a directory
環境
- Oracle VM VirtualBox 5.0
- Vagrant 1.7.3
- box
- Official Ubuntu 12.04 daily Cloud Image amd64 (VirtualBox 4.1.12)
- https://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
- Guest Additionsが有効になっている
vagrant-vbguest を入れてみたけどダメだった。
http://kashewnuts.bitbucket.org/2013/08/25/vagrantvbguest.html
Guest Additions の Version が古いのが原因らしい。 なので、自動的にGuest Additionsを更新してくれるプラグインを導入。
とあるので、これを試してみた。 vagrant plugin install vagrant-vbguest の後、vagrant upしてみたが、 エラーは変わらず。
clover@NARANJA ~ $ vagrant plugin install vagrant-vbguest Installing the 'vagrant-vbguest' plugin. This can take a few minutes... Installed the plugin 'vagrant-vbguest (0.10.0)'! clover@NARANJA /c/MyVM/ubuntu1204 $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> 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: Forwarding ports... default: 22 => 2222 (adapter 1) ==> 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: Machine booted and ready! GuestAdditions versions on your host (5.0.0) and guest (4.2.0) do not match. stdin: is not a tty Reading package lists... Building dependency tree... Reading state information... The following extra packages will be installed: fakeroot linux-headers-3.2.0-23 patch Suggested packages: diffutils-doc The following NEW packages will be installed: dkms fakeroot linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic patch 0 upgraded, 5 newly installed, 0 to remove and 66 not upgraded. Need to get 12.6 MB of archives. After this operation, 68.2 MB of additional disk space will be used. Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main patch amd64 2.6.1-3 [80.2 kB] Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main dkms all 2.2.0.3-1ubuntu3 [73.1 kB] Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main fakeroot amd64 1.18.2-1 [87.2 kB] Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23 all 3.2.0-23.36 [11.4 MB] Get:5 http://us.archive.ubuntu.com/ubuntu/ precise/main linux-headers-3.2.0-23-generic amd64 3.2.0-23.36 [947 kB] dpkg-preconfigure: unable to re-open stdin: No such file or directory Fetched 12.6 MB in 38s (330 kB/s) Selecting previously unselected package patch. (Reading database ... 51105 files and directories currently installed.) Unpacking patch (from .../patch_2.6.1-3_amd64.deb) ... Selecting previously unselected package dkms. Unpacking dkms (from .../dkms_2.2.0.3-1ubuntu3_all.deb) ... Selecting previously unselected package fakeroot. Unpacking fakeroot (from .../fakeroot_1.18.2-1_amd64.deb) ... Selecting previously unselected package linux-headers-3.2.0-23. Unpacking linux-headers-3.2.0-23 (from .../linux-headers-3.2.0-23_3.2.0-23.36_all.deb) ... Selecting previously unselected package linux-headers-3.2.0-23-generic. Unpacking linux-headers-3.2.0-23-generic (from .../linux-headers-3.2.0-23-generic_3.2.0-23.36_amd64.deb) ... Processing triggers for man-db ... Setting up patch (2.6.1-3) ... Setting up dkms (2.2.0.3-1ubuntu3) ... Setting up fakeroot (1.18.2-1) ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode. Setting up linux-headers-3.2.0-23 (3.2.0-23.36) ... Setting up linux-headers-3.2.0-23-generic (3.2.0-23.36) ... Examining /etc/kernel/header_postinst.d. run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-23-generic /boot/vmlinuz-3.2.0-23-generic Downloading VirtualBox Guest Additions ISO from http://download.virtualbox.org/virtualbox/5.0.0/VBoxGuestAdditions_5.0.0.iso Progress: 100% (Rate: 11.2M/s, Estimated time remaining: --:--:--) Copy iso file D:/vagrant.d/tmp/VBoxGuestAdditions_5.0.0.iso into the box /tmp/VBoxGuestAdditions.iso stdin: is not a tty mount: warning: /mnt seems to be mounted read-only. Installing Virtualbox Guest Additions 5.0.0 - guest version is 4.2.0 stdin: is not a tty Verifying archive integrity... All good. Uncompressing VirtualBox 5.0.0 Guest Additions for Linux............ VirtualBox Guest Additions installer Removing installed version 4.2.0 of VirtualBox Guest Additions... 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 5.0.0. Some functionality may not work as intended. In most cases it is OK that the "Window System drivers" installation failed. stdin: is not a tty Cleaning up downloaded VirtualBox Guest Additions ISO... ==> default: Checking for guest additions in VM... ==> default: Mounting shared folders... default: /vagrant => C:/MyVM/ubuntu1204 The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed! chown `id -u vagrant`:`id -g vagrant` /vagrant Stdout from the command: Stderr from the command: stdin: is not a tty chown: changing ownership of `/vagrant': Not a directory
Guest Additionsが入っていないのは、起動時にエラーはでない。
vagrant sshでログインはできる。
原因
Windows版Vagrantのバグ
- Windows + VirtualBox + Vagrant 1.7.3は正常に動作しません
- Unable to mount /vagrant folder in 1.7.3 #5933
Windowsだけか・・・
対処
- Vargrant 1.7.4が出るまで待つ
- VitatualBox 4.3.30 + Vargrant 1.7.2にダウングレードする
- Guest Additionsが入っていないBoxを使う