Skip to content

petri: don't create vms with super long names #1647

Open
@mattkur

Description

@mattkur

The Hyper-V platform limits VM names to 100 characters. Petri gives VMs the name of the test. Creating a VM with > 100 character name fails with something like the following:

    ---- multiarch::openhcl_servicing::hyperv_openhcl_uefi_aarch64_ubuntu_2404_server_aarch64_openhcl_servicing ----
    new_vm: command exited with non-zero status (exit code: 1): New-VM : Failed to create a new virtual machine.
    An unexpected error occurred: The parameter is incorrect. (0x80070057).
    Failed to create a new virtual machine.
    'New Virtual Machine' encountered an unexpected error: The parameter is incorrect. (0x80070057). (Virtual machine ID

    23BD56A5-63F1-4DC4-B169-D69E952B7364)
    At line:1 char:1
    + New-VM -Name "multiarch::openhcl_servicing::hyperv_openhcl_uefi_aarch ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [New-VM], VirtualizationException
        + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.NewVM

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtestingRelated to our automated tests and infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions