Hello Christopher.

What you can do, is use the IDE controller for your iso, so you will now is
always IDE.

However, you may hit the same issue,

depening on the OS where the box was created, it could be

SATA Controller or SATA

so maybe the ide would be

IDE Controller vs IDE

If the box is linux, you should be able to mount the iso just fine.

Do a shared folder to path/to/

then on the OS:

mkdir -p /mnt/dvd
mount -o loop,ro /path/file.iso /mnt/dvd

<magic>

umount /mnt/dvd

Hope this helps
Alvaro.


On Tue, Feb 2, 2016 at 11:43 AM, Christopher <[email protected]>
wrote:

> Hi all,
>
> I'm looking to make my vagrant file idempotent and almost have it.
> However, when I run *vagrant up --provision* on a machine that has
> already been created, I get an error about my SATA storage controller.  To
> avoid this, I have to manually delete the controller in Virtualbox and run
> the command again.  Removing my SATA controller is ok because it is only
> used to host ISO files that I am accessing directly to install some
> software.
>
> Is this even possible?  I'd like to make my provision a little smarter in
> case I have to force provision an already created machine.  Here's my
> provider config below:
>
> config.vm.provider "virtualbox" do |vb|
>     # Display the VirtualBox GUI when booting the machine
>     vb.gui = true
>
>     # Customize the amount of memory on the VM:
>     vb.memory = 4096
>
>     # Customize the amount of CPUs the VM will use:
>     vb.cpus = 2
>     vb.customize ["modifyvm", :id, "--vram", "128"]
>     vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
>     # Customize additional Virtualbox settings
>     vb.customize ["sharedfolder", "add", :id, "--name", "VM_Share",
> "--hostpath", "path/to/share/folder/", "--automount"]
>
>
>     #below commented SATA customize will only work when the VM has
> already been created...on a fresh run this will error since the SATA
> controller does not exist
>     #vb.customize ["storagectl", :id, "--name", "SATA", "--remove" ]
>     vb.customize ["storagectl", :id, "--name", "SATA", "--add", "sata" ]
>
>
>     # Add an ISO file here
>     vb.customize ["storageattach", :id, "--storagectl", "SATA", "--port",
> "0", "--device", "0", "--type", "dvddrive", "--medium", "path/to/file.iso"
> ]
>
>
>     # Add another ISO file here
>     vb.customize ["storageattach", :id, "--storagectl", "SATA", "--port",
> "1", "--device", "0", "--type", "dvddrive", "--medium", "path/to/file.iso"
> ]
>   end
>
> Thanks in advance,
>
> Christopher
>
> --
> 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/890ada33-53a2-4950-bdf9-72c951193c32%40googlegroups.com
> <https://groups.google.com/d/msgid/vagrant-up/890ada33-53a2-4950-bdf9-72c951193c32%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAHqq0ewVJN3q2bq4y5S1gf9QYvXOs8qU6GRYFAY1CPsoCYKO%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to