Difference between revisions of "Vagrantfile"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 1: Line 1:
  
 
* [[Vagrantfile example]]
 
* [[Vagrantfile example]]
 +
 +
Vagrant.configure("2") do |config|
 +
  config.vm.box = "generic/ubuntu1804"
 +
  config.vm.define "YOUR_VM_MACHINE_NAME"
 +
 +
  config.vm.provider :libvirt do |libvirt|
 +
    libvirt.default_prefix = ""
 +
  end
 +
end
  
  

Revision as of 12:01, 11 April 2021

Vagrant.configure("2") do |config|
  config.vm.box = "generic/ubuntu1804"
  config.vm.define "YOUR_VM_MACHINE_NAME"

  config.vm.provider :libvirt do |libvirt|
    libvirt.default_prefix = ""
  end
end


Vagrant.configure("2") do |config|
 config.vm.box = "bento/fedora-32"
end
Vagrant.configure("2") do |config|
  config.vm.box = "fedora/32-cloud-base"
end

Including a hostname

Vagrant.configure("2") do |config|
  config.vm.box = "fedora/32-cloud-base"
  config.vm.define "YOUR_HOSTNAME_MACHINE"
end

Including a hostname and removing default prefix

Vagrant.configure("2") do |config|
  config.vm.box = "fedora/32-cloud-base"
  config.vm.define "YOUR_HOSTNAME_MACHINE"

  config.vm.provider :libvirt do |libvirt|
    libvirt.default_prefix = ""
  end 
end



See also

Advertising: