I am trying to create a windows 2008r2 server in AWS through Vagrant.
I am facing 2 issues:
1. While doing vagrant up, it always asks me for the credentials which i don't want to provide manually.==> default: Preparing SMB shared folders... default: You will be asked for the username and password to use for the SMB default: folders shortly. Please use the proper username/password of your default: Windows account.
2. While trying to run chef-solo, it always throws below error:default: Mounting SMB shared folders... default: C:/opstools/vagrant-repo => /vagrant The following WinRM command responded with a non-zero exit status. Vagrant assumes that this means the command failed! cmdkey /add:fe80::100:7f:fffe%11 /user:Administrator /pass:XXXXXXXXXXX Stdout from the command: Stderr from the command:
For reference I am posting my vagrant file and the debug logs.
Vagrantfile:
`# -- mode: ruby --
Vagrant.configure("2") do |config|
###################################################
config.vm.provider :aws do |aws, override|
aws.access_key_id = "XXXXXXXXXXXX" # "#{ENV['AWS_KEY']}"
aws.secret_access_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" # "#{ENV['AWS_SECRET']}"
aws.keypair_name = "identityuse1_pre_prod-terraform_web"
aws.ami = "ami-5xx7xxxx"
aws.region = "us-east-1"
aws.instance_type = "t2.micro"
aws.subnet_id = "subnet-fxxxxxxxxxx"
aws.security_groups = ['sg-bxxxxxx','sg-1e2xxxxxxx'] # my windows VPC security group
aws.tags = {
'Name' => 'AWS Windows Vagrant Test instance', #Change as appropriate
'Description' => 'AWS Windows Vagrant Test instance on 16 dec 2016' # Change as appropriate
}
Hi Team,
I am trying to create a windows 2008r2 server in AWS through Vagrant.
I am facing 2 issues:
1. While doing vagrant up, it always asks me for the credentials which i don't want to provide manually.
==> default: Preparing SMB shared folders... default: You will be asked for the username and password to use for the SMB default: folders shortly. Please use the proper username/password of your default: Windows account.
2. While trying to run chef-solo, it always throws below error:
default: Mounting SMB shared folders... default: C:/opstools/vagrant-repo => /vagrant The following WinRM command responded with a non-zero exit status. Vagrant assumes that this means the command failed! cmdkey /add:fe80::100:7f:fffe%11 /user:Administrator /pass:XXXXXXXXXXX Stdout from the command: Stderr from the command:
For reference I am posting my vagrant file and the debug logs. Vagrantfile:
`# -- mode: ruby -- Vagrant.configure("2") do |config| ###################################################
Start here
###################################################
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.communicator = 'winrm' config.winrm.username = 'Administrator' config.winrm.password = 'XXXXXXXXXXXXX'
config.vm.provider :aws do |aws, override| aws.access_key_id = "XXXXXXXXXXXX" # "#{ENV['AWS_KEY']}" aws.secret_access_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" # "#{ENV['AWS_SECRET']}" aws.keypair_name = "identityuse1_pre_prod-terraform_web" aws.ami = "ami-5xx7xxxx" aws.region = "us-east-1" aws.instance_type = "t2.micro" aws.subnet_id = "subnet-fxxxxxxxxxx" aws.security_groups = ['sg-bxxxxxx','sg-1e2xxxxxxx'] # my windows VPC security group
aws.tags = { 'Name' => 'AWS Windows Vagrant Test instance', #Change as appropriate 'Description' => 'AWS Windows Vagrant Test instance on 16 dec 2016' # Change as appropriate }
override.vm.box = "dummy"
override.nfs.functional = false
override.winrm.username = "Administrator"
override.winrm.password = 'XXXXXXXXXXXXXX' #"#{ENV['ADM_PSWD']}"
override.vm.communicator = :winrm
end
config.vm.provision :chef_solo do |chef| chef.add_recipe 'helloworld::default' chef.file_cache_path = 'C:/var/chef/cache' chef.cookbooks_path = 'C:/chef/cookbooks' end
end `