mirror of
https://github.com/PhyllomeOS/wiki.git
synced 2024-11-05 03:41:11 +00:00
docs: update gofurther/virt-install
This commit is contained in:
parent
dbc4ad98fb
commit
29639bdae9
@ -2,75 +2,82 @@
|
||||
title: Linux family
|
||||
description:
|
||||
published: true
|
||||
date: 2021-11-26T20:40:46.772Z
|
||||
date: 2021-11-26T21:06:35.123Z
|
||||
tags:
|
||||
editor: markdown
|
||||
dateCreated: 2021-11-12T15:27:40.366Z
|
||||
---
|
||||
|
||||
# Deploy common Linux systems automatically
|
||||
# Deploy RPM-based Linux distributions automatically
|
||||
|
||||
`virt-install` is a command-line utility that can be used to create virtual machines. It is preinstalled on Phyllome OS.
|
||||
`virt-install` is a command-line utility that can be used to create virtual machines. It comes preinstalled with Phyllome OS.
|
||||
|
||||
* For Fedora, you can install it using the following command:
|
||||
* For Fedora, you can install it using the following command as *root*:
|
||||
|
||||
```
|
||||
# dnf install virt-install
|
||||
dnf install virt-install
|
||||
```
|
||||
|
||||
## Automated installation using an ISO file and a local kickstart
|
||||
## Automated installation using an ISO file and a local kickstart file
|
||||
|
||||
> Requires an Internet connection
|
||||
* Use the following `wget` command to fetch the official Fedora Server ISO file and to put it in the current working directory
|
||||
|
||||
```
|
||||
wget https://download.fedoraproject.org/pub/fedora/linux/releases/35/Server/x86_64/iso/Fedora-Server-dvd-x86_64-35-1.2.iso
|
||||
```
|
||||
> Please [verify your download](https://getfedora.org/en/security/) if you intent to use this virtual machine in production
|
||||
{.is-info}
|
||||
|
||||
* Fetch a Fedora ISO file using wget and put it in the current working directory
|
||||
Move the file to `/var/lib/libvirt/iso`:
|
||||
```
|
||||
mv Fedora-Server-dvd-x86_64-35-1.2.iso /var/lib/libvirt/iso
|
||||
```
|
||||
* Use the following `wget` command to fetch a standalone kickstart file made to deploy a stripped down desktop based on GNOME Shell, and put it in the working directory
|
||||
|
||||
```
|
||||
$ wget https://download.fedoraproject.org/pub/fedora/linux/releases/34/Server/x86_64/iso/Fedora-Server-dvd-x86_64-34-1.2.iso
|
||||
wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/leaves/virtual-desktop.cfg
|
||||
```
|
||||
|
||||
* Fetch a kickstart script using wget and put it in the current working directory
|
||||
> Please verify the content of the script if you intent to use this virtual machine in production, for instance by using the following command `cat virtual-desktop.cfg`
|
||||
{.is-info}
|
||||
|
||||
```
|
||||
$ wget https://git.phyllo.me/home/kickstart/raw/branch/main/leaves/imd.cfg
|
||||
```
|
||||
|
||||
> If using a custom kickstart script, make sure it does include the `cdrom` option.
|
||||
> If you use a custom kickstart script, make sure it does include the `cdrom` option.
|
||||
{.is-warning}
|
||||
|
||||
* Deploy a UEFI-based machine with Fedora Server using the relative path of the local kickstart file
|
||||
|
||||
```
|
||||
$ virt-install \
|
||||
--connect qemu:///system \
|
||||
virt-install \
|
||||
--connect qemu:///session \
|
||||
--os-variant detect=off \
|
||||
--virt-type kvm \
|
||||
--arch x86_64 \
|
||||
--machine q35 \
|
||||
--name imd \
|
||||
--name virtual-desktop \
|
||||
--boot uefi \
|
||||
--cpu host-model,topology.sockets=1,topology.cores=2,topology.threads=2 \
|
||||
--vcpus 4 \
|
||||
--memory 8192 \
|
||||
--cpu host-model,topology.sockets=1,topology.cores=2,topology.threads=1 \
|
||||
--vcpus 2 \
|
||||
--memory 4096 \
|
||||
--video virtio \
|
||||
--graphics spice,listen=none \
|
||||
--channel spicevmc \
|
||||
--channel unix,target.type=virtio,target.name=org.qemu.guest_agent.0 \
|
||||
--autoconsole none \
|
||||
--console pty,target.type=virtio \
|
||||
--sound none \
|
||||
--network type=user,model=virtio \
|
||||
--controller type=virtio-serial \
|
||||
--controller type=usb,model=none \
|
||||
--controller type=scsi,model=virtio-scsi \
|
||||
--network network=default,model=virtio \
|
||||
--input type=keyboard,bus=virtio \
|
||||
--input type=tablet,bus=virtio \
|
||||
--rng /dev/urandom,model=virtio \
|
||||
--disk path=/var/lib/libvirt/images/imd.img,format=raw,bus=virtio,cache=writeback,size=5 \
|
||||
--location=/var/lib/libvirt/iso/Fedora-Server-dvd-x86_64-34-1.2.iso \
|
||||
--initrd-inject imd.cfg --extra-args "inst.ks=file:/imd.cfg"
|
||||
--disk path=/var/lib/libvirt/images/virtual-desktop.img,format=raw,bus=virtio,cache=writeback,size=10 \
|
||||
--location=/var/lib/libvirt/iso/Fedora-Server-dvd-x86_64-35-1.2.iso \
|
||||
--initrd-inject virtual-desktop.cfg --extra-args "inst.ks=file:/virtual-desktop.cfg"
|
||||
```
|
||||
### Remote installation with local kickstart
|
||||
|
||||
> Requires an Internet connection
|
||||
{.is-info}
|
||||
|
||||
* Fetch a kickstart script using wget and put it in the current working directory
|
||||
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user