Last active
April 26, 2022 23:54
-
-
Save mmguero/21d4d27fd05cf4242d87cb2b28795736 to your computer and use it in GitHub Desktop.
Windows 10 (libvirt provider) with script for installing scoop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.define "vagrant-windows-10-enterprise-x64-eval" | |
config.vm.box = "peru/windows-10-enterprise-x64-eval" | |
config.vm.communicator = "winrm" | |
# Admin username and password | |
config.winrm.username = "vagrant" | |
config.winrm.password = "vagrant" | |
config.vm.guest = :windows | |
config.windows.halt_timeout = 15 | |
# port forward WinRM and RDP | |
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct: true | |
config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true | |
config.vm.synced_folder ".", "/vagrant", disabled: true | |
config.vm.provider :libvirt do |libvirt| | |
# libvirt.loader = "/usr/share/ovmf/OVMF.fd" | |
libvirt.cpus = 4 | |
# libvirt.cputopology :sockets => '2', :cores => '2', :threads => '1' | |
libvirt.disk_bus = "virtio" | |
libvirt.driver = "kvm" | |
libvirt.graphics_type = "spice" | |
libvirt.machine_arch = 'x86_64' | |
libvirt.machine_type = "q35" | |
libvirt.memory = 20480 | |
libvirt.nested = true | |
libvirt.nic_model_type = "virtio" | |
libvirt.sound_type = "ich6" | |
libvirt.video_type = "qxl" | |
libvirt.management_network_guest_ipv6 = 'no' | |
libvirt.cpu_mode = 'host-model' | |
libvirt.cpu_fallback = 'forbid' | |
libvirt.cpu_feature :name => 'hypervisor', :policy => 'disable' | |
libvirt.cpu_feature :name => 'vmx', :policy => 'require' | |
# Alternately, specify a CPU and features: | |
# libvirt.cpu_mode = 'custom' | |
# libvirt.cpu_model = 'Skylake-Client-IBRS' | |
# libvirt.cpu_fallback = 'forbid' | |
# libvirt.cpu_feature :name => 'hypervisor', :policy => 'disable' | |
# libvirt.cpu_feature :name => 'vmx', :policy => 'require' | |
libvirt.channel :type => 'spicevmc', :target_name => 'com.redhat.spice.0', :target_type => 'virtio' | |
libvirt.channel :type => 'unix', :target_name => 'org.qemu.guest_agent.0', :target_type => 'virtio' | |
libvirt.random :model => 'random' | |
end | |
config.vm.provision "shell", inline: <<-STEP1 | |
REG ADD "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power" /v HiberbootEnabled /t REG_DWORD /d "0" /f | |
powercfg.exe -x -monitor-timeout-ac 0 | |
powercfg.exe -x -monitor-timeout-dc 0 | |
powercfg.exe -x -disk-timeout-ac 0 | |
powercfg.exe -x -disk-timeout-dc 0 | |
powercfg.exe -x -standby-timeout-ac 0 | |
powercfg.exe -x -standby-timeout-dc 0 | |
powercfg.exe -x -hibernate-timeout-ac 0 | |
powercfg.exe -x -hibernate-timeout-dc 0 | |
echo 'iwr -useb https://git.io/debloat|iex' > 'C:/debloat.ps1' | |
iwr -useb 'https://raw.githubusercontent.com/mmguero/dotfiles/master/bash/development_setup_bootstrap.ps1' -outfile 'C:/development_setup_bootstrap.ps1' | |
STEP1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment