New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable Media/File Caching #28
Comments
It appears that mounting an ISO file from a UNC file share doesn't work too well? When an ISO is mounted with DriveLetter FileSystemLabel FileSystem DriveType HealthStatus OperationalStatus
----------- --------------- ---------- --------- ------------ -----------------
F CD-ROM Healthy Unknown
C Evo850 NTFS Fixed Healthy OK
D Data NTFS Fixed Healthy OK
Recovery NTFS Fixed Healthy OK
NTFS Fixed Healthy OK
E M4 NTFS Fixed Healthy OK When -ImagePath points to a local path DriveLetter FileSystemLabel FileSystem DriveType HealthStatus OperationalStatus
----------- --------------- ---------- --------- ------------ -----------------
F CD-ROM Healthy Unknown
C Evo850 NTFS Fixed Healthy OK
D Data NTFS Fixed Healthy OK
Recovery NTFS Fixed Healthy OK
NTFS Fixed Healthy OK
R IR3_SSS_X64FREE_EN-US_DV9 UDF CD-ROM Healthy OK
E M4 NTFS Fixed Healthy OK In short, to progress this, I need a way of determining the mounted drive letter of an ISO mounted on a UNC share. |
Creating a Windows Image from a networked .WIM files does work (as I expected). I think I'll temporarily only implement the -DisableLocalFileCaching functionality for .WIM media. ISO media will still be downloaded/cached locally until I can get to the bottom of the ISO mounting issue described above. |
@csandfeld If you have some WIM files you should be able to run Note: this is only currently implemented for WIM media. |
All my wishes seem to come true today :) |
Haha – not quite. There’s one more inbound… |
Tried disabling file caching for a WIM file, but ran into the following: VERBOSE: [13:25:07] Caching of file-based media is disabled. Skipping media 'S12R2STDX64' download.
Get-Item : Cannot find path 'D:\TestLab\ISOs\S12R2STDX64.wim' because it does not exist.
At C:\Program Files\WindowsPowerShell\Modules\VirtualEngineLab\Src\LabMedia.ps1:240 char:17
+ ... return (Get-Item -Path $invokeResourceDownloadParams.DestinationP ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (D:\TestLab\ISOs\S12R2STDX64.wim:String) [Get-Item], ItemNot
FoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemCommand
VERBOSE: [13:25:07] Creating disk image 'Windows Server 2012 R2 Standard x64'.
VERBOSE: [13:25:07] Creating disk image 'D:\TestLab\MasterVirtualHardDisks\S12R2STDX64.vhdx'.
VERBOSE: [13:25:08] Mounting disk image 'D:\TestLab\MasterVirtualHardDisks\S12R2STDX64.vhdx'.
VERBOSE: [13:25:08] Initializing disk image 'D:\TestLab\MasterVirtualHardDisks\S12R2STDX64.vhdx'.
VERBOSE: [13:25:09] Creating 'System' disk partition.
VERBOSE: [13:25:09] Formatting 'System' disk partition.
VERBOSE: [13:25:10] Creating 'OS' disk partition.
VERBOSE: [13:25:10] Formatting 'OS' disk partition.
New-LabImage : Cannot bind argument to parameter 'MediaPath' because it is an empty string.
At C:\Program Files\WindowsPowerShell\Modules\VirtualEngineLab\Src\LabVM.ps1:211 char:27
+ ... ef] $null = New-LabImage -Id $node.Media -ConfigurationData $Configur ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,New-LabImage
WARNING: [13:25:13] Removing incomplete image 'D:\TestLab\MasterVirtualHardDisks\S12R2STDX64.vhdx'.
VERBOSE: [13:25:13] Setting Virtual Switch configuration 'External'.
VERBOSE: [13:25:13] Checking DSC Resource 'xHyper-V\MSFT_xVMSwitch'.
VERBOSE: [13:25:13] Invoking command 'Test-VMSwitchTargetResource'.
VERBOSE: [13:25:15] Skipping command 'Set-VMSwitchTargetResource'.
VERBOSE: [13:25:15] (Re)setting VHDX configuration 'S12R2STDX64'.
VERBOSE: [13:25:15] Checking DSC Resource 'xHyper-V\MSFT_xVHD'.
VERBOSE: [13:25:15] Invoking command 'Test-VHDTargetResource'.
Either specify ParentPath or MaximumSize property.
At C:\Program Files\WindowsPowerShell\Modules\VirtualEngineLab\DSCResources\xHyper-V\DSCResources\MSFT_xVHD
\MSFT_xVHD.psm1:199 char:8
+ Throw "Either specify ParentPath or MaximumSize property."
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Either specify ...mSize property.:String) [], RuntimeExce
ption
+ FullyQualifiedErrorId : Either specify ParentPath or MaximumSize property.
C:\> |
OK – I think I can see what the issue is there. I best be writing another test ;) |
@csandfeld this should be resolved in the latest dev branch 0.8.9. I've merged the -Credential/-Password functionality into dev. |
That did the trick - you're a rock star 👍 |
@csandfeld can I close this issue out? |
Yes, certainly - thank you |
Related to discussions in issue #9, it would be great to be able the disabling of file-based media, i.e. ISO and WIM media. This would be good for reducing disk storage on always-connected hosts, e.g. not laptops! By default this should be left enabled for performance reasons.
The text was updated successfully, but these errors were encountered: