Make disabling and configuring memballoon possible (#1434)

The memballoon settings didn't have any effect as the variables read in
the template were not defined
This commit is contained in:
Ruben Kerkhof 2022-01-17 14:20:25 +01:00 committed by GitHub
parent a1f0b74e92
commit 6ba7dcf178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,12 @@ module VagrantPlugins
# RNG device passthrough # RNG device passthrough
@rng = config.rng @rng = config.rng
# Memballoon
@memballoon_enabled = config.memballoon_enabled
@memballoon_model = config.memballoon_model
@memballoon_pci_bus = config.memballoon_pci_bus
@memballoon_pci_slot = config.memballoon_pci_slot
config = env[:machine].provider_config config = env[:machine].provider_config
@domain_type = config.driver @domain_type = config.driver
@ -322,6 +328,12 @@ module VagrantPlugins
env[:ui].info(" -- TPM Path: #{@tpm_path}") env[:ui].info(" -- TPM Path: #{@tpm_path}")
end end
if @memballoon_enabled
env[:ui].info(" -- Memballoon model: #{@memballoon_model}")
env[:ui].info(" -- Memballoon bus: #{@memballoon_pci_bus}")
env[:ui].info(" -- Memballoon slot: #{@memballoon_pci_slot}")
end
@boot_order.each do |device| @boot_order.each do |device|
env[:ui].info(" -- Boot device: #{device}") env[:ui].info(" -- Boot device: #{device}")
end end