Sorry for the lack of information, my bad.
The snapshot is an internal one and the machine is running.
The whole thing was set-up by another person and left to me to cope with.
The typo is mine, as the machine is isolated I cannot actually copy-paste
it so have to do it in the traditional way.
I am aware of the issue which come when changing HW but I couldn't do
otherwise.
I am only interested in reverting the disk's state. I guess qemu-img can
deal with it that but can libvirt as well?
What puzzled me was the error output which is kinda misleading.
Is it so that libvirt prevents editing snapshot configuration when running?
Is it due to the fact that the snapshots are internal?
Thank for the help.
2015-04-29 17:38 GMT+03:00 Eric Blake <eblake(a)redhat.com>:
On 04/29/2015 01:08 AM, NoxDaFox wrote:
> Greetings,
>
> due to hardware failure I had to replace my workstation which has a
> different CPU. I have a VM with several snapshots and I need to revert
to a
> specific one.
>
> While reverting to it, I get an error due to unsupported CPU features.
> Therefore, I try to edit the snapshot XML through the command:
>
> virsh snapshot-edit <domain_name> <snapshot_name>
>
> When I save the changes I get the error message:
> error: intermal error: unexpected domain snapshot <snapshot_name> already
I hope that typo "intermal" is just a copy-paste bug on your part, and
not in the source code.
> exists
>
> Tried to look around for solution but didn't find any information
related
> to my problem.
>
> Am I doing something wrong? It's quite critical for me to be able to
revert
> to that state of the machine. Is there any chance to do so via libvirt?
Changing the CPU features is guest visible. Generally, it is a bad idea
to change what hardware a guest sees (particularly if the guest was
already running as it may crash apps in the guest, but also even if the
guest is offline but is a picky OS like Windows that requires
revalidation), so even if you can get virsh snapshot-edit to work, I
doubt libvirt will let you use it to change CPU features. Is your
snapshot from a running guest state, or offline? If offline, just edit
the <domain> to point to the correct disk state at the same time you
remove the CPU features, to get a fresh boot, rather than trying to
revert to the snapshot state. Also, is your snapshot internal or
external? Depending on how the snapshot was created may affect how to
alter the <domain> to point at the desired disk state.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org