Install Extension Pack via Command Line

Discussions related to using VirtualBox on Windows hosts.
Post Reply
ladiko
Posts: 2
Joined: 20. Apr 2017, 10:48

Install Extension Pack via Command Line

Post by ladiko »

Hi,

It usually worked to install the VirtualBox Extension Pack via command line, but since 5.1.20 it asks to confirm the licence agreement by pressing y/n - this seems contra productive to me as command line use is to avoid manual steps.

Code: Select all

"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "C:\Path\to\Oracle_VM_VirtualBox_Extension_Pack-5.1.20-114628.vbox-extpack"
Is there any way to supress that?
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Install Extension Pack via Command Line

Post by socratis »

I believe that the answer was given to you in the ticket you opened (and was closed as invalid): Ticket #16674: Command line installation of Extension Pack asks for Licence Agreement Confirmation.
Just execute the command and read the messages written by VBoxManage. There is an --accept-license parameter.
PS. On a personal note, was it worth it opening a new ticket, for a question that was already answered in the help? Rhetorical question...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install Extension Pack via Command Line

Post by Perryg »

This is a legal contract between you and the license issuer. It must be acknowledged with a yes/no or in this case by adding the accept-license tag to verify that you agree with the license. Small price to pay if you ask me.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Install Extension Pack via Command Line

Post by mpack »

And since this change has no doubt been mandated by an Oracle lawyer, I'd say that the chance of you getting the change rescinded is approximately 0.
axlrod
Posts: 5
Joined: 8. Jun 2011, 00:14
Primary OS: Mac OS X other
VBox Version: OSE Debian
Guest OSses: Windows 10

Re: Install Extension Pack via Command Line

Post by axlrod »

So google lead me here..

Anyone know if this license tag changes on new versions ? I'm trying to automate this by getting the extension pack from whatever version I have installed automatically via ansible, and this broke hard for me..
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Install Extension Pack via Command Line

Post by scottgus1 »

No one would know of changes to new versions except the developers, and they would put the change in the changelog if they remember to.

It is not a good idea to roll out a new version of anything to locations where it would "break hard" for you if there were glitches. Test first on a test PC or three.
axlrod
Posts: 5
Joined: 8. Jun 2011, 00:14
Primary OS: Mac OS X other
VBox Version: OSE Debian
Guest OSses: Windows 10

Re: Install Extension Pack via Command Line

Post by axlrod »

thats where its breaking, just saying.. if I have to adjust this everytime there is a new version it defeats the purpose of automation..
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Install Extension Pack via Command Line

Post by Perryg »

This should be script-able. Just poll the current installed base version and use the parse to name the extpack you want to install. See various extpacks for the naming convention. Another way I have seen is to use wildcards as long as the folder has only the latest extpack in it.
axlrod
Posts: 5
Joined: 8. Jun 2011, 00:14
Primary OS: Mac OS X other
VBox Version: OSE Debian
Guest OSses: Windows 10

Re: Install Extension Pack via Command Line

Post by axlrod »

yep ..
- name: Get virtualbox version
  shell: "vboxmanage --help | head -n 1 | awk '{print $NF}'"
  register: vbox_version
  when: 'extpack_list.stdout == "Extension Packs: 0"'
- name: Download VirtualBox extension pack
  get_url: url="http://download.virtualbox.org/virtualb ... ox-extpack" dest=/tmp
  when: 'extpack_list.stdout == "Extension Packs: 0"'
- name: Install VirtualBox extension pack
  shell: "VBoxManage extpack install --replace /tmp/Oracle_VM_VirtualBox_Extension_Pack-{{vbox_version.stdout}}.vbox-extpack --accept-license=715c7246dc0f779ceab39446812362b2f9bf64a55ed5d3a905f053cfab36da9e"
  when: 'extpack_list.stdout == "Extension Packs: 0"'
  ignore_errors: yes
This is how it is now for me.. so .. if I can't rely on this anymore I have to lock versions down until new license is checked..
ladiko
Posts: 2
Joined: 20. Apr 2017, 10:48

Re: Install Extension Pack via Command Line

Post by ladiko »

socratis wrote:I believe that the answer was given to you in the ticket you opened
...
PS. On a personal note, was it worth it opening a new ticket, for a question that was already answered in the help? Rhetorical question...
It's just half of the answer - execute it AND accept the licence on the command line. I didn't image to get the command line parameter after accepting the licence - creative command line "help". I would really expect it to be available via --help but that part wasn't updated.
m.campanelli
Posts: 1
Joined: 8. Aug 2017, 10:43

Re: Install Extension Pack via Command Line

Post by m.campanelli »

echo y | "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "C:\Path\to\Oracle_VM_VirtualBox_Extension_Pack-5.1.20-114628.vbox-extpack"
:wink:
orev
Posts: 5
Joined: 10. Jul 2014, 01:06

Re: Install Extension Pack via Command Line

Post by orev »

m.campanelli wrote:echo y | "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" extpack install --replace "C:\Path\to\Oracle_VM_VirtualBox_Extension_Pack-5.1.20-114628.vbox-extpack"
:wink:
Works GREAT! Thanks!
Post Reply