在Windows-> EC2-> Windows上运行Vagrant Headless

我们使用EC2插件在Windows上运行Vagrant来启动一个Windows机器。

运行我们的Vagrant文​​件时,系统会提示您input我们的SMB共享用户名/密码。

我们如何编辑我们的Vagrant文​​件或添加命令行开关来抑制这种用户交互?

我们的stream浪汉命令是vagrant up --provider=aws

我们的stream浪文件如下

 Vagrant.configure("2") do |config| config.vm.box = "dummy" config.vm.guest = :windows config.vm.network :forwarded_port, guest: 3389, host: 3389 config.vm.network :forwarded_port, guest: 22, host: 22 config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true config.ssh.username = "user" config.ssh.password = "password" config.ssh.insert_key = false config.vm.provider :aws do |aws, override| aws.access_key_id = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" aws.secret_access_key = "KKKKKKKKKKKKKKKKKKKKKK" aws.ami = "ami-i866gft" end end 

也许你有一个不同的方式与流浪工作。 这适用于我的情况没有任何交互:

 Vagrant.configure("2") do |config| config.vm.box = "dummy.box" config.vm.synced_folder '.', '/vagrant', disabled: true config.vm.provider :aws do |aws, override| aws.access_key_id = "XXXX" aws.secret_access_key = "XXXX" aws.ami ="ami-f2f5f9ef" aws.security_groups = ['instance-name-on-aws'] aws.keypair_name = "ssh_key_name" override.ssh.username = "user" override.ssh.private_key_path = "ssh_key_name.pem" aws.instance_type = "t2.micro" aws.region = "region" end end