Class: OsVm::VpsadminosMachineConfig

Inherits:
MachineConfig show all
Defined in:
lib/osvm/machine_config.rb

Instance Attribute Summary collapse

Attributes inherited from MachineConfig

#boot_mode, #boot_order, #cpu, #cpus, #disks, #extra_qemu_options, #initrd, #iso, #kernel, #kernel_params, #labels, #memory, #networks, #qemu, #shared_filesystems, #shell_names, #spin, #tags, #test_shell_transport, #test_shells, #toplevel, #virtiofsd

Instance Method Summary collapse

Methods inherited from MachineConfig

#all_disks, from_config, load_file, validate_config!

Constructor Details

#initialize(cfg, allocate_resources: true) ⇒ VpsadminosMachineConfig

Returns a new instance of VpsadminosMachineConfig.

Parameters:

  • cfg (Hash)

Raises:

  • (ArgumentError)


400
401
402
403
404
405
406
407
# File 'lib/osvm/machine_config.rb', line 400

def initialize(cfg, allocate_resources: true)
  @squashfs = cfg['squashfs']
  super

  return unless boot_mode == 'direct'

  raise ArgumentError, "missing 'squashfs' for direct boot machine" if @squashfs.nil?
end

Instance Attribute Details

#squashfs ⇒ String (readonly)

Returns path to squashfs rootfs image.

Returns:

  • (String) —

    path to squashfs rootfs image



397
398
399
# File 'lib/osvm/machine_config.rb', line 397

def squashfs
  @squashfs
end