私の Macbook では、VirtualBox+Vagrant を使用しています。Vagrant の場合、Wordpress といくつかの Puppet スクリプトを含む Vagrantfile である VagrantPress (vagrantpress.org から) をダウンロードしました。次のようになります。
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "base"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "puppet/manifests"
puppet.module_path = "puppet/modules"
puppet.manifest_file = "init.pp"
puppet.options="--verbose --debug"
end
end
最初は、これは意図したとおりに実行されていました (localhost での Wordpress インストールの表示) が、私は Dropbox サブディレクトリにインストールしており、Ubuntu を実行している別のコンピューターで動作させようとしているときに、何かを変更した可能性がありますセットアップ全体を壊しました。
今、私の macbook で「Vagrant up」を実行すると (以前はうまく動作していました)、次のように表示されます。
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 80 => 8080 (adapter 1)
[default] Booting VM...
GuestAdditions versions on your host (4.2.18) and guest (4.1.12) do not match.
Reading package lists...
Building dependency tree...
Reading state information...
dkms is already the newest version.
dkms set to manually installed.
linux-headers-3.2.0-54-generic is already the newest version.
linux-headers-3.2.0-54-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
mount: warning: /mnt seems to be mounted read-only.
Installing Virtualbox Guest Additions 4.2.18 - guest version is 4.1.12
Verifying archive integrity... All good.
Uncompressing VirtualBox 4.2.18 Guest Additions for Linux............
VirtualBox Guest Additions installer
You appear to have a version of the VBoxGuestAdditions software
on your system which was installed from a different source or using a
different type of installer. If you installed it from a package from your
Linux distribution or if it is a default part of the system then we strongly
recommend that you cancel this installation and remove it properly before
installing this version. If this is simply an older or a damaged
installation you may safely proceed.
Do you wish to continue anyway? [yes or no]
Cancelling installation.
An error occurred during installation of VirtualBox Guest Additions 4.2.18. Some functionality may not work as intended.
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
[default] The guest additions on this VM do not match the installed version of
VirtualBox! In most cases this is fine, but in rare cases it can
cause things such as shared folders to not work properly. If you see
shared folder errors, please update the guest additions within the
virtual machine and reload your VM.
Guest Additions Version: 4.1.12
VirtualBox Version: 4.2
[default] Mounting shared folders...
[default] -- /vagrant
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
そしてChromeのlocalhostは「データが受信されていません」と言います。その後、「Vagrant ssh」して実行しました:
curl 'http://localhost/'
そして得る:
cURL Error (7): couldn't connect to host ...
私はこれを何日も修正しようとしています。Vagrant と VirtualBox を再インストールしようとしましたが、うまくいきませんでした。また、Guest Additions を手動で更新しようとしましたが (これは以前は必要ありませんでしたが)、「GuestAdditions 4.2.18 running --- OK」を取得した後です。VM を起動した後も、localhost で同じエラーが発生します。私は何を間違っていますか?