Giter Club home page Giter Club logo

Comments (2)

mwrock avatar mwrock commented on July 30, 2024

thats right. This was also mentioned in #11. The main reason for doing this is there was that I was running into issues where things would intermittently break when uploading the guest additions. I did not really need them for my purposes at the time but it would be good to include them.

from packer-templates.

MattHodge avatar MattHodge commented on July 30, 2024

https://github.com/dotless-de/vagrant-vbguest may be a soltuion but seems broken with Windows currently.

Can use the following in config.vm.provision "shell":

if (-not(Test-Path -Path 'C:\Program Files\Oracle\VirtualBox Guest Additions'))
{
    $url = 'http://download.virtualbox.org/virtualbox/5.0.4/VBoxGuestAdditions_5.0.4.iso'
    $downloadLocation = "$($env:TEMP)\VBoxGuestAdditions.iso"

    (New-Object System.Net.WebClient).DownloadFile($url, $downloadLocation)

    $iso = Mount-DiskImage -ImagePath $downloadLocation -PassThru
    $mountLocation = "$((Get-Volume -DiskImage $iso).DriveLetter):\"

    Start-Process -FilePath "$($mountLocation)\cert\VBoxCertUtil.exe" -ArgumentList "add-trusted-publisher $($mountLocation)\cert\oracle-vbox.cer" -Wait -NoNewWindow

    Start-Process -FilePath "$($mountLocation)\VBoxWindowsAdditions.exe" -ArgumentList "/S" -Wait -NoNewWindow

    Dismount-DiskImage -ImagePath $downloadLocation
}

Problem is you need to reboot the box for it to pick up the tools.. :(

from packer-templates.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.