I have taken a snapshot recently to assist me build VMs quickly with the operating system I desire (through virsh
), however, every time I build a VM, I would like to modify few files inside the img file before assigning the qemu img file to the VM such as, for example, the /etc/sysconfig/network-scripts/ifcfg-eth0
file and the shadow file. Is this possible through command line? I can do this through VNC if I assign the img file to the VM and then log into VNC to apply my changes, but I was wondering if there's a quick shell solution to achieve this.
Any suggestion would be greatly appreciated!
libvirt
recent enough I think you can even do all of this while the VM is running.virsh
on the CentOS server (or the main VM server)?