简体   繁体   中英

Change kvm qcow2 file with windows 10

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM