Virtual machines configuration

Overview

Definition of TAPI to configure virtual machines. More…

// global functions

te_errno tapi_cfg_vm_add(const char* ta, const char* vm_name, const char* tmpl, bool start);
te_errno tapi_cfg_vm_del(const char* ta, const char* vm_name);
te_errno tapi_cfg_vm_start(const char* ta, const char* vm_name);
te_errno tapi_cfg_vm_stop(const char* ta, const char* vm_name);
te_errno tapi_cfg_vm_add_drive(const char* ta, const char* vm_name, const char* drive_name, const char* file, bool snapshot);
te_errno tapi_cfg_vm_pass_pci(const char* ta, const char* vm_name, const char* pci_pt_name, unsigned long vendor, unsigned long device, unsigned long instance);

Detailed Documentation

Definition of TAPI to configure virtual machines.

Copyright (C) 2019-2022 OKTET Labs Ltd. All rights reserved.

Global Functions

te_errno tapi_cfg_vm_add(const char* ta, const char* vm_name, const char* tmpl, bool start)

Add virtual machine.

Parameters:

ta

Test Agent.

vm_name

Virtual machine name.

tmpl

NULL or virtual machine configuration template.

start

Start it just after addition and template apply

Returns:

Status code

te_errno tapi_cfg_vm_del(const char* ta, const char* vm_name)

Delete virtual machine.

Parameters:

ta

Test Agent.

vm_name

Virtual machine name.

Returns:

Status code

te_errno tapi_cfg_vm_start(const char* ta, const char* vm_name)

Start virtual machine.

Parameters:

ta

Test Agent.

vm_name

Virtual machine name.

Returns:

Status code

te_errno tapi_cfg_vm_stop(const char* ta, const char* vm_name)

Stop virtual machine.

Parameters:

ta

Test Agent.

vm_name

Virtual machine name.

Returns:

Status code

te_errno tapi_cfg_vm_add_drive(const char* ta, const char* vm_name, const char* drive_name, const char* file, bool snapshot)

Add drive subtree.

Parameters:

ta

Test Agent.

vm_name

Virtual machine name.

drive_name

Drive name.

file

File option.

snapshot

Snapshot option.

Returns:

Status code

te_errno tapi_cfg_vm_pass_pci(const char* ta, const char* vm_name, const char* pci_pt_name, unsigned long vendor, unsigned long device, unsigned long instance)

Pass PCI function to virtual machine.

Parameters:

ta

Test Agent.

vm_name

Virtual machine name.

pci_pt_name

PCI function name.

vendor

Vendor component of PCI address.

device

Device component of PCI address.

instance

Instance component of PCI address.

Returns:

Status code