-1

I have a qcow2 file that contains windows 10. The operating system is RHEL8.2. The virtualization stack is kvm, qemu, virt-viewer. And the command line used to manipulate the virtual machine is 'virsh'.

I need to update the windows drivers and kernel, change some registry, uninstall some applications, add things to the task scheduler and more.

My question, is what is the best process to acheive this? Is the result should be a new qcow2 file? Are there changes required for the xml configuration file of the virtual machine?

There are 2 modes of editing the virtual machine, online and offline. The difference is if the virtual machine is running during the edit or not. What mode is best to perform the task described above?

As I understand, snapshots are stored inside the qcow2 file, and then the user needs to pick between them. The users, on the system I am working on, are not aware they run on virtual machines, so I can not use this path, unless I am missing something.

Also there is the 'managedsave' and 'save' commands for virsh, but they don't create a new qcow2 file, and I don't think that the commands are meant for it.

Finally I found that the qcow2 file can be mounted as a device, perform changes in it, and unmount it. But then how can I uninstall applications and more in this way?

Thank you!

  • Will users of the system you working on work in the virtual machines while you will perform that upgrade? You write about snapshots and new qcow2 files. Do you want save the original version to be able to rollback? – nevilad Apr 08 '21 at 14:08
  • No the users won't be working during the upgrade. And I have a copy of the original version, so I can rollback – rrrrTTTrrrr Apr 08 '21 at 14:15
  • Are the virtual machines in powered off or suspended state? What state should they have after the upgrade? – nevilad Apr 08 '21 at 14:21
  • Probably suspended, but I can set them to what state is needed – rrrrTTTrrrr Apr 08 '21 at 14:33

1 Answers1

1

All the changes you described (update the windows drivers and kernel, change some registry, uninstall some applications, add things to the task scheduler and more) affect only the guest disk - qcow2 file, and guest memory.

You can run the guests, do these changes and power off. All changes will be saved to the guest disk. When instead of poweroff you will suspend the guests, some of the changes can be saved in guest memory.

There are no changes needed for the xml configuration file of the virtual machine, no new qcow2 files will be created.

Yes, snapshots are stored inside the qcow2 file, but since you have a copy, you dont need to create snapshots. Also no need for 'managedsave' and 'save' commands.

nevilad
  • 932
  • 1
  • 7
  • 14