Class: BeakerHostGenerator::Hypervisor::Lima

Inherits:
Interface
  • Object
show all
Includes:
Data
Defined in:
lib/beaker-hostgenerator/hypervisor/lima.rb

Overview

Implementation of the Lima hypervisor interface to generate host configurations for nodes that use Lima as their hypervisor.

Constant Summary

Constants included from Data

Data::BASE_CONFIG, Data::MAIN_PE_VERSION, Data::PE_TARBALL_SERVER, Data::PE_USE_WIN32

Instance Method Summary collapse

Methods included from Data

base_host_config, generate_osinfo, get_osinfo, get_platform_info, get_platforms, osinfo, osinfo_bhgv1, pe_dir, pe_upgrade_version, pe_version

Methods inherited from Interface

#global_config, #initialize

Constructor Details

This class inherits a constructor from BeakerHostGenerator::Hypervisor::Interface

Instance Method Details

#generate_node(node_info, base_config, bhg_version) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/beaker-hostgenerator/hypervisor/lima.rb', line 11

def generate_node(node_info, base_config, bhg_version)
  # Generate the Lima template URL based on the OS type
  template = get_template(node_info['ostype'])
  arch =  case node_info['bits']
          when '64'
            'x86_64'
          when 'AARCH64'
            'aarch64'
          end

  base_config['lima'] = {
    'config' => {
      'arch' => arch,
      'vmType' => 'qemu',
      'base' => [template],
    },
  }

  base_generate_node(node_info, base_config, bhg_version, :lima)
end