Я использовал vagrant на Linux CentOS для создания виртуальных машин Windows Server 2012, сейчас я получил этот Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.define "MACHINE" do |db|
db.vm.box = "win2k12r2en"
db.vm.network "public_network", bridge: "p1p1", ip: "130.103.97.40", netmask: "255.255.252.0"
db.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 2
vb.name = "MACHINE"
end
db.vm.provision :file, source: '/home/vagrant/ambientes/machine/shell/Install.ps1', destination: "/tmp/"
db.vm.provision :file, source: '/home/vagrant/ambientes/machine/shell/Lib-General.ps1', destination: "/tmp"
db.vm.provision :file, source: '/home/vagrant/ambientes/machine/shell/continue.bat', destination: "/tmp"
db.vm.provision :file, source: '/home/vagrant/ambientes/machine/shell/PHP_ZEND.zip', destination: "/tmp"
end
end
После запуска скрипта я получил эту ошибку:
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
mkdir / -force
Stdout from the command:
Stderr from the command:
#< CLIXML
<Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><S S="Error">mkdir : The path is not of a legal form._x000D__x000A_</S><S S="Error">At line:1 char:40_x000D__x000A_</S><S S="Error">+ $ProgressPreference='SilentlyContinue';mkdir / -force_x000D__x000A_</S><S S="Error">+ ~~~~~~~~~~~~~~_x000D__x000A_</S><S S="Error"> + CategoryInfo : InvalidArgument: (C:\:String) [New-Item], Argume _x000D__x000A_</S><S S="Error"> ntException_x000D__x000A_</S><S S="Error"> + FullyQualifiedErrorId : CreateDirectoryArgumentError,Microsoft.PowerShel _x000D__x000A_</S><S S="Error"> l.Commands.NewItemCommand_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>
¿Что я делаю не так? Я новичок в vagrant, я следовал этому руководству . Спасибо за ваше время.