Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Hongde Liu
    @enginespot
    :)
    Hongde Liu
    @enginespot
    hmm...
    Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
    Mounting Virtualbox Guest Additions ISO to: /mnt
    mount: /mnt: WARNING: device write-protected, mounted read-only.
    Installing Virtualbox Guest Additions 6.0.10 - guest version is 6.0.6
    Verifying archive integrity... All good.
    Uncompressing VirtualBox 6.0.10 Guest Additions for Linux........
    VirtualBox Guest Additions installer
    Copying additional installer modules ...
    Installing additional modules ...
    VirtualBox Guest Additions: Starting.
    VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel 
    modules.  This may take a while.
    VirtualBox Guest Additions: To build modules for other installed kernels, run
    VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
    VirtualBox Guest Additions: or
    VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
    VirtualBox Guest Additions: Building the modules for kernel 5.0.0-25-generic.
    update-initramfs: Generating /boot/initrd.img-5.0.0-25-generic
    cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries 
        nor crypto modules. If that's on purpose, you may want to uninstall the 
        'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs 
        integration and avoid this warning.
    Unmounting Virtualbox Guest Additions ISO from: /mnt
    ==> default: Checking for guest additions in VM...
    ==> default: Mounting shared folders...
        default: /vagrant => /Users/i/demo
        default: /projects => /Users/i/demo/projects
    ```
    Hongde Liu
    @enginespot
    the error still exist :(
    Ben Johnson
    @cbj4074
    @enginespot :confounded: Maybe the next thing to try is downgrading to VirtualBox 6.0.4. This guy's comment sounds very relevant: https://www.virtualbox.org/ticket/18569#comment:5
    Hongde Liu
    @enginespot
    :) , ok , I will try to downgrading to 6.0.4:(
    Hongde Liu
    @enginespot
    Thanks @cbj4074 very much:)
    Ben Johnson
    @cbj4074
    @enginespot No problem, let us know if that fixes it!?
    Ben Johnson
    @cbj4074
    @enginespot Any joy?
    Ben Johnson
    @cbj4074

    Does anybody happen to know why when I add the following to my Vagrantfile, the credentials seem to be ignored?

    config.vm.synced_folder "../data", "/vagrant_data", mount_options: ["username=HyperV","password=secret"]

    I'm still prompted for the credentials upon provisioning.

    I realize that this is a "legacy" notation, but, unfortunately, I appear to be forced to use it due to the conditions I describe in https://github.com/hashicorp/vagrant/issues/6311#issuecomment-527958212
    What I find so strange is that if I omit the mount_options altogether, and simply enter my credentials when prompted, mounting fails! So, what is it about providing these mount options that allows mounting to work correctly, even though I'm still prompted for them? The behavior makes no sense at all.
    Ben Johnson
    @cbj4074
    :laughing: Yeah, Vagrant totally ignores the credentials I enter on the CLI when prompted and uses the ones in the Vagrantfile. So why ask for them???
    Hongde Liu
    @enginespot
    Hi @cbj4074 I did not use VirtualBox , I will try to test it in recent days:)
    Ben Johnson
    @cbj4074
    @enginespot :thumbsup:
    Michael C.
    @sk1u
    Hi All! I had a best practices question.
    I use vagrant + virtualbox to test my ansible playbooks locally.
    Do you normally commit Vagrantfile and .vagrantinto the same repo as the ansible setup?
    Ben Johnson
    @cbj4074
    @sk1u You should definitely commit Vagrantfile, but I don't believe there's any reason to commit .vagrant.
    (as the latter would simply be recreated upon vagrant up)
    Provider-specific information resides in .vagrant, and your end-user may be using a different provider, for example.
    Michael C.
    @sk1u
    so anyone else whom would like to use my Vagrantfile, would still need to init their own .vagrant with vagrant init ?
    Ben Johnson
    @cbj4074
    Yep
    Michael C.
    @sk1u
    i guess vagrant init will not overwrite the Vagrantfile they're supposed to be using.
    Ben Johnson
    @cbj4074

    That's correct. From the docs:

    creating an initial Vagrantfile if one does not already exist.

    Michael C.
    @sk1u
    Thank you :)
    Ben Johnson
    @cbj4074
    In fact, I'm not even sure init is necessary. I think they can just vagrant up.
    Jopacari
    @Jopacari
    Hi :)
    I found an issue with the vagrant salt provisioner
    When provisioning salt on a windows server it fails to download the installer.
    This is happening because the bootstrap is in powershell language that use TLS1.0 by default
    Salt changed the repos to only allow TLS1.2 since a few days ago.
    Salt team had the same issue with their bootstrap a few months ago and they rolled back the move to TLS1.2 by that time.
    They fixed their bootstrap and now they are enforcing TLS1.2 again.
    Jopacari
    @Jopacari
    I locally fixed the vagrant bootstrap easily using the same approach they used.
    What will be the next step to contribute?
    This issue should be preventing vagrant salt provisioning of any windows servers - I know that just a few people deal with salt on windows but still, it is currently broken.
    Comments?
    Jopacari
    @Jopacari
    ?
    Ben Johnson
    @cbj4074
    @Jopacari Seems appropriate to open an Issue on the GitHub tracker if no such issue exists.
    (or just fix it yourself and propose a PR)

    Unrelated, I'm wrestling with an issue, too... I'm attempting to execute Powershell commands during provisioning (on a Windows host, obviously), but it seems like Vagrant treat it as a shells script and runs it against the guest.

    Vagrantfile snippet:

    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
        config.trigger.after :reload do |trigger|
            config.vm.provision "shell", privileged: "true", powershell_elevated_interactive: "true", inline: <<-SHELL
    
            Get-VM "homestead" | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName "NATSwitch"
    
            SHELL
        end
    end

    When the provisioner gets this far, the output is:

    ==> homestead: Running provisioner: shell...
        homestead: Running: inline script
        homestead: /tmp/vagrant-shell: line 2: Get-VM: command not found
        homestead: /tmp/vagrant-shell: line 2: Get-VMNetworkAdapter: command not found
        homestead: /tmp/vagrant-shell: line 2: Connect-VMNetworkAdapter: command not found
    The SSH command responded with a non-zero exit status. Vagrant
    assumes that this means the command failed. The output for this command
    should be in the log above. Please read the output to determine what
    went wrong.
    Jopacari
    @Jopacari
    @cbj4074 Can you please just try to use this instead:
    inline: "Get-VM 'homestead' | Get-VMNetworkAdapter | Connect-VMNetworkAdapter -SwitchName 'NATSwitch'"
    Just to see if it works
    If I have the oportunity I will try your approach to see if I get the same error.
    Ben Johnson
    @cbj4074
    @Jopacari Hey, thanks for taking a look. I meant to follow-up yesterday... it was entirely my bad, the documentation makes it clear that inline scripts are always executed on the guest. I ended-up doing this, and it works:
        config.trigger.before :reload do |trigger|
            trigger.info = "Setting Hyper-V switch to 'NATSwitch' now that static IP is configured in VM..."
    
            trigger.run = {privileged: "true", powershell_elevated_interactive: "true", path: "./scripts-custom/resources/utility-scripts/set-hyperv-switch.ps1"}
        end
    Ben Johnson
    @cbj4074
    I'm finding it surprisingly difficult to determine whether or not it's possible to call certain provisioning scripts in the Vagrantfile depending on the provider that is in use. This seems like much-needed functionality but doesn't appear to be possible.

    Currently, I'm setting an environment variable in the host OS and doing something like this, which feels super hacky:

    if ENV['VAGRANT_PROVIDER'] == 'hyperv'

    Obviously, if this is not set or if it's set to a different provider than the one I'm actually using, it won't function reliably.

    Ben Johnson
    @cbj4074
    Actually, config.vm.provider "hyperv" do |hyperv| ...end does seem to work, yet I notice that the content of that block seems to be executed at the very end of the provisioning process, despite appearing near the top of the Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| ... end block.
    Ahh, and it is run every time the machine is booted, not just during provisioning. So, I suppose my original question still stands.
    Sai K K
    @saikksub
    Can we install vagrant in silent mode?