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