flcdrg / au-packages

David's Chocolatey Automatic Packages
MIT License
18 stars 54 forks source link

Can not install SQL Server 2017 chocolatey package: failed to retrieve volume #26

Closed kwlin closed 6 years ago

kwlin commented 6 years ago

I'm trying to install SQL Server 2017 with the chocolatey package. But after chocolatey downloaded & mounted the SQL Server iso, it failed to start the setup.exe. This is the error.log from Boxstarter:

Installing sql-server-2017...
Ensuring 'C:\ProgramData\chocolatey\lib\sql-server-2017\tools' exists
Running Start-ChocolateyProcessAsAdmin -validExitCodes '0 3010' -workingDirectory ':' -statements '/IAcceptSqlServerLicenseTerms /Q /CONFIGURATIONFILE="C:\ProgramData\chocolatey\lib\sql-server-2017\tools\ConfigurationFile.ini" ' -exeToRun ':\setup.exe' 
Test-ProcessAdminRights: returning True
Elevating permissions and running [":\setup.exe" /IAcceptSqlServerLicenseTerms /Q /CONFIGURATIONFILE="C:\ProgramData\chocolatey\lib\sql-server-2017\tools\ConfigurationFile.ini" ]. This may take a while, depending on the statements.
ERROR: Exception calling "GetFullPath" with "1" argument(s): "The given path's format is not supported."

It seems that the Get-Volume failed in the https://github.com/flcdrg/au-packages/blob/master/sql-server-2017/tools/chocolateyinstall.ps1 script.

$MountResult = Mount-DiskImage -ImagePath $fileFullPath -StorageType ISO -PassThru
$MountVolume = $MountResult | Get-Volume
$MountLocation = "$($MountVolume.DriveLetter):"

I'm running the chocolatey/boxstarter installation scripts on a Windows 10 Virtual machine. When I just call Get-Volume in Powershell on that virtual machine, it returns nothing. When I run Get-Volume on a physical machine than it returns expected result (an overview of my volumes) ....

Any clue what I'm missing? Thanks in advanced.

/cc: @riezebosch

riezebosch commented 6 years ago

Discovered from de SQL server dockerfile you don't need the iso but can download (and cache) a setup.vob instead.

flcdrg commented 6 years ago

Not sure I've heard of a .vob file.

That is very strange that the Get-Volume is failing inside a VM. I'll see if I can repro it. What edition/version of Windows 10 are you running in the VM?

On 18 April 2018 at 05:42, Manuel Riezebosch notifications@github.com wrote:

Discovered from de SQL server dockerfile you don't need the iso but can download (and cache) a setup.vob instead.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flcdrg/au-packages/issues/26#issuecomment-382126702, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXe6-OqD7vQ6eHpQ6ws_ioOrtcFUtpLks5tpky-gaJpZM4TX8WD .

kwlin commented 6 years ago

Discovered from de SQL server dockerfile you don't need the iso but can download (and cache) a setup.vob instead.

We can't use docker yet because of our customer/company policy. :(

My current setup is:

PS P:\> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      16299  0

PS P:\> $PSVersionTable.PSVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      16299  251

Our virtual machines is running on VMWare. Could it be a virtualization issue or a windows policy issue?

riezebosch commented 6 years ago

I'm sorry, it was a .box file:

RUN Invoke-WebRequest -Uri $env:box -OutFile SQL.box ; \
        Invoke-WebRequest -Uri $env:exe -OutFile SQL.exe ; \
        Start-Process -Wait -FilePath .\SQL.exe -ArgumentList /qs, /x:setup ; \
        .\setup\setup.exe /q /ACTION=Install /INSTANCENAME=MSSQLSERVER /FEATURES=SQLEngine /UPDATEENABLED=0 /SQLSVCACCOUNT='NT AUTHORITY\System' /SQLSYSADMINACCOUNTS='BUILTIN\ADMINISTRATORS' /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS ; \
        Remove-Item -Recurse -Force SQL.exe, SQL.box, setup

Source: https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile#L20-L24

It's not about running in a docker container but how Microsoft creates an image by installing SQL server in a docker container. You can extract the download uri of the box file from the setup.exe with something like:

Select-String "download.microsoft.com" .\setup.exe
or
Select-String ".box" .\setup.exe -Context 2
flcdrg commented 6 years ago

oh, that's interesting

kwlin commented 6 years ago

@riezebosch misunderstood your comment :)

@flcdrg Anyway I can contribute to this issue?

flcdrg commented 6 years ago

Yes definitely.

If we can figure out whether it's something specific to your configuration, or is it an issue that will affect anyone using a VM, and then is there a good workaround (like the docker approach)

Get Outlook for iOShttps://aka.ms/o0ukef


From: Ka-Wai Lin notifications@github.com Sent: Thursday, April 19, 2018 6:04:41 AM To: flcdrg/au-packages Cc: David Gardiner; Mention Subject: Re: [flcdrg/au-packages] Can not install SQL Server 2017 chocolatey package: failed to retrieve volume (#26)

@riezeboschhttps://github.com/riezebosch misunderstood your comment :)

@flcdrghttps://github.com/flcdrg Anyway I can contribute to this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/flcdrg/au-packages/issues/26#issuecomment-382520419, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAXe645ukScCYzKZjoqqaR6eyQ8WVk6uks5tp6NhgaJpZM4TX8WD.

kwlin commented 6 years ago

It seems our development machines are running on Cisco Hyperflex technology (not familiar with it). I think it's a virtualization issue because when I execute get-volume command on virtual machines with Hyper-V then it worked correctly.

flcdrg commented 6 years ago

Closing for now. Please reopen if you have more information to add