waft.cli.vm module

waft.cli.vm.create(image: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50d9f48b90>], system_name: ~typing.Annotated[str | None, <typer.models.OptionInfo object at 0x7f50d9f27490>] = None, cloud_provider: ~waft.enums.Annotated[~waft.enums.CloudProvider, <typer.models.OptionInfo object at 0x7f50d9b37f90>] = CloudProvider.AZURE, username: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7f50d9b48990>] = 'waft-admin', resource_group: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x7f50d9b48a90>] = 'waft-vms', force: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f50d9b48bd0>] = False, config: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f50db06bf90>] = None)

Create a new VM system.

Only a VM image name is required. All other options have sensible defaults for typical usage but can be overridden.

System Name Auto-Generation: - If –system/-@ is not provided, the image name will be used as the system name - If a system with that name already exists in the config, an error will be raised - Use –system/-@ to specify a custom name when creating multiple VMs of the same image - Use –force to overwrite an existing system with the same name

Examples

waft vm create ubuntu_22_04_multiarch_intel # Auto-names system as image name waft vm create ubuntu_22_04_multiarch_intel -@ my-test-vm # Creates system named “my-test-vm” waft vm create windows_11_intel –system my-windows-vm # Creates system named “my-windows-vm”

waft.cli.vm.destroy(systems: ~typing.Annotated[list[str], <typer.models.OptionInfo object at 0x7f50db3bee90>] = SystemsDefault.ALL, config: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f50db06bf90>] = None)

Destroy one or more WAFT configured VM systems.

If no systems are specified, will prompt to destroy all VMs with hostnames. You can specify individual systems or groups. When a group is specified, all systems in that group will be destroyed.

Examples

waft vm destroy -@ system1 waft vm destroy -@ system1 -@ system2 waft vm destroy -@ groupA # Destroys all systems in groupA waft vm destroy # Prompts to destroy all VMs with hostnames

waft.cli.vm.images()

List available VM images that can be used with –vm-spec.

waft.cli.vm.inspect(system: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50daf2af50>], config: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f50db06bf90>] = None)

Test the SSH connection to a VM.

The system must be specified with -@/–system flags.

Example

waft vm inspect my-system

waft.cli.vm.redeploy(systems: ~typing.Annotated[list[str], <typer.models.OptionInfo object at 0x7f50db3bee90>] = SystemsDefault.NONE, config: ~typing.Annotated[~pathlib.Path | None, <typer.models.OptionInfo object at 0x7f50db06bf90>] = None)

Redeploy VMs for multiple systems.