Easy-GPU-PV icon indicating copy to clipboard operation
Easy-GPU-PV copied to clipboard

Failed to create VM

Open gta0gagan opened this issue 1 year ago • 2 comments

While running "CopyFilesToVM.ps1" i got the following error:

INFO : Finding and copying driver files for High Definition Audio Bus to VM. This could take a while... Copy-Item : Access to the path 'K:\windows\system32\drivers\portcls.sys' is denied.

Can you tell me how to fix this.

gta0gagan avatar Mar 24 '23 12:03 gta0gagan

Full log:

`PS C:\Windows\system32> C:\Users***\Downloads\Easy-GPU-PV-main\CopyFilesToVM.ps1

Windows(R) Image to Virtual Hard Disk Converter for Windows(R) 10 Copyright (C) Microsoft Corporation. All rights reserved. Version 10.0.14278.1000.amd64fre.rs1_es_media.160201-1707

INFO : Opening ISO Win11_22H2_English_x64v1.iso... INFO : Looking for H:\sources\install.wim... INFO : Looking for the requested Windows image in the WIM file INFO : Image 6 selected (Professional)... INFO : Creating sparse disk... INFO : Mounting VHDX... INFO : Initializing disk... INFO : Creating EFI system partition... INFO : Formatting system volume... INFO : Setting system partition as ESP... INFO : Creating MSR partition... INFO : Creating windows partition... INFO : Formatting windows volume... INFO : Windows path (K:) has been assigned. INFO : Windows path (K:) took 1 attempts to be assigned. INFO : System volume location: J: INFO : Applying image to VHDX. This could take a while... INFO : Image was applied successfully. INFO : Applying unattend file (autounattend.xml)... INFO : Making image bootable... INFO : Drive is bootable. Cleaning up... INFO : Finding and copying driver files for High Definition Audio Bus to VM. This could take a while... Copy-Item : Access to the path 'K:\windows\system32\drivers\portcls.sys' is denied. At C:\Users***\Downloads\Easy-GPU-PV-main\Add-VMGpuPartitionAdapterFiles.psm1:70 char:17

  •             Copy-Item $path2 -Destination $Destination -Force
    
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : PermissionDenied: (C:\windows\system32\drivers\portcls.sys:FileInfo) [Copy-Item], UnauthorizedAccessException
    • FullyQualifiedErrorId : CopyFileInfoItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.CopyItemCommand

ERROR : Access to the path 'K:\windows\system32\drivers\portcls.sys' is denied. INFO : Log folder is C:\Users***\AppData\Local\Temp\Convert-WindowsImage\24647124-4075-40fc-b61a-d019f49aef3a INFO : Closing Windows image... INFO : Done. Failed to create VHDX, stopping script`

gta0gagan avatar Mar 24 '23 12:03 gta0gagan

This seems to be duplicate of #119.

verglor avatar Jul 11 '23 17:07 verglor