File tree 6 files changed +124
-0
lines changed
6 files changed +124
-0
lines changed Original file line number Diff line number Diff line change
1
+ run.tmp.gz
Original file line number Diff line number Diff line change
1
+ usage : FORCE
2
+ # See Makefile targets.
3
+ exit 1
4
+
5
+ FORCE :
6
+
7
+ upload : FORCE
8
+ go install golang.org/x/build/cmd/upload
9
+ gzip -c run-builder-darwin-10_8.sh > run.tmp.gz
10
+ upload --verbose --file=run.tmp.gz -cacheable=false -public=false go-builder-data/run-builder-darwin-10_8.gz
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -x
5
+
6
+ ip=$( ifconfig | grep " inet 10.50.0." | perl -npe ' s/.*\.(\d+) netmask.*/$1/' )
7
+
8
+ echo " Running with hostname ms_$ip "
9
+
10
+ # For now use the buildlet baked into the image. We'll probably want to stop
11
+ # doing that later, though:
12
+
13
+ while true ; do
14
+ $HOME /bin/buildlet \
15
+ -coordinator=farmer.golang.org \
16
+ -halt=false \
17
+ -hostname=ms_$ip \
18
+ -reverse=darwin-amd64-10_8 || sleep 5
19
+ done
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This is the file baked into the VM image.
4
+ #
5
+ # It fetches https://storage.googleapis.com/go-builder-data/run-builder-darwin-10_8.gz
6
+ # (which might be a shell script or an executable) and runs it to do the rest.
7
+
8
+ set -e
9
+ url=" https://storage.googleapis.com/go-builder-data/run-builder-darwin-10_8.gz"
10
+ while ! curl -f -o run-builder.gz " $url " ; do
11
+ echo
12
+ echo " curl failed to fetch $url "
13
+ echo " Sleeping before retrying..."
14
+ sleep 2
15
+ done
16
+
17
+ set -x
18
+ gunzip -f run-builder.gz
19
+ chmod +x run-builder
20
+ exec ./run-builder
Original file line number Diff line number Diff line change
1
+ $HOME/go1.4
2
+
3
+ System Preferences > Software Update > off
4
+
5
+ System Preferences > Desktop & Screensaver > never screensaver
6
+
7
+ System Preferences > Energy Saver > never sleep
8
+
9
+ curl -o stage0.sh https://....
10
+
11
+ chmod +x stage0.sh
12
+
13
+ Automator > Create application > Run shell Script > "open -b com.apple.terminal $HOME/stage0.sh", save to desktop
14
+
15
+ System Preferences > Users & Groups > auto-login "gopher" user, run Desktop/run-builder (automator app)
16
+
17
+ passwordless sudo
18
+
19
+ sudo visudo
20
+ Change line from:
21
+ %admin ALL=(ALL) ALL
22
+ to:
23
+ %admin ALL=(ALL) NOPASSWD: ALL
24
+
Original file line number Diff line number Diff line change
1
+ * Setup OS X.
2
+ * Shut it down.
3
+ * Clone to Virtual Machine (convention: "osx_11_frozen" for OS X
4
+ 10.11")
5
+ * Snapshot that new frozen VM once to make its vmdk in COW format.
6
+
7
+ Then, to create more:
8
+
9
+ # 10.11
10
+
11
+ export VMHOST=12
12
+ export VMWHICH=a
13
+ export VMNAME=osx11_host${VMHOST}_${VMWHICH}
14
+ date
15
+ govc vm.create -m 4096 -c 2 -on=false -net dvPortGroup-Private -ds "mac_host_$VMHOST" -g darwin14_64Guest $VMNAME
16
+ govc vm.change -e smc.present=TRUE -e ich7m.present=TRUE -e firmware=efi -vm $VMNAME
17
+ govc device.usb.add -vm $VMNAME
18
+ govc vm.disk.attach -vm $VMNAME -link=true -persist=false -ds=NetApp-1 -disk "osx_11_frozen/osx_11_frozen.vmdk"
19
+ govc vm.power -on $VMNAME
20
+ date
21
+
22
+ # 10.8:
23
+
24
+ export VMHOST=13
25
+ export VMWHICH=b
26
+ export VMNAME=osx8_host${VMHOST}_${VMWHICH}
27
+ date
28
+ govc vm.create -m 4096 -c 2 -on=false -net dvPortGroup-Private -ds "mac_host_$VMHOST" -g darwin12_64Guest $VMNAME
29
+ govc vm.change -e smc.present=TRUE -e ich7m.present=TRUE -e firmware=efi -vm $VMNAME
30
+ govc device.usb.add -vm $VMNAME
31
+ govc vm.disk.attach -vm $VMNAME -link=true -persist=false -ds=NetApp-1 -disk "osx_8_frozen/osx_8_frozen.vmdk"
32
+ govc vm.power -on $VMNAME
33
+ date
34
+
35
+
36
+ Other misc notes:
37
+
38
+ $ govc vm.info -json osx11_host12_a | jq . | grep MacAdd
39
+ "MacAddress": "00:50:56:b4:05:57",
40
+
41
+
42
+ sudo pmset -a hibernatemode 25
43
+ sudo pmset sleepnow
44
+ if sleep failing,
45
+ pmset -g assertions # RemovableMedia mounted
46
+ system_profiler # to see which
47
+ https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225
48
+ ... doesn't seem to work
49
+ ... but changing from SATA to IDE does make the RemovableMedia assertion go away (but `pmset sleepnow` stil doesn't work)
50
+
You can’t perform that action at this time.
0 commit comments