none
<stack-trace>at line: 762 in C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1</stack-trace> RRS feed

  • Question

  • I have a error when deploying the ASDK 1902 version during the validation fase.

    <test-case description="Retrieve network adapter information from computer 'MAS-1'." name="Validate-Role.Retrieve network adapter information from computer 'MAS-1'." time="0.1301" asserts="0" success="True" result="Success" executed="True" />
    
    - <test-case description="Retrieve network adapter information from computer 'MAS-1'." name="Validate-Role.Retrieve network adapter information from computer 'MAS-1'." time="0.0647" asserts="0" success="False" result="Failure" executed="True">
    
    - <failure>
    
      <message>You cannot call a method on a null-valued expression.</message>
    
      <stack-trace>at line: 762 in C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1</stack-trace>
    
      </failure>
    
      </test-case>
    
      <test-case description="Retrieve SCSI adapter information from computer 'MAS-1'." name="Validate-Role.Retrieve SCSI adapter information from computer 'MAS-1'." time="1.5514" asserts="0" success="True" result="Success" executed="True" />

    I found out that there are two problems in the BareMetal.Tests.ps1 script the first one is on line 613:

    It ($BareMetalLocalizedStrings.TestRetrieveNetworkAdapterInformation -f $machineName)

    it is testing the "Memory information" so it took me a couple of minutes to locate the problem:-)

    The second problem is on line 774:

    PartNumber = $_.PartNumber.Trim();

    What happens when this value is empty:-)


    When removing the test the installation worked correct.



    Wednesday, March 13, 2019 9:54 AM

Answers

  • In my case the value was emtpy that was the reason the test failed with "You cannot call a method on a null-valued expression."

    I did run the Deployment Checker and it didn't gave an error.

    Within the 1901 release this check isn't part of the memory check.

    If i run

    Get-CimInstance -Class Win32_PhysicalMemory

    This is the result:

    Caption              : Physical Memory
    Description          : Physical Memory
    InstallDate          : 
    Name                 : Physical Memory
    Status               : 
    CreationClassName    : Win32_PhysicalMemory
    Manufacturer         : 
    Model                : 
    OtherIdentifyingInfo : 
    PartNumber           : 
    PoweredOn            : 
    SerialNumber         : 
    SKU                  : 
    Tag                  : Physical Memory 17
    Version              : 
    HotSwappable         : 
    Removable            : 
    Replaceable          : 
    FormFactor           : 8
    BankLabel            : 
    Capacity             : 17179869184
    DataWidth            : 64
    InterleavePosition   : 
    MemoryType           : 24
    PositionInRow        : 
    Speed                : 1333
    TotalWidth           : 72
    Attributes           : 2
    ConfiguredClockSpeed : 800
    ConfiguredVoltage    : 
    DeviceLocator        : PROC 2 DIMM 9C
    InterleaveDataDepth  : 
    MaxVoltage           : 
    MinVoltage           : 
    SMBIOSMemoryType     : 24
    TypeDetail           : 128
    PSComputerName       : 

    Friday, March 15, 2019 5:20 AM

All replies

  • I have not tested what happens when that is blank. Have you noticed any issues with the deployment?

    also, did you run the Deployment Checker for Azure Stack before you deployed? Most hardware issues should be caught by this script. 

    Friday, March 15, 2019 1:19 AM
    Moderator
  • In my case the value was emtpy that was the reason the test failed with "You cannot call a method on a null-valued expression."

    I did run the Deployment Checker and it didn't gave an error.

    Within the 1901 release this check isn't part of the memory check.

    If i run

    Get-CimInstance -Class Win32_PhysicalMemory

    This is the result:

    Caption              : Physical Memory
    Description          : Physical Memory
    InstallDate          : 
    Name                 : Physical Memory
    Status               : 
    CreationClassName    : Win32_PhysicalMemory
    Manufacturer         : 
    Model                : 
    OtherIdentifyingInfo : 
    PartNumber           : 
    PoweredOn            : 
    SerialNumber         : 
    SKU                  : 
    Tag                  : Physical Memory 17
    Version              : 
    HotSwappable         : 
    Removable            : 
    Replaceable          : 
    FormFactor           : 8
    BankLabel            : 
    Capacity             : 17179869184
    DataWidth            : 64
    InterleavePosition   : 
    MemoryType           : 24
    PositionInRow        : 
    Speed                : 1333
    TotalWidth           : 72
    Attributes           : 2
    ConfiguredClockSpeed : 800
    ConfiguredVoltage    : 
    DeviceLocator        : PROC 2 DIMM 9C
    InterleaveDataDepth  : 
    MaxVoltage           : 
    MinVoltage           : 
    SMBIOSMemoryType     : 24
    TypeDetail           : 128
    PSComputerName       : 

    Friday, March 15, 2019 5:20 AM
  • Thanks a lot you really save my life.
    Tuesday, March 19, 2019 10:31 AM
  • It is possible to get some unsupported or abnormal configurations working by getting around validation checks as you have done. 

    If the ASDK is able to see and use all the memory after install, then you should be good. 

    Wednesday, March 20, 2019 7:54 PM
    Moderator
  • The servers we are using for the ASDK are HP Prolaint DL360 G7.

    The only thing I want to make clear in this case that there is a test written for memory PartNumber that cannot be executed because the value isn't given back.

    Now I have to modified the test part to make a deployment working.

    Maybe this part can be removed from testing, or altered so it doesn’t crash.

    Eelco

    Friday, March 22, 2019 6:09 AM
  • Thanks for the info, I will follow up with the deployment team on this one. We have actually had another similar validation issue come in for 1902, but not with Memory. 
    Friday, March 22, 2019 6:06 PM
    Moderator
  • We also have the same problem for 1 week now. Your idea to remove the failing test has allowed us to move forward. You mentioned 1901 does not have this test. Is it possible that 1902 was tested only on old hardware with DDR3 memory but not tested on new system with DDR4 memory?

    For us 1901 installs on both: old hardware with DDR3 memory and new hardware with DDR4 memory. However, 1902 installs only on old system with DDR3 memory. 1902 fails to install on new system with DDR4 memory.

    So the problem is easily reproducible for us. We can compare how 1902 fails to install on system with DDR4 memory and how it succeeds to install on system with DDR3 memory. Would this be helpful to anyone?

    If so then we could try to modify the offending test (new in 1902) so that it passes on both old and new hardware. And in so doing we could verify if our assumption why the test is failing and decide better how to fix it. Would this help anyone? Why aren't more people reporting this problem?

    Vince



    Tuesday, March 26, 2019 8:57 AM
  • @vtrandal_arvae_com

    This is a known issue with 1902, and we are working to get a fix & better workaround out. 

    The current workaround:

    Open up the file at C:\CloudDeployment\Roles\PhysicalMachines\Tests\BareMetal.Tests.ps1 in any editor with a line counter on it. PowerShell ISE worked for me.

     

    Delete the “Memory Information” test, which is from lines 609 to 780, or delete everything from:

     

            #

            # Start: Memory information

            #

     

    To

             #

            # Start: SCSI Adapter information

            #

     

    Keep in mind that this will skip the memory validation test, so if there are memory issues with your system, the ASDK could potentially have issues. 

    Tuesday, April 9, 2019 9:52 PM
    Moderator
  • thank you for the workaround

    I'm on 1906 and this issue is still lingering it appears.

    could just be an HP DDR3 thing as I'm on a DL360 G6 but it seems quite common to have some of those fields blank when querying memory details in WMI on multiple platforms when I spot-checked some of my Dell and Lenovo hardware as well.

    Wednesday, July 17, 2019 5:59 PM