Skip to content
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

VMScsiController: Adds an extra adapter #186

Open
a73xsh opened this issue May 17, 2020 · 0 comments
Open

VMScsiController: Adds an extra adapter #186

a73xsh opened this issue May 17, 2020 · 0 comments
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@a73xsh
Copy link

a73xsh commented May 17, 2020

Every time when I launch DSC in VM added new SCSI adapter.
The adapter should not be added if it already exists

Here is my code.

Node $NodeName
 {

        xVHD "Disk-$VHDXName" {

                Name             = $VHDXName
                Path             = $Path
                Generation       = $Generation
                MaximumSizeBytes = $MaximumSizeBytes
                Ensure           = $Ensure

            }

        xVMScsiController "Controller-$SCSIControllerNumber" {

            Ensure           = $Ensure
            VMName           = $VMName
            ControllerNumber = 0
            RestartIfNeeded  = $true
            DependsOn          = "[xVHD]Disk-$VHDXName"

        }
            # Attach the VHD
        xVMHardDiskDrive "ExtraDisk-$VHDXName" {
                VMName             = $VMName
                Path               = (Join-Path "$Path" -ChildPath "$VHDXName")
                ControllerType     = 'SCSI'
                ControllerNumber   = 0
                ControllerLocation = 1
                Ensure             = $Ensure
                DependsOn          = "[xVMScsiController]Controller-$SCSIControllerNumber"
            }

    }

This log shows that the adapter number 3 has been added.

VERBOSE: [P10S-WS]: LCM:  [ Start  Resource ]  [[xVMScsiController]Controller-0]
VERBOSE: [P10S-WS]: LCM:  [ Start  Test     ]  [[xVMScsiController]Controller-0]
VERBOSE: [P10S-WS]:                            [[xVMScsiController]Controller-0] Found controller '0' attached to VM 'wac01.sddc.dev'.
VERBOSE: [P10S-WS]:                            [[xVMScsiController]Controller-0] Comparing 'RestartIfNeeded'; expected '', actual 'False'.
VERBOSE: [P10S-WS]:                            [[xVMScsiController]Controller-0] Comparing 'ControllerNumber'; expected '0', actual '0'.
VERBOSE: [P10S-WS]:                            [[xVMScsiController]Controller-0] Comparing 'VMName'; expected 'wac01.sddc.dev', actual 'wac01.sddc.dev'.
VERBOSE: [P10S-WS]:                            [[xVMScsiController]Controller-0] Comparing 'Ensure'; expected 'Present', actual 'Present'.
VERBOSE: [P10S-WS]: LCM:  [ End    Test     ]  [[xVMScsiController]Controller-0]  in 0.0650 seconds.
VERBOSE: [P10S-WS]: LCM:  [ Start  Set      ]  [[xVMScsiController]Controller-0]
VERBOSE: [P10S-WS]:                            [[xVMScsiController]Controller-0] Adding controller number '3'.
VERBOSE: [P10S-WS]: LCM:  [ End    Set      ]  [[xVMScsiController]Controller-0]  in 1.7120 seconds.
VERBOSE: [P10S-WS]: LCM:  [ End    Resource ]  [[xVMScsiController]Controller-0]

The operating system the target node is running

OsName               : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2004
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US, ru-RU}

Version and build of PowerShell the target node is running

Name                           Value
----                           -----
PSVersion                      5.1.19041.1
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Version of the DSC module that was used

Version    Name                                Repository           Description
-------    ----                                ----------           -----------
8.2.0      ComputerManagementDsc               PSGallery            DSC resources for configuration of a Windows com...
3.0.171    LatestUpdate                        PSGallery            A module for retrieving and downloading the late...
7.4.0.0    NetworkingDsc                       PSGallery            Module with DSC Resources for Networking area
2.2        Posh-SSH                            PSGallery            Provide SSH and SCP functionality for executing ...
3.0.0.0    xActiveDirectory                    PSGallery            The xActiveDirectory module is originally part o...
2.0.0.0    xDhcpServer                         PSGallery            Module with DSC Resources for DHCP Server area
1.15.0.0   xDnsServer                          PSGallery            Module with DSC Resources for DNS Server area
3.17.0.0   xHyper-V                            PSGallery            Module with DSC Resources for Hyper-V area
8.10.0.0   xPSDesiredStateConfiguration        PSGallery            The xPSDesiredStateConfiguration module is a par...
1.4.7      PackageManagement                   PSGallery            PackageManagement (a.k.a. OneGet) is a new way t...
@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels Jun 12, 2022
@johlju johlju changed the title xVMScsiController adds an extra adapter. VMScsiController: Adds an extra adapter Jun 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

2 participants