Vagrantfile

From wikieduonline
Revision as of 15:13, 11 April 2021 by Welcome (talk | contribs)
Jump to navigation Jump to search


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

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

It will create a 2 CPU 2 GB memory machine.

To login use:

  • Username: vagrant
  • Password: vagrant


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



Related terms

See also

Advertising: