Permalink
Browse files

Starting support for vmware, virtualbox.

  • Loading branch information...
cryps1s committed May 14, 2018
1 parent 4aca068 commit 20e4bddf93c4be507065feb684034021a8312fec
Showing with 88 additions and 14 deletions.
  1. +39 −7 DARKSURGEON.json
  2. +15 −0 Vagrantfile
  3. +18 −6 ci/packet_install_script.sh
  4. +16 −1 vagrantfile_DARKSURGEON_w10_1803_x64.template
View
@@ -10,9 +10,9 @@
"enable_secure_boot": true,
"floppy_files": [],
"generation": 2,
"iso_url": "windows-10-1803-x64-enterprise.iso",
"iso_checksum": "28681742FE850AA4BFC7075811C5244B61D462CF",
"iso_checksum_type": "sha1",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"ram_size": 4096,
"secondary_iso_images": [ "./configuration/iso-scripts/answer.iso" ],
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
@@ -28,9 +28,9 @@
"boot_command": [ "aaaaa<wait>a<wait>a<wait>" ],
"boot_wait": "0s",
"communicator": "winrm",
"iso_url": "windows-10-1803-x64-enterprise.iso",
"iso_checksum": "28681742FE850AA4BFC7075811C5244B61D462CF",
"iso_checksum_type": "sha1",
"iso_url": "{{user `iso_url`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"headless": true,
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2012_64",
@@ -54,6 +54,33 @@
"4"
]
]
},
{
"type": "vmware-iso",
"communicator": "winrm",
"iso_url": "{{user `iso_url`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_checksum": "{{user `iso_checksum`}}",
"headless": true,
"boot_wait": "0s",
"winrm_username": "darksurgeon",
"winrm_password": "darksurgeon",
"winrm_timeout": "60m",
"shutdown_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows8srv-64",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"version": 11,
"floppy_dirs": [ "./configuration/iso-scripts/" ],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "4096",
"numvcpus": "4",
"scsi0.virtualDev": "lsisas1068"
}
}],
"provisioners": [
{
@@ -257,5 +284,10 @@
"output": "DARKSURGEON_w10_1803_x64_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile_DARKSURGEON_w10_1803_x64.template"
}
]
],
"variables": {
"iso_url": "windows-10-1803-x64-enterprise.iso",
"iso_checksum_type": "sha1",
"iso_checksum": "28681742FE850AA4BFC7075811C5244B61D462CF"
}
}
View
@@ -19,5 +19,20 @@ config.vm.define "DARKSURGEON" do |cfg|
hv.ip_address_timeout = 240
hv.memory = 4096
end
cfg.vm.provider "vmware_fusion" do |v, override|
v.memory = 4096
v.cpus = 4
v.gui = true
end
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 4096]
vb.customize ["modifyvm", :id, "--cpus", 4]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
end
@@ -9,11 +9,11 @@
# the text "building". Once the test is completed, the text will be replaced
# with "success" or "failed".
# Install Virtualbox 5.1
echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" >> /etc/apt/sources.list
# Install Virtualbox 5.2
echo "deb http://download.virtualbox.org/virtualbox/debian stretch contrib" >> /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
apt-get update
apt-get install -y virtualbox-5.1 build-essential unzip git ufw apache2
apt-get install -y virtualbox-5.2 build-essential unzip git ufw apache2
echo "building" > /var/www/html/index.html
@@ -26,10 +26,22 @@ ufw --force enable
# Install Packer
mkdir /opt/packer
cd /opt/packer
wget https://releases.hashicorp.com/packer/1.1.3/packer_1.1.3_linux_amd64.zip
unzip packer_1.1.3_linux_amd64.zip
wget https://releases.hashicorp.com/packer/1.2.3/packer_1.2.3_linux_amd64.zip
unzip packer_1.2.3_linux_amd64.zip
cp packer /usr/local/bin/packer
# Build DARKSURGEON Build Path
mkdir /opt/DARKSURGEON
cd /opt/DARKSURGEON
wget https://www.dropbox.com/s/k47i8v7vmej26ed/windows-10-1803-x64-enterprise.iso
# Get the Windows ISO File
wget https://darksurgeon.io/files/windows-10-1803-x64-enterprise.iso
# Clone the DARKSURGEON Repository
git clone https://github.com/cryps1s/DARKSURGEON.git
# Get Linux Kernel Headers
apt-get install -y linux-headers-amd64 linux-headers-$(uname -r)
# Kickstart Virtualbox
/sbin/vboxconfig
@@ -19,5 +19,20 @@ config.vm.define "DARKSURGEON" do |cfg|
hv.ip_address_timeout = 240
hv.memory = 4096
end
cfg.vm.provider "vmware_fusion" do |v, override|
v.memory = 4096
v.cpus = 4
v.gui = true
end
cfg.vm.provider "virtualbox" do |vb, override|
vb.gui = true
vb.customize ["modifyvm", :id, "--memory", 4096]
vb.customize ["modifyvm", :id, "--cpus", 4]
vb.customize ["modifyvm", :id, "--vram", "32"]
vb.customize ["modifyvm", :id, "--clipboard", "bidirectional"]
vb.customize ["setextradata", "global", "GUI/SuppressMessages", "all" ]
end
end
end
end

0 comments on commit 20e4bdd

Please sign in to comment.