Граф коммитов

6018 Коммитов

Автор SHA1 Сообщение Дата
lubaihua33 a0ea8b2974
Make the orignal vhd path as the image name of the test result message (#3208) 2024-03-13 12:56:11 +08:00
Lili Deng 3703dbd399 util: make deepcopy in set_filtered_fields 2024-03-12 22:35:15 +08:00
r-dailey e741b4a7ea
Updated gcc.py to enable gcc installation on FreeBSD (#3205)
* test channge for fixing gcc issue

* changed azure.yml for TESTING

* removed testing changes from azure.yml and old code from gcc.py

* Removed gcc comment version

* Removed testing changes
2024-03-11 23:53:03 -07:00
rydailey bb4d477171 Added Windows to the list of unsupported OS 2024-03-12 08:26:39 +08:00
rydailey b5c656308c added flag to verify_ringbuffer_settings_changes 2024-03-12 08:26:39 +08:00
Aditya Nagesh 045cf81d2f verify_key_vault_extension: Limit kv name to 24 chars 2024-03-08 11:15:34 +05:30
kanchansenlaskar c65c2c7c21 Use sudo with cat /etc/waagent.conf and use cat.read 2024-03-08 08:51:22 +08:00
Aditya Nagesh b16bdbdd25
PythonVenv tool (#3094)
* Add Lisa Tool for Python Virtualenv

* GPU Pytorch case: Replace Python and Pip tool with PythonVenv

* PythonVenv: Accept path in init

* Apply lint

* PythonVenv: Change default name for venv

Change default name from 'venv' to timestamp. This is to
avoid the side effects of env being resued by multiple tests

* PythonVenv: Remove default venv path

* PythonVenv: Move Public methods above pvt methods

* PythonVenv: Fix PurePath for node

* GPU Pytorch: Increase required size to 20GB

* PythonVenv: Use local cache and build path

Use venv path as cache and build path, this is to
avoid OS disk out of space issue.

* Implement package cleanup

Implement package cleanup and invoke during GPU Pytorch test.
2024-03-07 08:39:01 -08:00
Aditya Nagesh 93389c41d1 Implement package cleanup
Implement package cleanup for Linux.
2024-03-07 08:37:46 -08:00
kanchansenlaskar 8202d79be9 XDPdump change llvm version change to 18
llvm-toolchain-mantic-15 no more exists.
18 exists for bionic and upwards.
2024-03-05 12:27:24 -08:00
Purna Pavan Chandra Aekkaladevi 43069843d3 libvirt transformers: Increase reboot timeout
server grade machines might take longer time to reboot.
Hence, increase the reboot timeout.
2024-03-04 08:32:53 -08:00
Kameron Carr e8286d4fd3 verify_timedrift_corrected: Leap year
Creating a time stamp with year `current_year - 2` will fail on Feb 29 because there is no Feb 29 for two years ago. This test case only requires the time difference to be significantly larger than 5 minutes.
2024-03-04 10:28:24 +08:00
Lili Deng 4e8ed1611d hyperv: skip for setting secure boot for gen1 vhd 2024-03-03 11:27:56 +08:00
Kameron Carr 974aabcd5c Make data_path nullable
Making data_path nullable will allow us to add it to a runbook without specifying a default value.
2024-03-02 09:52:23 +08:00
Anirudh Rayabharam 3361817705
Hyper-V platform (#3152)
* tools: hyperv: add function to get first switch

Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>

* tools: hyperv: add function to convert VHD <-> VHDX

Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>

* tools: hyperv: allow choosing vm generation and secure boot

While at it, surrount all arguments to New-VM with "" (double-quotes).

Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>

* sut_orchestrator: basic Hyper-V platform

Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>

* shell: fix mkdir with parents for Windows node

spurplus is unable to create parent directories when the target node is
a Windows node. This is because it expects only posix paths and its
parent creation logic doesn't work well with Windows paths. In these
cases spurplus throws OSError.

To fix this, catch the OSError exception and fallback to using the mkdir
command to create the directory.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator/hyperv: obtain node credentials from runbook

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: remove commented code

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: fix formatting and type-checking issues

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: move get_node_context() to context.py

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: implement _delete_environment

Delete each VM by calling delete_vm() of HyperV tool.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/hyperv: COM port configuration support

Introduce support for configuring COM ports using Set-VMComPort. This is
useful for obtaining serial console output from the virtual machine.

This functionality will be utilized in the Hyper-V platform.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/hyperv: no need to set com_ports to empty

Configure COM ports only when com_ports is not None.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/hyperv: add support for experimental flags

Enhance create_vm function to support VM processor experimental flags.
When this parameter is supplied, it is passed as-is to the Set-VMProcessor
cmdlet. Also, the "-Experimental" flag is passed to the New-VM cmdlet to
enable experimental features for that VM.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: support VP experimental flags

Support experimental flags for Virtual Processors (VP). These flags will
be passed as-is to the Set-VMProcessor cmdlet during VM creation.

This is an optional field in the runbook.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: serial console support

Configure COM ports for the VM using the Set-VMComPort cmdlet. The
serial console output from the guest would then be sent to the named
pipe specified when invoking Set-VMComPort.

The named pipe is not a regular file that can simply be read the usual
way. So, we use a helper Powershell script that uses the
NamedPipeClientStream .NET class to read the named pipe and write the
contents to a regular file. This helper script it copied to the server
node during environment deployment.

The powershell script is run a scheduled task. This way it runs in the
background and is not dependent on a Powershell session. This seems to
the most reliable way to run a Powershell script in the background. The
scheduled task is "started" during node deployment. The script exits
automatically if the pipe is no longer available (for e.g., VM deleted).
So, in the node delete path, just unregister the scheduled task.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: remove unnecessary prints

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: capabilities and requirements handling

Reconcile node requirements with host capabilities. Make sure the
requirements can be handled by the host.

Inspired by the libvirt platform implementation.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: set node name

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/hyperv: support extra args for create_vm

Allow passing per-command extra args to create_vm(). The key of the
dictionary is the command and the value is the string containing the
extra arguments to that command.

This is useful for passing experimental arguments from the runbook.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: improved support for experimental args

Support passing per-command extra args through the runbook. Currently,
these extra args are respected only for New-VM and Set-VMProcessor
cmdlets. This option will be used to opaquely pass experimental flags
during Hyper-V VM creation.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: add copyright headers

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools: hyperv: apply extra args throughout create_vm

Introduce a helper function _run_hyperv_cmdlet() that can be called from
places where extra args can be applied.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use parellel utils to run serial log script

Use run_in_parallel_async to run the serial logging PS script. This
ensures that LISA is able to retrieve the script output and catch
errors.

While at it, rename the script from serial_console_helper.ps1 to
serial_console_logger.ps1 and add some extra logging in it.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: refactor zipped vhd handling

Extract out a helper function _unzip_vhd() to handle extracting the VHD
from an archive. This will be called if the VHD file provided via
runbook has a .zip extension.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: osdisk_size_in_gb runbook option

Introduce a new runbook parameter osdisk_size_in_gb similar to other
platforms. Handle this parameter by resizing the VHD before creating the
VHD. Resize it only if the original size of the VHD is less than the
size configured with osdisk_size_in_gb.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: convert extra_args command to lowercase

Convert the command names in extra_args to lowercase before passing it
on to convert_vm().

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: logging fixes

Remove one unnecessary print and add logs before and after copying VHD
to the server.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/ls: remove extraneous back tick in WindowsLs

Extraneous ` (back tick) causes error while using this tool.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/cp: add Windows variant

Add a Windows variant of the cp tool. Use the Copy-Item cmdlet under the
hood to achieve the required functionality.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/unzip: add Windows variant

Add WindowsUnzip tool. Use the Expand-Archive cmdlet to achieve the
unzip functionality.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: remove unused import in serial_console.py

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: get rid of hard-coded paths

Replace hard-coded paths with appropriate path under the server node's
local_working_path.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: replace raw commands with tools

Use the Cp, Ls & Unzip tools instead of raw commands.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: minor re-arrangement and style fix

- Return early if there are no runbook requirements
- Convert extra_args to lowercase only once
- Insert blank line for aesthetics

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/cp: use Optional[PurePath] instead of PurePath | None

Fixes PR gate failure.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools/unzip: use mkdir tool instead of raw command

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: cleanup dead code

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* Revert "tools: hyperv: add function to convert VHD <-> VHDX"

This reverts commit 825ebee591.

* sut_orchestrator: hyperv: fix nox failure

Use Optional[Path] instead of Path | None.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* util: shell: remove extra new line

New line crept in while resolving merge conflict.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* mixin_modules: remove unnecessary import and try/catch block

try catch block is not needed since there are no packages for Hyper-V.

schema file doesn't need to be imported here.

Add comments to better organize the imports.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: remove unnecessary prints

These prints were added for debugging during early development and are
no longer required.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: fix multiple server warning message

Fix the message to not be too wordy. Also, it should say "first server"
instead of just "server".

As suggested by Chi, change log level to info.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use utility to filter out ANSI escape codes

Use the filter_ansi_escape() util function.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: shorten logger names

Shorten logger names for the platform and the server node.

Just "hyperv" is sufficient. Improves logs readability by showing
important information without scrolling right.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: documentation in logger PS script

Add detailed comments to document various aspects of the script such as
different timeouts for initial connect & reconnect and the brief pipe
close that happens when VM is rebooted.

While at it, make the initial connect timeout configurable.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use mib in host capabilities

Keep it similar to other places.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: compute host capabilities only once

Compute the first time and cache it for later use.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: clean up _initialize()

Extract parts of _initialize() out into smaller functions to make it
cleaner.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: rename server_node to host in NodeContext

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: copy & extract VHD only once

Copy the VHD to the server only once. If zipped, extract it and create a
"common" VHD. A copy of this common VHD is made on the server for each
node to be deployed.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: better path managment

Create a directory for each VM in the server_node's working dir to store
the VHD and console logs for the VM. Any VM specific files introduced in
the future should also go here.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: refactor capabilities checking

Get rid of the _configure_node_capabilities method and move the logic
into _prepare_environment(). _check_host_capabilities() is unused: so
call it in _prepare_environment().

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyeprv: rename things as per code review

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: fix host free memory calculation

The Get-CimInstance cmdlet return values in KB. So, divide by 1024 only
once to obtain the MB value.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: get rid of vhd_path in NodeContext

The stored value is never used later.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: don't override __init__

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: support only one node for now

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: enforce cpu capabilities & reserve memory for host

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: get rid of _deploy_nodes()

Move the logic to _deploy_environment().

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use node_context.working_path for vhd

Instead of _server.working_path.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: node naming similar to Azure Platform

Use environment name and node index to generate node name.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* tools: hyperv: refactor the default switch code

Rename the method to get_default_external_switch() and modify the PS
command to return only external switches. Introduce a class VMSwitch to
represent a switch. Currently, `name` is the only property and more can
be added later.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use get_default_external_switch()

assert if no external switch is found.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: fix extra '.' in source vhd name

plathlib.PurePath.suffix includes the '.'. No need to add it again.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: rename free_memory_mib to allocable_memory_mib

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: rename _check_host_capabilities

Rename it to _is_host_resources_enough.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: Introduce VHDSource

It is a way of declaring where the VHD is to be obtained from. For now
only LocalVHDSource is implemented i.e. VHD is obtained from the local
filesystem on LISA host. Other sources can be implemented as needed.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* Revert "sut_orchestrator: hyperv: rename _check_host_capabilities"

This reverts commit 94929e81e0.

* sut_orchestrator: hyperv: rename _check_host_capabilities

To _is_host_resources_enough

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: introduce VhdSchema

This will be used to add metadata to the Vhd. For now it will have only
vhd_path. Introduce an ImageSchema in the root folder to declare common
metadata with Azure platform. VhdSchema inherits from ImageSchema.

vhd_path is optional because user can choose to specify vhd via Source.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: overhaul source schema and implementation

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: change node_capabilities name to hyperv

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: rename _artifact_files to _source_files

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: get rid of default value for mandatory field

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: fix VM naming scheme

The existing naming scheme results in conflicting VM names across
parallel LISA runs. Use prefix similar to the resource group name used
in Azure platform.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: simplify LocalSource implementation

Assume that destination is always a dir. This simplifies the logic in
multiple places.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: delete nodes in parallel

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: get rid of temp directory for zip files

Copy the zip file to the actual destination directory. After unzip, the
zip file is deleted anyway.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: add wait_delete option

The `wait_delete` option can be used to configure if during environment
delete, the platform waits for the VM delete to finish or performs the
operation asynchronously.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use run_cmdlet_async for serial logger

run_in_parallel_async() blocks until the process exits but if
keep_environment is "always" then the process would never exit and the
lisa process never exits. There is no way to cancel the tasks because
the underlying ThreadPoolExecutor doesn't provide a way to kill running
threads.

run_cmdlet_async works perfectly for reading the serial logs. Use that
instead.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use RemoteCopy tool to copy source files

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: fix naming of private members in LocalSource

Prefix private member names with '_'.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: misc fixes in Source

- Use PurePath instead of PureWindowsPath in order to allow
  consolidation of Source classes in the future.
- Receive parent logger from caller
- Use server.get_pure_path() instead of PureWindowsPath directly.
- Add helpful message for one assert.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: remove redundant __init__()

__init__() in LocalSource just calls the parent method. So, it can be
removed.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: use PurePath instead of PureWindowsPath

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: accept parent_logger in source constructor

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

* sut_orchestrator: hyperv: add kwargs to Source constructor

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>

---------

Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>
Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
2024-03-02 00:17:26 +08:00
Aditya Nagesh 22b056eaee
Add prefix "lisa-" for keyvaults created by LISA testcases (#3194)
* verify_key_vault_extension: add lisa prefix to keyvault

Add "lisa-" prefix to keyvault created by verify_key_vault_extension.
This is to maintain consistency with other resources created by LISA

* disk encryption test: Add lisa- prefix for keyvault

Add "lisa-" prefix to keyvault. This is to remain consistent
with other resources that LISA creates.

* verify_key_vault_extension: Change Cert naming

Create cert name as randomized alpha numeric string of
length 6. This will reduce potential conflicts
2024-03-01 23:55:25 +08:00
Srikanth Myakam b5abf6830f Fix fips kernel installation issues 2024-03-01 12:43:13 +08:00
panfengxue 2f1d8f59e9 add RG-scoped Resource Group support in LISA 2024-03-01 11:36:34 +08:00
SrikanthMyakam 4c89a92fcc
Distinguish between local NVMEs and remote disks when disc controller type is NVMe (#3164)
* Support for NVMe testcases when disc controller type is NVMe

* fix comments

---------

Co-authored-by: Srikanth Myakam <smyakam@microsoft.com>
2024-02-29 23:31:25 +08:00
Lili Deng a71bcc538b bicep - add missed dependency in autogen_arm_template.json 2024-02-29 15:49:31 +08:00
Smit Gardhariya 15b1fc2281
CLH Test: Remove unstable option and json format option (#3189)
--format and -Z options are available with nightly tool chain only
with latest rustup and no longer supported with stable version.

This will remove unstable option arg to run integration/livemigration
test of CLH.

We will make changes to extract result from stdout as format
option is also removed

Signed-off-by: Smit Gardhariya <sgardhariya@microsoft.com>
2024-02-27 22:00:03 +05:30
lubaihua33 e03ad8f26d
Use minimal shell type if the system doesn't support bash (#3184) 2024-02-27 08:57:14 +08:00
Lili Deng b1f395595f bicep - add missed dependency 2024-02-26 10:15:06 -08:00
Lili Deng ce972ac5e2 Bicep - enable it by default 2024-02-24 16:39:12 +08:00
Lili Deng 8a8e51d1cc disk: handle when passed disktype is empty 2024-02-24 16:12:40 +08:00
LiliDeng 5a5a6a20cb
Support Bicep (#3163)
* Support Bicep

* add doc

* fix for different types of resources
2024-02-23 08:18:11 +08:00
Kameron Carr f243ecbab9 Repo Package Installer
Transformer installs packages from a repo.
2024-02-22 14:01:34 -08:00
SrikanthMyakam 9330ebcea0
Remove Debian repos method added. (#3180)
remove_ubuntu_repo() added
2024-02-22 13:49:06 +05:30
Yi 971598411b update pillow to 10.2.0 to fix vul 2024-02-21 20:20:41 -08:00
Kameron Carr b146d15d66 Change default Architecture
For maximize_capability, the capability needs to accept both x64 and Arm64 architectures. When it just defaults to x64, this blocks deployment of non-GA Arm64 SKUs and images.
2024-02-19 22:47:16 +08:00
Lili Deng 24789191f0 xfstests - use latest stable branch 2024-02-19 08:09:57 +08:00
Chi Song (from Dev Box) e03975bbb9 Azure: fix available vm sizes may not be used in next locations. 2024-02-18 09:22:50 +08:00
Chi Song (from Dev Box) 7765012928 shell: fix output missed on local Linux node.
With the fix, pty is only enabled for remote Linux.
2024-02-16 12:25:28 -08:00
Anirudh Rayabharam 935ac78a6b tools/remote_copy: return destination file paths
Return the copied file paths in the destination. This is useful for
source implementations.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
2024-02-16 11:50:48 -08:00
Kameron Carr b7abb8e7ce DisableCloudComponents: Typo fix
Had a typo fix for disabling waagent. Also completely removing the waagent package was not intended.
2024-02-13 11:07:43 -08:00
Anirudh Rayabharam 7fdb0283f4 tools/hyperv: async version of delete_vm()
Introduce delete_vm_async() that internally calls run_cmdlet_async().
Refactor delete_vm() to use delete_vm_async() internally and wait for
the result.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
2024-02-12 14:51:11 -08:00
Anirudh Rayabharam 850c452a36 tools/powershell: add async version of run_cmdlet
Introduce new function run_cmdlet_async() that, as the name suggests,
runs the given cmdlet in an asynchronous manner i.e. doesn't wait for
the result. It returns the `Process` to the caller.

Refactor the implementation of run_cmdlet to use run_cmdlet_async
internally.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
2024-02-12 14:51:11 -08:00
Smit Gardhariya e9ec928b10
Use shipped hypervisor-fw/OVMF-fw for Cloud-Hypervisor Tests (#3171)
This commit contains changes to use custom binaries for
cloud-hypervisor tests when needed.

We will set appropriate env vars for it and cloud-hypervisor
will decide which binaries (upstream/custom) need to be uses.

Signed-off-by: Smit Gardhariya <sgardhariya@microsoft.com>
2024-02-13 00:22:34 +05:30
Kameron Carr da43877331 DisableCloudComponents
Transformer to disable cloud-init and walinuxagent so that an exported VHD can boot in a lab environment.
2024-02-08 09:40:13 -08:00
Anirudh Rayabharam 518306e21f tools: hyperv: refactor the default switch code
Rename the method to get_default_external_switch() and modify the PS
command to return only external switches. Introduce a class VMSwitch to
represent a switch. Currently, `name` is the only property and more can
be added later.

Signed-off-by: Anirudh Rayabharam <anrayabh@microsoft.com>
2024-02-08 09:40:01 -08:00
Anirudh Rayabharam 903bd2d017 tools: hyperv: add function to get first switch
Signed-off-by: Anirudh Rayabharam <anrayabh@linux.microsoft.com>
2024-02-08 09:40:01 -08:00
smit-gardhariya cac5fce174 Consume bindigs.rs for MSHV ioctl/bindings test
This will consume bindings.rs file if provided
before running the test, otherwise it will run
with upstream bindings.rs file.

Signed-off-by: Smit Gardhariya <sgardhariya@microsoft.com>
2024-02-08 22:06:17 +08:00
Kameron Carr 3e2bd16ac6 irqbalance: bypass systemd
Use the irqbalance command to get debug information instead of setting systemd settings.
2024-02-08 11:37:20 +08:00
Kameron Carr a75cfdda41 Availability default and max_cap
Add a catch for if maximize_capability is set and the availability type is set to default. It should use availability sets if the tags or properties are set.
2024-02-07 11:35:19 -08:00
Kameron Carr acf03627c7 VhdTransformer: Option to skip deprovision
For lab environment, the entire waagent / cloud-init package needs to be removed. This will cause VhdTransformer to fail when getting waagent tool.
2024-02-07 08:30:22 -08:00
Chi Song (from Dev Box) 2c16e32001 Azure: Remove unused location in platform 2024-02-02 18:52:36 +08:00
Chi Song (from Dev Box) a98190c508 Azure: fix error on resolving image version with multiple locations.
The original code hasn't use the latest runbook to resolve image. So the location is not set to single value.
2024-02-02 18:52:36 +08:00
SrikanthMyakam 1174b5b873
'purchase_plan' support for vhd images. (#3112)
* 'purchase_plan' support for vhd.

'purchase plan' is needed for vhds created using marketplace images with purchase plans.

* Update common.py
2024-02-01 09:48:04 +08:00
Kameron Carr 9c2adcbbf2
Case insensitive sku family check (#3156)
* Case insensitive sku family check

Make the checks for sku family case insensitive to avoid bugs.

* Update API verison

Need newer version for stateless TDX deployment.
2024-01-31 11:01:58 +08:00
SrikanthMyakam dd04550ddd
fio - keep numjob always under 256 (#3137)
In fio test, numjob*max_iodepth (aio-nr) should always be less than aio-max-nr.
The default value of aio-max-nr is 65536.
As max_iodepth is 256, numjob which is equal to 'nproc' should not exceed 256.
/proc/sys/fs/aio-nr is the number of events currently active.
/proc/sys/fs/aio-max-nr is the maximum number of events that can be queued.
If aio-nr reaches aio-max-nr the io performance will drop and io_setup will
fail with EAGAIN.
read: https://www.kernel.org/doc/Documentation/sysctl/fs.txt
So we set numjob to 256 if numjob is larger than 256.

Authored-by: Srikanth Myakam <smyakam@microsoft.com>
2024-01-30 20:13:26 +05:30