Created
September 13, 2017 15:18
-
-
Save esters/57d3953a551430bf5476d0a7b30992d3 to your computer and use it in GitHub Desktop.
Windows Server 2016 on KVM, Debian 9
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
# sha1sum - Image | |
## f185197af68fae4f0e06510a4579fc511ba27616 en_windows_server_2016_x64_dvd_9718492.iso | |
# EFI is mandatory, Install OVMF (apt-get install ovmf) | |
# Setup the image with the following script: | |
home=/srv/kvm | |
name="Windows-Server-2016" | |
memmax=6144 # in Mb | |
cpu=2 | |
disk_path=$home/vm/$name/$name.img | |
disk_size=51.2 # In Gigabytes | |
cdrom_path=$home/iso/en_windows_server_2016_x64_dvd_9718492.iso | |
virtio_path=$home/iso/virtio-win-0.1.126.iso | |
os_type=windows | |
os_variant=win2k12r2 | |
/usr/bin/virt-install \ | |
--connect qemu:///system \ | |
--name=$name \ | |
--ram=$memmax \ | |
--vcpus=$cpu \ | |
--cpu host \ | |
--cdrom=$cdrom_path \ | |
--os-type=$os_type \ | |
--os-variant=$os_variant \ | |
--disk path=$disk_path,device=disk,bus=virtio,size=$disk_size,format=raw \ | |
--disk path=$virtio_path,device=cdrom --force \ | |
--boot uefi,cdrom,hd,menu=on \ | |
--network bridge=br0,model=virtio \ | |
--graphics vnc,listen=0.0.0.0 \ | |
--video=qxl \ | |
--accelerate \ | |
--noautoconsole \ | |
--hvm | |
# EFI Shell | |
# >FS0: -> EFI\BOOT\BOOTX64.EFI | |
# Installing Windows Server 2016 | |
# When partitioning the drive, choose the 'viostor' driver folder from the virtio drive. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment