Thursday, June 30, 2022

Terraform Azure Devops hosted pipelines

 In setting up my homelab using AZDO, I wanted to run some builds and steps using the Azure Hosted Agent. 

The documentation is a little unclear on this so I imported resources as follows. 

If codeblock output is clipped by css, don't worry, the code is there. Not working on that tonight as I have homelab to set up. 

For given TF code:

resource "azuredevops_agent_pool" "pipelinesagent" {
  name           = "Azure Pipelines"
  auto_provision = true
}

resource "azuredevops_agent_queue" "pipelinesqueue" {
  project_id    = azuredevops_project.project.id
  agent_pool_id = azuredevops_agent_pool.pipelinesagent.id
}

I found the azuredevops_agent_pool ID and the azuredevops_agent_queue ID as follows:

az pipelines queue list
// There were a lot of queues, but I am interested in the last in the output: 
// guids replaced with <guidhere>, get your own.
// 
[
{
    "id":  45,
    "name":  "Azure Pipelines",
    "pool":  {
                 "id":  9,
                 "isHosted":  true,
                 "isLegacy":  false,
                 "name":  "Azure Pipelines",
                 "options":  "none",
                 "poolType":  "automation",
                 "scope":  "<guidhere>",
                 "size":  1
             },
    "projectId":  "<guidhere>"
}
]

Now I can run my imports:

terraform import azuredevops_agent_pool.pipelinesagent 9
terraform import azuredevops_agent_queue.pipelinesqueue <guidhere>/45

And a `terraform apply` shows no changes needed. 

Friday, June 24, 2022

ESXi 7 PCI Passthrough Gigabyte B550 board

 

System:

Gigabyte B550 Aorus Elite Pro
Ryzen 3100
Sandisk 32GB USB sticks

Problem:

After trying to pass through an LSI 9207-8i, subsequent reboots still showed the device in " Enabled / Needs reboot" in ESXi 7.0 and the device was not assignable.

I worked through a few steps:

Disabled the LSI driver so it wouldn't grab the card

esxcli system module set --enabled=false --module=lsi_msgpt2

(can't remember if it was gpt2 or gpt3 though)

Changed system UEFI settings 

Found these on reddit, not sure if they really helped: 

Tweaker -> Advanced CPU Settings -> SVM Mode -> Enabled
Settings -> Miscellaneous -> IOMMU -> Enabled
Settings -> NBIO Common Options -> IOMMU -> Enabled
Settings -> NBIO Common Options -> ACS Enable -> Enable
Settings -> NBIO Common Options -> Enable AER Cap -> Enable

Disable ACS Checks in ESXi

Manage > System > Advanced settings
Set VMkernel.Boot.disableACSCheck to True.
 
 
 Reboot. Done.

Monday, June 20, 2022

ESXI 7 installer error 28 vmx.v00 and resolution

ESXI 7 installer error on Ryzen 3100 machine

System:
Gigabyte B550 Aorus Elite Pro
Ryzen 3100
Sandisk 32GB USB sticks

 Seeing the following error during the boot of the install USB stick, imaged by Rufus from ISO.

CRC error during decompression, Received CRC (<snip>) != calculated CRC (<snip>)
gzip_extract failed for /vmx.v00 (size 0): CRC error
Error 28 (CRC) error while loading module: /vmx.v00
Compressed MD5: <snip>
Decompressed MD5: 0000000000000<snip>
Fatal error: 28 (CRC Error)

Tried:

  • Different USB ports
  • Different ESXI versions (6.7 produced similar errors) 
  • Different USB sticks
  • Different partition types (MBR vs GPT)
  • Booting from an existing ESXI 6.7 install

Resolution found after these two steps: 

  • Disabled CSM (Compatibility Support Mode) in the UEFI settings
  • Ensured the machine booted from the UEFI bootloader on the USB stick. For some reason the BIOS wanted to boot from "VMWare USB FDMAP" or something, but there were two additional boot entries that were prefixed with "UEFI: " and that worked like a charm.

 

Searching for the CRC 28 error found zero helpful hits, so hopefully this will help provide relevant resolutions for someone.