correct path for virsh pool
This commit is contained in:
parent
95719376b7
commit
faba0c60c3
@ -30,14 +30,27 @@ mkdir /mnt/sysimage/var/lib/libvirt/iso # Create a directory to store iso images
|
|||||||
|
|
||||||
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /mnt/sysimage/var/lib/libvirt/iso/
|
wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /mnt/sysimage/var/lib/libvirt/iso/
|
||||||
|
|
||||||
# virsh command fail. would need to fetch a script and execute post-launch with a delay, for example using a systemd unit
|
wget https://github.com/PhyllomeOS/PhyllomeOS/blob/main/post-installation/post-install.sh -P /mnt/sysimage/root/
|
||||||
# virsh pool-define-as iso dir /mnt/sysimage/var/lib/libvirt/iso/ # Make libvirt aware of this new directory by creating a so-called 'pool'.
|
|
||||||
# virsh pool-build iso # Build the pool
|
# Create new file /mnt/sysimage/etc/systemd/system/postinstall.service using cat:
|
||||||
# virsh pool-start iso # Start it
|
|
||||||
# virsh pool-autostart iso # Set-it to autostart
|
```
|
||||||
|
cat > /mnt/sysimage/etc/systemd/system/postinstall.service<< EOF
|
||||||
# systemctl enable libvirtd # enable libvirt
|
[Unit]
|
||||||
# systemctl start libvirtd
|
Description=post-installation configuration for Phyllome OS
|
||||||
|
After=systemd-remount-fs.service
|
||||||
|
Before=systemd-sysusers.service sysinit.target shutdown.target
|
||||||
|
ConditionFirstBoot=yes
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/bin/bash /root/post-install.sh
|
||||||
|
RemainAfterExit=no
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
# Add a network bridge. Still need to declare it to libvirt/virt-manager
|
# Add a network bridge. Still need to declare it to libvirt/virt-manager
|
||||||
nmcli con add ifname br0 type bridge con-name br0
|
nmcli con add ifname br0 type bridge con-name br0
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# It is then executed once upon first-boot as a systemd-unit
|
# It is then executed once upon first-boot as a systemd-unit
|
||||||
|
|
||||||
# virsh command fail. would need to fetch a script and execute post-launch with a delay, for example using a systemd unit
|
# virsh command fail. would need to fetch a script and execute post-launch with a delay, for example using a systemd unit
|
||||||
virsh pool-define-as iso dir /var/lib/libvirt/iso/ # Make libvirt aware of this new directory by creating a so-called 'pool'.
|
virsh pool-define-as iso dir - - - - /var/lib/libvirt/iso/ # Make libvirt aware of this new directory by creating a so-called 'pool'.
|
||||||
virsh pool-build iso # Build the pool
|
virsh pool-build iso # Build the pool
|
||||||
virsh pool-start iso # Start it
|
virsh pool-start iso # Start it
|
||||||
virsh pool-autostart iso # Set-it to autostart
|
virsh pool-autostart iso # Set-it to autostart
|
||||||
|
Loading…
x
Reference in New Issue
Block a user