windows tests: split networked-installer.sh into windows-installer.sh+anaconda-installer.sh
This commit is contained in:
parent
93f1c15d9f
commit
6f57d607ce
|
@ -1,13 +1,20 @@
|
|||
# Preparing a Windows image
|
||||
# Preparation steps
|
||||
|
||||
## Install a Windows image
|
||||
|
||||
```shell
|
||||
nix-build install.nix
|
||||
result/bin/networked-installer.sh
|
||||
result/bin/windows-installer.sh
|
||||
```
|
||||
|
||||
Follow the instructions.
|
||||
|
||||
Then press **return** to automatically complete the installation via SSH. The virtual machine will be shut down when the process is complete.
|
||||
## Install Anaconda to the image
|
||||
|
||||
```shell
|
||||
nix-build install.nix
|
||||
result/bin/anaconda-installer.sh
|
||||
```
|
||||
|
||||
Move the image `c.img` to one of Nix' `extra-sandbox-paths` (`nix.sandboxPaths` on NixOS).
|
||||
|
||||
|
|
|
@ -47,29 +47,29 @@ stdenv.mkDerivation {
|
|||
installPhase = ''
|
||||
mkdir -p $out/bin $out/data
|
||||
ln -s $(readlink windows.iso) $out/data/windows.iso
|
||||
cat > $out/bin/networked-installer.sh << EOF
|
||||
cat > $out/bin/windows-installer.sh << EOF
|
||||
#!/usr/bin/env bash
|
||||
set -e -m
|
||||
|
||||
if [ ! -f c.img ] ; then
|
||||
${qemu.qemu-img} create -f qcow2 c.img ${diskImageSize}
|
||||
${qemu.runQemu false [
|
||||
"-boot" "order=d"
|
||||
"-drive" "file=c.img,index=0,media=disk,cache=unsafe"
|
||||
"-drive" "file=$out/data/windows.iso,index=1,media=cdrom,cache=unsafe"
|
||||
]} &
|
||||
echo "Please perform a Windows installation."
|
||||
else
|
||||
echo "Please finalize your Windows installation (or delete c.img and restart)"
|
||||
cat ${instructions}
|
||||
wait
|
||||
EOF
|
||||
|
||||
cat > $out/bin/anaconda-installer.sh << EOF
|
||||
#!/usr/bin/env bash
|
||||
set -e -m
|
||||
|
||||
${qemu.runQemu false [
|
||||
"-boot" "order=c"
|
||||
"-drive" "file=c.img,index=0,media=disk"
|
||||
]} &
|
||||
fi
|
||||
cat ${instructions}
|
||||
|
||||
read
|
||||
|
||||
sleep 10
|
||||
${ssh "ver"}
|
||||
|
||||
${scp anaconda "Anaconda.exe"}
|
||||
|
@ -86,6 +86,6 @@ stdenv.mkDerivation {
|
|||
echo "Waiting for qemu exit"
|
||||
wait
|
||||
EOF
|
||||
chmod a+x $out/bin/networked-installer.sh
|
||||
chmod a+x $out/bin/*.sh
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue