Downloads:

651,357

Downloads of v 6.0.6:

15,817

Last Update:

17 Apr 2019

Package Maintainer(s):

Software Author(s):

  • Oracle Corporation

Tags:

virtualbox virtualization virtual oracle admin foss cross-platform

VirtualBox

This is not the latest version of VirtualBox available.

6.0.6 | Updated: 17 Apr 2019

Downloads:

651,357

Downloads of v 6.0.6:

15,817

Software Author(s):

  • Oracle Corporation

VirtualBox 6.0.6

This is not the latest version of VirtualBox available.

This Package Contains an Exempted Check

1 Test Passing and 1 Exempted Test


Validation Testing Passed


Verification Testing Exempt:

Unknown failure in the test environment.

To install VirtualBox, run the following command from the command line or from PowerShell:

>

To upgrade VirtualBox, run the following command from the command line or from PowerShell:

>

To uninstall VirtualBox, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade virtualbox -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade virtualbox -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure virtualbox installed
  win_chocolatey:
    name: virtualbox
    state: present
    version: 6.0.6
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'virtualbox' do
  action    :install
  version  '6.0.6'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: virtualbox,
    Version: 6.0.6,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller virtualbox
{
   Name     = 'virtualbox'
   Ensure   = 'Present'
   Version  = '6.0.6'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'virtualbox':
  provider => 'chocolatey',
  ensure   => '6.0.6',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install virtualbox version="6.0.6" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved as a trusted package on 17 Apr 2019.

Description

VirtualBox is a cross-platform virtualization application. It installs on existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. It extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time.

Package parameters

Installation/Upgrading

  • /CurrentUser - Install for current user only
  • /NoDesktopShortcut - Do not create desktop shortcut
  • /NoQuickLaunch - Do not create quick launch icon
  • /NoRegister - Do not register virtualbox file extensions
  • /NoPath - Do not add virtualbox install directory to the PATH
  • /NoExtensionPack - Do not install extension pack

Uninstalling

  • /KeepExtensions - Do not uninstall installed virtualbox extensions

Example: choco install virtualbox --params "/NoDesktopShortcut /NoExtensionPack"


chocolateyBeforeModify.ps1
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1

$packageName = 'virtualbox'

#For acpipowerbutton to work on Windows server see: http://ethertubes.com/unattended-acpi-shutdown-of-windows-server/
#sp HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system shutdownwithoutlogon 1
$shutdown_type = 'savestate'  # 'acpipowerbutton', 'poweroff', 'savestate'

$pvbox = Get-Process virtualbox -ea 0
if (!$pvbox) {
    Write-Host "$packageName is not running"
    return
}

Write-Host "$packageName is running, trying to gracefully shutdown any running machines"

$installLocation = Get-VirtualBoxIntallLocation
if (!$installLocation) { Write-Warning "Can not find existing installation location of $packageName"; return }
if (!(Test-Path $installLocation\VBoxManage.exe)) { Write-Warning "Existing installation of $packageName found but unable to find VBoxManage.exe"; return }

$commands = "Set-Alias vboxmanage '$installLocation\VBoxManage.exe'`n"
$commands += @'
[string[]] $runningvms = vboxmanage list runningvms 2>&1
if ($LastExitCode -ne 0) { Write-Error "Error running vboxmanage - can't get running vms" }
if ($runningvms -and ($runningvms.Length -eq 0)) { "No running machines"; return }

'Number of machines running: ' + $runningvms.Length
foreach ($vm in $runningvms) {
    $vmid = $vm -split ' ' | select -Last 1
    $vmname = $vm.Replace($vmid, '').Trim()

    Write-Host "Shutting down the machine $vmname"
    vboxmanage controlvm $vmid SHUTDOWN_TYPE 2>$null
    if ($LastExitCode -ne 0) { Write-Error "Error running vboxmanage - can't power down running vm: $vmname" }
    else { "Machine $vmname powered down prior to installation using 'SHUTDOWN_TYPE' method" }
}
'@ -replace 'SHUTDOWN_TYPE', $shutdown_type

$res = Start-ProcessNonElevated -Cmd $commands -UsePowershell
$res.out -join "`n" | Write-Host
if ($res.err) { "Errors during graceful shutdown`n" + ($res.err -join "`n") | Write-Warning }

## Doesn't seem to be required
#Write-Host "Killing $packageName process"
#$pvbox | kill
chocolateyInstall.ps1
#https://www.virtualbox.org/manual/ch02.html#idm819

$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1

$cert = Get-ChildItem Cert:\CurrentUser\TrustedPublisher -Recurse | Where-Object { $_.Thumbprint -eq 'a88fd9bdaa06bc0f3c491ba51e231be35f8d1ad5' }
if (!$cert) {
    $toolsPath = Split-Path $MyInvocation.MyCommand.Definition
    Start-ChocolateyProcessAsAdmin "certutil -addstore 'TrustedPublisher' '$toolsPath\oracle.cer'"
}

$pp = Get-PackageParameters
$silentArgs = @('-s -l -msiparams REBOOT=ReallySuppress')
$silentArgs += if (!$pp.CurrentUser)      { 'ALLUSERS=1' } else { 'ALLUSERS=2';  Write-Host 'Param: Installing for current user' }
$silentArgs += if ($pp.NoDesktopShortcut) { 'VBOX_INSTALLDESKTOPSHORTCUT=0';     Write-Host 'Param: No desktop shortcut' }
$silentArgs += if ($pp.NoQuickLaunch)     { 'VBOX_INSTALLQUICKLAUNCHSHORTCUT=0'; Write-Host 'Param: No quick launch shortcut' }
$silentArgs += if ($pp.NoRegister)        { 'VBOX_REGISTERFILEEXTENSIONS=0';     Write-Host 'Param: No registration for virtualbox file extensions' }

$packageArgs = @{
  packageName            = 'virtualbox'
  fileType               = 'EXE'
  url                    = 'https://download.virtualbox.org/virtualbox/6.0.6/VirtualBox-6.0.6-130049-Win.exe'
  url64bit               = 'https://download.virtualbox.org/virtualbox/6.0.6/VirtualBox-6.0.6-130049-Win.exe'
  checksum               = '41be35c8624cf1441488ed58b0b84322acc4727d11307de38c055723eeee3877'
  checksum64             = '41be35c8624cf1441488ed58b0b84322acc4727d11307de38c055723eeee3877'
  checksumType           = 'sha256'
  checksumType64         = 'sha256'
  silentArgs             = $silentArgs
  validExitCodes         = @(0)
  softwareName           = 'Oracle VM VirtualBox *'
}
Install-ChocolateyPackage @packageArgs

$packageName = $packageArgs.packageName
$installLocation = Get-VirtualBoxIntallLocation
if (!$installLocation)  { Write-Warning "Can't find $packageName install location, can't install extension pack"; return }

if (!$pp.NoExtensionPack) {
    Write-Host "Installing extension pack"

    $url_ep       = 'https://download.virtualbox.org/virtualbox/6.0.6/Oracle_VM_VirtualBox_Extension_Pack-6.0.6.vbox-extpack'
    $checksum_ep  = '794f023a186bd217c29c3d30bd1434b6e9de3b242c7bf740d06d10f2d3d981c6'
    $file_path_ep = (Get-PackageCacheLocation) + '\' + ($url_ep -split '/' | Select-Object -Last 1)
    Get-ChocolateyWebFile `
        -PackageName    'virtualbox-extensionpack' `
        -FileFullPath   $file_path_ep `
        -Url            $url_ep `
        -Url64bit       $url_ep `
        -Checksum       $checksum_ep `
        -Checksum64     $checksum_ep `
        -ChecksumType   'sha256' `
        -ChecksumType64 'sha256'
    if (!(Test-Path $file_path_ep)) { Write-Warning "Can't download latest extension pack" }
    else {
        Set-Alias vboxmanage $installLocation\VBoxManage.exe
        "y" | vboxmanage extpack install --replace $file_path_ep 2>&1
        if ($LastExitCode -ne 0) { Write-Warning "Extension pack installation failed with exit code $LastExitCode" }
    }
}

if (!$pp.NoPath) { Write-Host "Adding to PATH if needed"; Install-ChocolateyPath $installLocation }

Write-Host "$packageName installed to '$installLocation'"
Register-Application "$installLocation\$packageName.exe" vbox
Write-Host "$packageName registered as vbox"
chocolateyUninstall.ps1
$ErrorActionPreference = 'Stop'
$toolsPath = Split-Path $MyInvocation.MyCommand.Definition
. $toolsPath\helpers.ps1

$pp = Get-PackageParameters

if ($pp.KeepExtensions) {
  return
}

$installLocation = Get-VirtualBoxIntallLocation
if (!$installLocation) { Write-Warning "Can not find existing installation location of $packageName"; return }
$vboxManage = "$installLocation\VBoxManage.exe"
if (!(Test-Path $vboxManage)) { Write-Warning "Existing installation of $packageName found but unable to find VBoxManage.exe"; return }

$extensions = . $vboxManage list extpacks | Where-Object { $_ -match 'Pack no' } | ForEach-Object { $_ -split '\:' | Select-Object -last 1 }
$extensions | ForEach-Object {
  $extName = $_.Trim()
  Write-Host "Uninstalling extension: '$extName'"
  Start-ChocolateyProcessAsAdmin -ExeToRun $vboxManage -Statements 'extpack','uninstall',"`"$extName`"" -Elevate 2>&1
}

Write-Host "Cleaning up extensions before uninstalling virtualbox"
Start-ChocolateyProcessAsAdmin -ExeToRun $vboxManage -Statements 'extpack', 'cleanup' 2>&1
helpers.ps1
function Get-VirtualBoxIntallLocation() {
    $vbox_msi = Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' VBOX_MSI_INSTALL_PATH -ea 0 | Select-Object -expand VBOX_MSI_INSTALL_PATH
    if ($vbox_msi -and $vbox_msi.EndsWith('\')) { $vbox_msi = $vbox_msi -replace '.$' }

    Write-Verbose 'Checking VBOX_MSI_INSTALL_PATH'
    if ( $installLocation = $vbox_msi ) {
        if (Test-Path $installLocation) { return $installLocation }
    }

    Write-Verbose 'Checking Get-AppInstallLocation'
    if ( $installLocation = Get-AppInstallLocation 'virtualbox') { return $installLocation }
}

#http://stackoverflow.com/questions/40863475/starting-non-elevated-prompt-from-elevated-session
function Start-ProcessNonElevated( [string] $Cmd, [switch]$UsePowerShell ) {
    $svc = Get-Service Schedule -ea 0
    if ($svc -and $svc.Status -ne 'Running') { throw 'Start-ProcessNonElevated requires running Task Scheduler service' }

    $res = @{}

    $tmp_base  = [System.IO.Path]::GetTempFileName()
    $tmp_base  = $tmp_base -replace '\.tmp$'
    $tmp_name  = Split-Path $tmp_base -Leaf
    $task_name = "Start-ProcessNonElevated-$tmp_name"
    Write-Verbose "Temporary files: $tmp_base"

    if ($UsePowershell) {
        @(
            '$r = "{0}"' -f $tmp_base
            ". {{`n{0}`n}} >`"`$r.out.log`" 2>`"`$r.err.log`"" -f $Cmd
        ) -join "`n" | Out-String | Out-File "$tmp_base.ps1"
        $cmd = "powershell -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -NoLogo -NonInteractive -File '$tmp_base.ps1'"
    }

    Write-Verbose "Creating scheduled task for command:`n$cmd"
    schtasks.exe /Create /RU $Env:USERNAME /TN $task_name /SC ONCE /ST 00:00 /F /TR $cmd *> "$tmp_base.schtasks.log"
    schtasks.exe /run /tn $task_name *>> "$tmp_base.schtasks.log"

    Write-Verbose 'Waiting for scheduled task to finish'
    do {
        $status = schtasks /query /tn $task_name /FO csv | ConvertFrom-Csv | Select-Object -expand Status
        Start-Sleep 1
    }
    until ($status -eq 'Ready')
    schtasks.exe /delete /F /tn $task_name *>> "$tmp_base.schtasks.log"

    if ($UsePowershell) {
        $res = @{
            out = Get-Content "$tmp_base.out.log" -ea 0
            err = Get-Content "$tmp_base.err.log" -ea 0
        }
    }

    return $res
}

oracle.cer
 

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
VirtualBox 6.0.14 20991 Wednesday, October 16, 2019 Approved
VirtualBox 6.0.12 20835 Wednesday, September 4, 2019 Approved
VirtualBox 6.0.10 21426 Tuesday, July 16, 2019 Approved
VirtualBox 6.0.8 24669 Tuesday, May 14, 2019 Approved
VirtualBox 6.0.6 15817 Wednesday, April 17, 2019 Approved
VirtualBox 6.0.4 26955 Monday, January 28, 2019 Approved
VirtualBox 6.0.2 9162 Tuesday, January 15, 2019 Approved
VirtualBox 6.0.0 12123 Wednesday, December 19, 2018 Approved
VirtualBox 5.2.34 73 Wednesday, October 16, 2019 Approved
Discussion for the VirtualBox Package

Ground Rules:

  • This discussion is only about VirtualBox and the VirtualBox package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or VirtualBox, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus