From ebfa1e3ebe3f7b545970db76db316996490f0381 Mon Sep 17 00:00:00 2001 From: Adrian Almenar Date: Wed, 20 Mar 2024 17:30:09 +0100 Subject: [PATCH] This makes libvirt guest name to be closer to whats virtualbox does, and avoid conflicts in shared libvirt environments without a lot of configs. --- templates/Vagrantfile.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/Vagrantfile.erb b/templates/Vagrantfile.erb index 3849000..e9a27e6 100644 --- a/templates/Vagrantfile.erb +++ b/templates/Vagrantfile.erb @@ -126,6 +126,8 @@ Vagrant.configure("2") do |c| <% config[:customize].each do |key, value| %> <% case config[:provider] when "libvirt" %> + p.default_prefix = '<%="kitchen-#{File.basename(config[:kitchen_root])}-#{instance.name}-"%>' + p.random_hostname = true <% if key == :storage %> <% if value.is_a? String %> p.storage <%= value %>