mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-01-07 14:33:08 -06:00
63d265d9ca
For testing certain scenarios with vagrant-libvirt, need in the guest system a value for the systems serial number in the DMI/SMBIOS system information. The domain https://libvirt.org/formatdomain.html#smbios-system-information format of libvirt allows to specify those values. While adding `-smbios type=1,serial=$serial_value` to the `qemuargs` parameter of the libvirt provider is already able to achieve this, a dedicated provider config value adds native support from the `Vagrantfile` layering system. For example, in the .box included Vagrantfile a random serial number can be enforced by adding the following: require 'securerandom' Vagrant.configure("2") do |config| config.vm.provider :libvirt do |libvirt| libvirt.dmi_system_serial = SecureRandom.alphanumeric(8).upcase end end Then in an instance specific Vagrantfile this value can be overwritten by adding: Vagrant.configure("2") do |config| config.vm.provider :libvirt do |libvirt| libvirt.dmi_system_serial = "ABCDEFGH" end end Co-authored-by: Nils Ballmann <nils.ballmann.ext@siemens.com> Co-authored-by: Darragh Bailey <daragh.bailey@gmail.com> |
||
---|---|---|
.. | ||
_assets | ||
_includes | ||
_sass/custom | ||
assets | ||
_config.yml | ||
.gitignore | ||
404.html | ||
about.markdown | ||
boxes.markdown | ||
configuration.markdown | ||
examples.markdown | ||
Gemfile | ||
Gemfile.lock | ||
index.markdown | ||
installation.markdown |