0

I create a KVM Guest VM (virsh define a.xml, virsh start a.xml). Guest uses pre-configured/pre-made QCOW2 disk image, which represents a virtual router (Arista vEOS). Host is Redhat 9.1. Guest is based on Centos 7.9. The VM uses a boot loader (Aboot) in a cdrom. The guest has two environments where one can configure it: Bash Shell as well as "Arista CLI".

I use bash to make changes to the system: adduser; add,partition,format,mount disk; install libraries (gcc, glibc ...etc) .... Problem is, I lose all of these config changes when I do "shutdown" via bash from within the guest or when I do "virsh shutdown guest" from the kvm host.

How do I make these extra configurations persistent even after shutting down the guest?

I wonder if these configs have something to do with it: <on_poweroff>destroy</on_poweroff> ,,, <on_reboot>restart</on_reboot> ,,, <on_crash>restart</on_crash>

Mo Fatty
  • 121
  • 2
  • This problem is not related to virtualization, and is a side-effect of how the operating system is handling initialization (it's likely using a read-only image for root and persisting changes in memory only). You should ask this question in the specific context of vEOS. In general, you'll have to attach a second disk and mount it during or after boot. I don't know the specifics of vEOS. – Spooler Apr 28 '23 at 10:28

0 Answers0