I understand correctly

you want to mount "172.31.23.217" into the AWS EC2 Ami.

Can the AMI reach "172.31.23.217" ?

Or I got this wrong?

https://www.vagrantup.com/docs/synced-folders/smb.html#smb_host

On Mon, Aug 13, 2018 at 1:15 PM Dean Egan <[email protected]> wrote:

> Hi Alvaro,
> Thank you for your reply!
> I have been using Vagrant with Virtual Box for a while now and I have no
> trouble with folder syncing.
>
> I used Packer to create an aws box file and use Vagrant to point to the
> box file along with using my custom ami ID.
> Here is the output of my Packer config:
> PS C:\qmi\AWS-base-os> packer build -only=amazon-ebs EC2.json
> amazon-ebs output will be in this color.
> ==> amazon-ebs: Prevalidating AMI Name: cc_QlikSense2
>     amazon-ebs: Found Image ID: ami-9bb358fc
> ==> amazon-ebs: Using existing SSH private key
> ==> amazon-ebs: Creating temporary security group for this instance:
> packer_5b714be2-9d46-f5d5-8cae-b72236b3a7f3
> ==> amazon-ebs: Authorizing access to port 5985 from 0.0.0.0/0 in the
> temporary security group...
> ==> amazon-ebs: Launching a source AWS instance...
> ==> amazon-ebs: Adding tags to source instance
>     amazon-ebs: Adding tag: "Name": "Packer Builder"
>     amazon-ebs: Instance ID: i-0dddecd1c4d7cb0eb
> ==> amazon-ebs: Waiting for instance (i-0dddecd1c4d7cb0eb) to become
> ready...
> ==> amazon-ebs: Skipping waiting for password since WinRM password set...
> ==> amazon-ebs: Waiting for WinRM to become available...
>     amazon-ebs: WinRM connected.
>     amazon-ebs: #< CLIXML
>     amazon-ebs: <Objs Version="1.1.0.1" xmlns="
> http://schemas.microsoft.com/powershell/2004/04";><Obj S="progress"
> RefId="0"><TN
> RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64
> N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first
> use.</AV><AI>0</AI><Nil
> /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD>
> </SD></PR></MS></Obj><Obj S="progress" RefId="1"><TNRef RefId="0"
> /><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for
> first use.</AV><AI>0</AI><Nil
> /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD>
> </SD></PR></MS></Obj></Objs>
> ==> amazon-ebs: Connected to WinRM!
> ==> amazon-ebs: Stopping the source instance...
>     amazon-ebs: Stopping instance, attempt 1
> ==> amazon-ebs: Waiting for the instance to stop...
> ==> amazon-ebs: Creating the AMI: cc_QlikSense2
>     amazon-ebs: AMI: ami-<AMIID>
> ==> amazon-ebs: Waiting for AMI to become ready...
> ==> amazon-ebs: Terminating the source AWS instance...
> ==> amazon-ebs: Cleaning up any extra volumes...
> ==> amazon-ebs: No volumes to clean up, skipping
> ==> amazon-ebs: Deleting temporary security group...
> ==> amazon-ebs: Running post-processor: vagrant
> ==> amazon-ebs (vagrant): Creating Vagrant box for 'aws' provider
>     amazon-ebs (vagrant): Compressing: Vagrantfile
>     amazon-ebs (vagrant): Compressing: metadata.json
> Build 'amazon-ebs' finished.
> ==> Builds finished. The artifacts of successful builds are:
> --> amazon-ebs: AMIs were created:
> eu-west-2: ami<amid>
> --> amazon-ebs: 'aws' provider box: packer_amazon-ebs_aws.box
>
> I manged to get Vagrant to create the SMB folder using the below commands:
> config.vm.synced_folder '.', '/vagrant', disabled: false, type: "smb",
> smb_host: "172.31.23.217", mount_options: ['vers=3.0']
>     config.vm.synced_folder "./files", "c:/installations/", disabled:
> false, type: "smb", smb_host: "172.31.23.217", mount_options: ['vers=3.0']
>     config.vm.synced_folder sharedContentRelativePath,
> "c:/shared-content/", disabled: false, type: "smb", smb_host:
> "172.31.23.217", mount_options: ['vers=3.0']
>
> It created the three folders on the EC2 instance, however when I try to
> open the folders on the EC2 instance, I get the following error:
> "Location is not available. C:\vagrant is not accessible. The network name
> cannot be found"
>
> There are a few scripts and other files in these folders and when the
> provisioner runs, I get an error saying the files don't exist.
> I think the reason that happens is because of the above error.
>
> Would you know why I get these errors?
>
> Kind Regards,
> Dean
>
> On Monday, 13 August 2018 08:43:21 UTC+1, Alvaro Miranda Aguilera wrote:
>
>> Hello.
>>
>> Assuming you are using vagrant-aws plugin, I would suggest you first
>> locally.
>>
>> If you could find a Windows box on vagrant cloud and use virtualbox, so
>> you can confirm what you want to do works, then on AWS should be
>> straightforward.
>>
>> It may due the box in AWS have some restriction or firewalls.
>>
>> Alvaro.
>>
>> On Thu, Aug 9, 2018 at 7:39 PM Dean Egan <[email protected]> wrote:
>>
>>> Hello,
>>>
>>> I am having severe hardship using Vagrant to sync folders from my
>>> Windows 10 host machine to my Windows Ec2 instance using SMB and I would
>>> really apricate any guidance on this!
>>> In the Vagrant file, I have:
>>> config.vm.synced_folder '.', '/vagrant', disabled: false, type: "smb",
>>> smb_host: "My_Company's Domain_Name/My_Public_IP", mount_options:
>>> ['vers=3.0']
>>> When I run Vagrant up, it says I will be asked for my username password
>>> of my account.
>>> I have researched this and it says the username is the account you are
>>> logged in to your machine as (which is "admin"). It then said if I am using
>>> a Domain, then the username is username@domain
>>>
>>> It eventually throws the following error:
>>> The following WinRM command responded with a non-zero exit status.
>>> Vagrant assumes that this means the command failed!
>>>
>>> cmdkey /add:Company'sDomain/My_Public_IP /user:admin@company's_domain
>>> /pass:*****
>>> Stdout from the command:
>>>
>>> CMDKEY: The parameter is incorrect.
>>>
>>>
>>> Can someone please tell me how I am configuring this wrong?
>>>
>>> Kind Regards,
>>> Dean
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/vagrant/issues
>>> IRC: #vagrant on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Vagrant" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/vagrant-up/d8c7b478-3dfc-4c31-9e29-ffde727b36db%40googlegroups.com
>>> <https://groups.google.com/d/msgid/vagrant-up/d8c7b478-3dfc-4c31-9e29-ffde727b36db%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Alvaro
>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/vagrant/issues
> IRC: #vagrant on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vagrant-up/75dac45b-4d05-401c-8151-30d4755c8217%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/75dac45b-4d05-401c-8151-30d4755c8217%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Alvaro

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewey_ju_z%2BwhCWuzQPFE2H2e9Z9Ka57%3DbjFwwk%2BAUUTwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to