3
This commit is contained in:
parent
4b872eb207
commit
5a7073b650
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.vagrant/
|
34
Vagrantfile
vendored
34
Vagrantfile
vendored
@ -1,6 +1,19 @@
|
|||||||
|
|
||||||
$ENALBE_SYNC_FOLDER = false
|
$ENALBE_SYNC_FOLDER = false
|
||||||
$HOST_NET = "204-net"
|
|
||||||
|
$ENALBE_SYNC_FOLDER = true if File.exist?("sync_shared")
|
||||||
|
|
||||||
|
$HOST_NET = File.readlines('net').first.chomp
|
||||||
|
$VM_NAME = File.readlines('vmname').first.chomp
|
||||||
|
$VM_MEM = File.readlines('vmmem').first.chomp.to_i
|
||||||
|
$VM_VCPU = File.readlines('vmcpu').first.chomp.to_i
|
||||||
|
|
||||||
|
$BOX = File.readlines('box').first.chomp
|
||||||
|
|
||||||
|
|
||||||
|
# Will not work on Hyper-V
|
||||||
|
#$VM_DISK_SIZE = File.readlines('disksize').first.chomp
|
||||||
|
|
||||||
|
|
||||||
$PROVISION_SSH_KEY_SCRIPT=<<EOF
|
$PROVISION_SSH_KEY_SCRIPT=<<EOF
|
||||||
mkdir -p /root/.ssh
|
mkdir -p /root/.ssh
|
||||||
@ -17,24 +30,19 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
config.vm.box = "almalinux/8"
|
config.vm.box = $BOX
|
||||||
|
|
||||||
# config.ssh.forward_agent = false
|
## Remember to generate the vagrant private key.
|
||||||
# config.ssh.insert_key = true
|
## ssh-keygen -f C:\Users\eliezer\.ssh\vagrant
|
||||||
|
|
||||||
config.ssh.insert_key = false
|
config.ssh.insert_key = false
|
||||||
|
|
||||||
# config.ssh.username = "vagrant"
|
|
||||||
# config.ssh.password = "vagrant"
|
|
||||||
# config.ssh.private_key_path = "~/.vagrant.d/insecure_private_key"
|
|
||||||
# config.ssh.private_key_path = "~/.ssh/id_rsa"
|
|
||||||
# config.ssh.private_key_path = ['~/.ssh/vagrant' ]
|
|
||||||
config.ssh.private_key_path = ['~/.ssh/vagrant', '~/.vagrant.d/insecure_private_key' ]
|
config.ssh.private_key_path = ['~/.ssh/vagrant', '~/.vagrant.d/insecure_private_key' ]
|
||||||
|
|
||||||
config.vm.provider "hyperv" do |hv, override|
|
config.vm.provider "hyperv" do |hv, override|
|
||||||
hv.vmname = "almalinux8"
|
hv.vmname = $VM_NAME
|
||||||
hv.memory = 2048
|
hv.maxmemory = $VM_MEM
|
||||||
hv.cpus = 6
|
hv.memory = $VM_MEM
|
||||||
|
hv.cpus = $VM_VCPU
|
||||||
override.vm.allowed_synced_folder_types = [:rsync]
|
override.vm.allowed_synced_folder_types = [:rsync]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user