我正在创建一个 Windows Server 2012 的 vagrant base box,我想在内部共享它,我正在使用 Vagrant http share 和以下命令
流浪者分享--http 80
C:\Isentia\Vagrant>vagrant share --http 80
==> dev: Detecting network information for machine...
dev: Local machine address: 169.254.202.14
dev: Local HTTP port: 80
dev: Local HTTPS port: disabled
==> dev: Checking authentication and authorization...
==> dev: Creating Vagrant Share session...
dev: Share will be at: caring-dragon-2751
==> dev: Your Vagrant Share is running! Name: caring-dragon-2751
==> dev: URL: http://caring-dragon-2751.vagrantshare.com
并在另一台机器上访问带有 vagrant up 的盒子
C:\Isentia\DevVM>vagrant init http://caring-dragon-2751.vagrantshare.com:80
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
C:\Isentia\DevVM>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'http://caring-dragon-2751.vagrantshare.com:80' could not be fo
und. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'http://caring-dragon-2751.vagrantshare.com:80' (v0) for
provider: virtualbox
default: Downloading: http://caring-dragon-2751.vagrantshare.com:80
default: Progress: 0% (Rate: 0curl:/s, Estimated time remaining: --:--:--)
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The requested URL returned error: 500 Internal Server Error
以下是流浪文件内容
Vagrant.configure(2) do |config|
config.vm.box = "BuzzNumberDevBox"
config.vm.guest = :windows
config.vm.communicator = "winrm"
config.vm.boot_timeout = 600
config.vm.graceful_halt_timeout = 600
# Admin user name and password
config.winrm.username = "vagrant"
config.winrm.password = "vagrant"
config.vm.define "dev" do |dev|
dev.vm.network "private_network", ip: "192.168.100.10"
dev.vm.host_name = "vagranttests.dev"
dev.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
end
config.vm.provider :virtualbox do |vb|
# Customize the name of VM in VirtualBox manager UI:
vb.name = "BuzzNumber-Dev-VM-Web"
end
end
我不明白的是什么可能会阻止它从任何机器上访问。该文档要求直接使用该链接。