Add gnutoo-trisquel-netinstall VM
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
This commit is contained in:
parent
bc0b5e1dad
commit
b2fe6d551d
|
@ -0,0 +1,35 @@
|
||||||
|
# Copying and distribution of this file, with or without modification,
|
||||||
|
# are permitted in any medium without royalty provided the copyright
|
||||||
|
# notice and this notice are preserved. This file is offered as-is,
|
||||||
|
# without any warranty.
|
||||||
|
|
||||||
|
CURL ?= curl
|
||||||
|
MIRROR ?= https://cdimage.trisquel.info/trisquel-images
|
||||||
|
# http://mirror.fsf.org/trisquel-images
|
||||||
|
VERSION ?= 11.0
|
||||||
|
|
||||||
|
.precious: \
|
||||||
|
trisquel_$(VERSION)_amd64.iso \
|
||||||
|
trisquel_$(VERSION)_amd64.iso.asc \
|
||||||
|
trisquel-netinst_$(VERSION)_amd64.iso \
|
||||||
|
trisquel-netinst_$(VERSION)_amd64.iso.asc
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: \
|
||||||
|
verify-trisquel_$(VERSION)_amd64 \
|
||||||
|
verify-trisquel-netinst_$(VERSION)_amd64 \
|
||||||
|
|
||||||
|
trisquel-archive-signkey.gpg:
|
||||||
|
gpg --list-keys D24DDAC9226D5BA5E9F3BED3F5DAAAF74AD4C938 || \
|
||||||
|
$(CURL) https://archive.trisquel.info/trisquel/$@ -o $@
|
||||||
|
gpg --list-keys D24DDAC9226D5BA5E9F3BED3F5DAAAF74AD4C938 || \
|
||||||
|
gpg --import trisquel-archive-signkey.gpg
|
||||||
|
|
||||||
|
%.iso:
|
||||||
|
$(CURL) $(MIRROR)/$@ -o $@
|
||||||
|
|
||||||
|
%.asc: trisquel-archive-signkey.gpg %
|
||||||
|
$(CURL) $(MIRROR)/$@ -o $@
|
||||||
|
|
||||||
|
verify-%: %.iso.asc
|
||||||
|
gpg --verify $<
|
|
@ -0,0 +1,50 @@
|
||||||
|
Deployment
|
||||||
|
==========
|
||||||
|
|
||||||
|
If you don't have the Trisquel netinstall iso inside libvirt you can
|
||||||
|
get it by first downloading it in the current directory with the
|
||||||
|
following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ make
|
||||||
|
```
|
||||||
|
|
||||||
|
Then you can add it to libvirt with the following command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./create-netinstall-volume.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Then if the VM is not already defined in libvirt, you can use the
|
||||||
|
following command to do that:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ ./create-vm.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
You will then need to add an extra storage device to the VM to have
|
||||||
|
some storage to install Trisquel on.
|
||||||
|
|
||||||
|
You can then start the installer and get a console inside it with the
|
||||||
|
following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ virsh -c qemu:///system start gnutoo-trisquel-netinstall
|
||||||
|
$ ./use-serial-port.sh
|
||||||
|
$ virsh -c qemu:///system console gnutoo-trisquel-netinstall
|
||||||
|
```
|
||||||
|
|
||||||
|
License
|
||||||
|
=======
|
||||||
|
This project is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This project is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this project. If not, see <http://www.gnu.org/licenses/>.
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||||||
|
#
|
||||||
|
# This project is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This project is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this project. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
virsh -c qemu:///system \
|
||||||
|
vol-create-as installation trisquel-netinst_11.0_amd64.isoc 0
|
||||||
|
|
||||||
|
virsh -c qemu:///system \
|
||||||
|
vol-upload --pool installation trisquel-netinst_11.0_amd64.iso \
|
||||||
|
--file $PWD/trisquel-netinst_11.0_amd64.iso
|
||||||
|
|
||||||
|
virsh -c qemu:///system \
|
||||||
|
vol-create-as installation trisquel-netinst_11.0_amd64.iso.asc 0
|
||||||
|
|
||||||
|
virsh -c qemu:///system \
|
||||||
|
vol-upload --pool installation trisquel-netinst_11.0_amd64.iso.asc \
|
||||||
|
--file $PWD/trisquel-netinst_11.0_amd64.iso.asc
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||||||
|
#
|
||||||
|
# This project is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This project is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this project. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
virsh -c qemu:///system define --file gnutoo-trisquel-netinstall.xml
|
|
@ -0,0 +1,102 @@
|
||||||
|
<domain type="kvm">
|
||||||
|
<name>gnutoo-trisquel-netinstall</name>
|
||||||
|
<memory unit="KiB">2097152</memory>
|
||||||
|
<currentMemory unit="KiB">2097152</currentMemory>
|
||||||
|
<resource>
|
||||||
|
<partition>/machine</partition>
|
||||||
|
</resource>
|
||||||
|
<os>
|
||||||
|
<type arch="x86_64" machine="pc-i440fx-5.1">hvm</type>
|
||||||
|
<boot dev="hd"/>
|
||||||
|
</os>
|
||||||
|
<features>
|
||||||
|
<acpi/>
|
||||||
|
<apic/>
|
||||||
|
<vmport state="off"/>
|
||||||
|
</features>
|
||||||
|
<cpu mode="host-passthrough" check="none" migratable="on"/>
|
||||||
|
<clock offset="utc">
|
||||||
|
<timer name="rtc" tickpolicy="catchup"/>
|
||||||
|
<timer name="pit" tickpolicy="delay"/>
|
||||||
|
<timer name="hpet" present="no"/>
|
||||||
|
</clock>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<pm>
|
||||||
|
<suspend-to-mem enabled="no"/>
|
||||||
|
<suspend-to-disk enabled="no"/>
|
||||||
|
</pm>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
||||||
|
<disk type="file" device="disk">
|
||||||
|
<driver name="qemu" type="raw"/>
|
||||||
|
<source file="/srv/vmverse/installation/trisquel-netinst_11.0_amd64.iso"/>
|
||||||
|
<target dev="sda" bus="usb" removable="on"/>
|
||||||
|
<readonly/>
|
||||||
|
<address type="usb" bus="0" port="1"/>
|
||||||
|
</disk>
|
||||||
|
<controller type="usb" index="0" model="ich9-ehci1">
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x7"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="usb" index="0" model="ich9-uhci1">
|
||||||
|
<master startport="0"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x0" multifunction="on"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="usb" index="0" model="ich9-uhci2">
|
||||||
|
<master startport="2"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x1"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="usb" index="0" model="ich9-uhci3">
|
||||||
|
<master startport="4"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x04" function="0x2"/>
|
||||||
|
</controller>
|
||||||
|
<controller type="pci" index="0" model="pci-root"/>
|
||||||
|
<interface type="bridge">
|
||||||
|
<source bridge="br0"/>
|
||||||
|
<model type="virtio"/>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x03" function="0x0"/>
|
||||||
|
</interface>
|
||||||
|
<serial type="pty">
|
||||||
|
<target type="isa-serial" port="0">
|
||||||
|
<model name="isa-serial"/>
|
||||||
|
</target>
|
||||||
|
</serial>
|
||||||
|
<serial type="pty">
|
||||||
|
<target type="isa-serial" port="1">
|
||||||
|
<model name="isa-serial"/>
|
||||||
|
</target>
|
||||||
|
</serial>
|
||||||
|
<serial type="pty">
|
||||||
|
<target type="isa-serial" port="2">
|
||||||
|
<model name="isa-serial"/>
|
||||||
|
</target>
|
||||||
|
</serial>
|
||||||
|
<serial type="pty">
|
||||||
|
<target type="isa-serial" port="3">
|
||||||
|
<model name="isa-serial"/>
|
||||||
|
</target>
|
||||||
|
</serial>
|
||||||
|
<console type="pty">
|
||||||
|
<target type="serial" port="0"/>
|
||||||
|
</console>
|
||||||
|
<input type="keyboard" bus="ps2"/>
|
||||||
|
<input type="mouse" bus="ps2"/>
|
||||||
|
<graphics type="spice">
|
||||||
|
<listen type="none"/>
|
||||||
|
<gl enable="no"/>
|
||||||
|
</graphics>
|
||||||
|
<audio id="1" type="spice"/>
|
||||||
|
<video>
|
||||||
|
<model type="none"/>
|
||||||
|
</video>
|
||||||
|
<memballoon model="virtio">
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x06" function="0x0"/>
|
||||||
|
</memballoon>
|
||||||
|
<rng model="virtio">
|
||||||
|
<backend model="random">/dev/urandom</backend>
|
||||||
|
<address type="pci" domain="0x0000" bus="0x00" slot="0x08" function="0x0"/>
|
||||||
|
</rng>
|
||||||
|
</devices>
|
||||||
|
<seclabel type="dynamic" model="dac" relabel="yes"/>
|
||||||
|
</domain>
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Copyright (C) 2023 Denis 'GNUtoo' Carikli
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 15 # TAB
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 46 # C
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 24 # O
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 49 # N
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 31 # S
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 24 # O
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 38 # L
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 18 # E
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 13 # =
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 20 # T
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 20 # T
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 21 # Y
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 58 # CAPSLOCK
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 31 # S
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 11 # 0
|
||||||
|
virsh -c qemu:///system send-key gnutoo-trisquel-netinstall 28 # ENTER
|
Loading…
Reference in New Issue