<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 13 Jun 2016, at 11:48, Colin Coe <<a href="mailto:colin.coe@gmail.com" class="">colin.coe@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><p dir="ltr" class="">Initially we only saw this on VMs with 2 or more disks. Subsequently we confirmed that it does happen on single disk VMs also. </p></div></blockquote>Sounds like an issue with snapshots, "backing filename too long” should be <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1333627" class="">https://bugzilla.redhat.com/show_bug.cgi?id=1333627</a></div><div>Tal, can you confirm?</div><div><br class=""></div><div>Thanks,</div><div>michal<br class=""><blockquote type="cite" class=""><div class=""><p dir="ltr" class="">CC<br class=""></p><p dir="ltr" class="">---</p><p dir="ltr" class="">Sent from my Nexus 5</p>
<div class="gmail_quote">On Jun 13, 2016 5:12 PM, "gregor" <<a href="mailto:gregor_forum@catrix.at" class="">gregor_forum@catrix.at</a>> wrote:<br type="attribution" class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The VM has two disks both are VirtIO. During testing its now clear that<br class="">
the problem occur only with two disks. When I select only one disk for<br class="">
the snapshost it works.<br class="">
Is this a problem of oVirt or is it not possible to use two disks on a<br class="">
VM in oVirt?<br class="">
<br class="">
Have you also two or more disks on your VM?<br class="">
<br class="">
Here are the Testresults:<br class="">
-------------------------<br class="">
What does not work:<br class="">
- Export the VM: Failed with error "ImageIsNotLegalChain and code 262"<br class="">
- Clone the VM: Failed with error "IRSErrorException: Image is not a<br class="">
legal chain" with the ID of the second Disk.<br class="">
<br class="">
After removing the second Disk:<br class="">
- Create offline snapshot: Works<br class="">
- Remove offline snapshot: After two hours I run "engine-setup<br class="">
--offline" to clean the looked snapshot !!!<br class="">
- Export the VM: Works<br class="">
- Import the exported VM: Works<br class="">
- Add Disk to the imported VM: Works<br class="">
- Create offline snapshot of the imported VM: Failed<br class="">
- Clone the VM: Works<br class="">
- Add Disk to the cloned VM: Works<br class="">
- Create offline snapshot of the cloned VM: Failed<br class="">
<br class="">
What works:<br class="">
- Make offline snapshot only with the system disk: Works<br class="">
- Remove offline snapshot of the system disk: Works<br class="">
- Make online snapshot only with the system disk: Works<br class="">
- Remove online snapshot of the system disk: Works<br class="">
<br class="">
cheers<br class="">
gregor<br class="">
<br class="">
On 12/06/16 19:42, gregor wrote:<br class="">
> Hi,<br class="">
><br class="">
> I solved my problem, here are the steps but be carefully if you don't<br class="">
> know what the commands did and how to restore from backup don't follow this:<br class="">
><br class="">
> - ssh to the host<br class="">
> - systemctl stop ovirt-engine<br class="">
> - backup the database with "engine-backup"<br class="">
> - navigate to the image files<br class="">
> - backup the images: sudo -u vdsm rsync -av <uuid> <uuid_backup><br class="">
> - check which one is the backing file: qemu-img info <file><br class="">
> - check for damages: qemu-img check <file><br class="">
> - qemu-img commit <snapshot file><br class="">
> - rename the <snapshot file> + .lease and .meta so it can't be accessed<br class="">
><br class="">
> - vmname=srv03<br class="">
> - db=engine<br class="">
> - sudo -u postgres psql $db -c "SELECT b.disk_alias, s.description,<br class="">
> s.snapshot_id, i.creation_date, s.status, i.imagestatus, i.size,<br class="">
> i.image_group_id, i.vm_snapshot_id, i.image_guid, i.parentid, i.active<br class="">
> FROM images as i JOIN snapshots AS s ON (i.vm_snapshot_id =<br class="">
> s.snapshot_id) LEFT JOIN vm_static AS v ON (s.vm_id = v.vm_guid) JOIN<br class="">
> base_disks AS b ON (i.image_group_id = b.disk_id) WHERE v.vm_name =<br class="">
> '$vmname' ORDER BY creation_date, description, disk_alias"<br class="">
><br class="">
> - note the image_guid and parent_id from the broken snapshot and the<br class="">
> active snapshot, the active state is the image_guuid with the parentid<br class="">
> 00000000-0000-0000-0000-000000000000<br class="">
> - igid_active=<active uuid><br class="">
> - igid_broken=<broken uuid><br class="">
> - the parentid of the image_guuid of the broken snapshot must be the<br class="">
> same as the activ snapshots image_guuid<br class="">
> - note the snapshot id<br class="">
> - sid_active=<id of the active snapshot with parrent id 000000><br class="">
> - sid_broken=<id of the broken shapshot><br class="">
><br class="">
> - delete the broken snapshot<br class="">
> - sudo -u postgres psql $db -c "DELETE FROM snapshots AS s WHERE<br class="">
> s.snapshot_id = '$sid_broken'"<br class="">
><br class="">
> - pid_new=00000000-0000-0000-0000-000000000000<br class="">
> - sudo -u postgres psql $db -c "SELECT * FROM images WHERE<br class="">
> vm_snapshot_id = '$sid_active' AND image_guid = '$igid_broken'"<br class="">
> - sudo -u postgres psql $db -c "DELETE FROM images WHERE vm_snapshot_id<br class="">
> = '$sid_broken' AND image_guid = '$igid_active'"<br class="">
> - sudo -u postgres psql $db -c "SELECT * FROM image_storage_domain_map<br class="">
> WHERE image_id = '$igid_broken'"<br class="">
> - sudo -u postgres psql $db -c "DELETE FROM image_storage_domain_map<br class="">
> WHERE image_id = '$igid_broken'"<br class="">
> - sudo -u postgres psql $db -c "UPDATE images SET image_guid =<br class="">
> '$igid_active', parentid = '$pid_new' WHERE vm_snapshot_id =<br class="">
> '$sid_active' AND image_guid = '$igid_broken'"<br class="">
> - sudo -u postgres psql $db -c "SELECT * FROM image_storage_domain_map"<br class="">
> - storid=<storage_domain_id><br class="">
> - diskprofileid=<disk_profile_id><br class="">
> - sudo -u postgres psql $db -c "INSERT INTO image_storage_domain_map<br class="">
> (image_id, storage_domain_id, disk_profile_id) VALUES ('$igid_broken',<br class="">
> '$stor_id', '$diskprofileid')"<br class="">
><br class="">
> - check values<br class="">
> - sudo -u postgres psql $db -c "SELECT b.disk_alias, s.description,<br class="">
> s.snapshot_id, i.creation_date, s.status, i.imagestatus, i.size,<br class="">
> i.image_group_id, i.vm_snapshot_id, i.image_guid, i.parentid, i.active<br class="">
> FROM images as i JOIN snapshots AS s ON (i.vm_snapshot_id =<br class="">
> s.snapshot_id) LEFT JOIN vm_static AS v ON (s.vm_id = v.vm_guid) JOIN<br class="">
> base_disks AS b ON (i.image_group_id = b.disk_id) WHERE v.vm_name =<br class="">
> '$vmname' ORDER BY creation_date, description, disk_alias"could not<br class="">
> change directory to "/root/Backups/oVirt"<br class="">
><br class="">
> - check for errors<br class="">
> - engine-setup --offline<br class="">
> - systemctl start ovirt-engine<br class="">
><br class="">
> Now you should have a clean state and a working VM ;-)<br class="">
><br class="">
> What was tested:<br class="">
> - Power up and down the VM<br class="">
><br class="">
> What does not work:<br class="">
> - Its not possible to make offline snapshots, online was not tested<br class="">
> because I will not getting into such trouble again. It took many hours<br class="">
> after the machine is up again.<br class="">
><br class="">
> PLEASE be aware and don't destroy your Host and VM !!!<br class="">
><br class="">
> cheers<br class="">
> gregor<br class="">
><br class="">
> On 12/06/16 13:40, Colin Coe wrote:<br class="">
>> We've seen this with both Linux and Windows VMs. I'm guessing that<br class="">
>> you've had failures on this VM in both snapshot create and delete<br class="">
>> operations. oVirt/RHEV 3.5 seems particularly affected. I'm told that<br class="">
>> oVirt 3.6.7 has the last of the fixes for these known snapshot problems.<br class="">
>><br class="">
>> My original email was eorded wrong. I meant that qemu-img gives<br class="">
>> "backing filename too long" errors. You may have seen this in your logs.<br class="">
>><br class="">
>> Note also that you may be seeing an entirely un-related problem.<br class="">
>><br class="">
>> You may wish to post you're VDSM logs and the qemu log from<br class="">
>> /var/lib/libvirt/qemu/<vm_name>.log<br class="">
>><br class="">
>> Hope this helps<br class="">
>><br class="">
>> CC<br class="">
>><br class="">
>><br class="">
>> On Sun, Jun 12, 2016 at 4:45 PM, gregor <<a href="mailto:gregor_forum@catrix.at" class="">gregor_forum@catrix.at</a><br class="">
>> <mailto:<a href="mailto:gregor_forum@catrix.at" class="">gregor_forum@catrix.at</a>>> wrote:<br class="">
>><br class="">
>> Sound's bad. Recreating the VM is no way because this is a productive<br class="">
>> VM. During testing I need to recreate it more than once. oVirt works<br class="">
>> perfect which Linux VM's but when it comes to Windows VM's we get lots<br class="">
>> of problems.<br class="">
>><br class="">
>> Which OS you used on the problematic VM?<br class="">
>><br class="">
>> cheers<br class="">
>> gregor<br class="">
>><br class="">
>> On 11/06/16 19:22, Anantha Raghava wrote:<br class="">
>> > Hi,<br class="">
>> ><br class="">
>> > Even I observed this behaviour.<br class="">
>> ><br class="">
>> > When we take the snapshot, the main VM using which the snapshot was<br class="">
>> > taken is shutdown and a new VM with external-<VMName> comes to<br class="">
>> life. We<br class="">
>> > cannot get the original VM back to life, but a clone starts<br class="">
>> functioning.<br class="">
>> ><br class="">
>> > We cannot remove the snapshot whether or not the VM is running. I<br class="">
>> had to<br class="">
>> > remove the entire VM that came to life with snapshot and recreate the<br class="">
>> > entire VM from scratch. Luckily the VM was still not in production,<br class="">
>> > hence could afford it.<br class="">
>> ><br class="">
>> > First I could not understand, why, when a snapshot is created, the VM<br class="">
>> > with snapshot comes to life and starts running and not the<br class="">
>> original VM.<br class="">
>> ><br class="">
>> > Is it necessary that we shutdown the VM before taking snapshots?<br class="">
>> > Snapshot is supposed to be a backup of original VM, that unless we<br class="">
>> > restore by cloning should not come to life as I understand.<br class="">
>> ><br class="">
>> > --<br class="">
>> ><br class="">
>> > Thanks & Regards,<br class="">
>> ><br class="">
>> > Anantha Raghava<br class="">
>> ><br class="">
>> ><br class="">
>> > On Saturday 11 June 2016 08:09 PM, gregor wrote:<br class="">
>> >> Hi,<br class="">
>> >><br class="">
>> >> a VM has snapshots which are unable to remove during when the VM<br class="">
>> is up.<br class="">
>> >> Therefore I power down the Windows Server 2012 VM. The snapshots are<br class="">
>> >> still unable to remove and the VM can't boot anymore !!!<br class="">
>> >><br class="">
>> >> This is the message from engine.log<br class="">
>> >><br class="">
>> >> ------------------<br class="">
>> >> Message: VM srv03 is down with error. Exit message: Bad volume<br class="">
>> specification<br class="">
>> >> ------------------<br class="">
>> >><br class="">
>> >> Clone is not possible I get:<br class="">
>> >> ------------------<br class="">
>> >> Message: VDSM command failed: Image is not a legal chain<br class="">
>> >> ------------------<br class="">
>> >><br class="">
>> >> All others VM's can be powered down and start without any problem.<br class="">
>> >> What can I do?<br class="">
>> >> This is very important because now no one can work :-( !!!<br class="">
>> >><br class="">
>> >> cheers<br class="">
>> >> gregor<br class="">
>> >> _______________________________________________<br class="">
>> >> Users mailing list<br class="">
>> >> <a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a>><br class="">
>> >> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank" class="">http://lists.ovirt.org/mailman/listinfo/users</a><br class="">
>> ><br class="">
>> _______________________________________________<br class="">
>> Users mailing list<br class="">
>> <a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a> <mailto:<a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a>><br class="">
>> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank" class="">http://lists.ovirt.org/mailman/listinfo/users</a><br class="">
>><br class="">
>><br class="">
> _______________________________________________<br class="">
> Users mailing list<br class="">
> <a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a><br class="">
> <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank" class="">http://lists.ovirt.org/mailman/listinfo/users</a><br class="">
><br class="">
</blockquote></div>
_______________________________________________<br class="">Users mailing list<br class=""><a href="mailto:Users@ovirt.org" class="">Users@ovirt.org</a><br class="">http://lists.ovirt.org/mailman/listinfo/users<br class=""></div></blockquote></div><br class=""></body></html>