HPE Morpheus VM Essentials
1845755 Members
4467 Online
110249 Solutions
New Discussion

Re: VM will not start after taking a snapshot when vm is shut down

 
IPAC_Ben
Frequent Visitor

VM will not start after taking a snapshot when vm is shut down

Hi 

I am testing HPE VM Essentials in a lab environment.

Running HPE_VM_Essentials_SW_image_v8.0.10_S5Q83-11027 on Ubuntu that was installed using the unified installer HVM_Install_24.04.ISO_S5Q83-11031

If I shutdown a VM and take a snaphot the VM will no longer start.

If I delete the snapshot the VM can be started again.

Snapshot created using the actions create snapshot option with the VM shutdown.

snapshot.png

 

 The VM will fail to start.

failed to start.png

Trying to start the vm from console shows a permissions issue.

failed to start console.png

Permissions on the file are as follows.

list command.png

The VM will start if the snapshot is deleted.

The VM will start after a shutdown if the snaphot is take while the VM is running.

If the snapshot is take with the VM running the resulting snapshot is owned by the kvm user.

list command 2.png

Is this behavious expected ? (snapshots taken when the vm is running are fine. snapshots taken with vm shutdown result in the vm failing to start until the snapshot is deleted).

Should I be able to take snapshots when the VM is in the shutdown state ?

Thank you kinldy for your help.

 

5 REPLIES 5
Ranveer
HPE Pro

Re: VM will not start after taking a snapshot when vm is shut down

Hello IPAC_Ben,
I created snapshot when machine was running & when was in shut state, VM booted fine,
Please let me know if you are testing in particular order or most tests needed.

====//VM name  under scope of testing:  pkb-win2k //===

root@hpevmenode2:~# cd /mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# virsh list --all
Id Name State
----------------------------
43 ashok6 running
44 AA-PKB-1 running
45 AA-pkb3 running
254 pkb-win2k running

Test 1: Created Screen shot from VME GUI when VM was UP & name the Screens shot in description as "1st_online"?

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# ll
total 11466224
drwxr-xr-x 2 root root 3864 Nov 4 17:43 ./
drwxr-xr-x 26 root root 3864 Nov 4 02:13 ../
-rwxrwxr-- 1 libvirt-qemu kvm 32217432064 Nov 4 17:43 hvm_47-disk-0*
-rw------- 1 libvirt-qemu kvm 1703936 Nov 4 17:43 hvm_47-disk-0-snap-1762258423636  <<online snap created here


Checking domblklist pointing towards 1st online snap:

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# virsh domblklist pkb-win2k
Target Source
------------------------------------------------------------------------------------------------
sda /mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k/hvm_47-disk-0-snap-1762258423636 <<

Test 2:  Shutdown VM & create snapshot, while taking snapshot mention "1st_offline_snap" in description".

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# virsh shutdown pkb-win2k
Domain 'pkb-win2k' is being shutdown

Confimed VM shut off:

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# virsh list --all
Id Name State
----------------------------
43 ashok6 running
44 AA-PKB-1 running
45 AA-pkb3 running
- pkb-win2k shut off

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# echo "Creating snap when vm in shut"
Creating snap when vm in shut

Here SNAP Created from VME Manager GUI:

====//After creating Snap of shut machine //===
root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# ll
total 11507276
drwxr-xr-x 2 root root 3864 Nov 4 17:49 ./
drwxr-xr-x 26 root root 3864 Nov 4 02:13 ../
-rwxrwxr-- 1 libvirt-qemu kvm 32217432064 Nov 4 17:43 hvm_47-disk-0*
-rw------- 1 root root 43450368 Nov 4 17:48 hvm_47-disk-0-snap-1762258423636 >> when VM was running
-rw-r--r-- 1 root root 197088 Nov 4 17:49 hvm_47-disk-0-snap-1762258736793 >>>>When VM was shut

After creating snap of shut machine, domblklist pointed toward new snap (of shut machine)

snap_screenshot.png

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# virsh domblklist pkb-win2k
Target Source
------------------------------------------------------------------------------------------------
sda /mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k/hvm_47-disk-0-snap-1762258736793  <<

VM Started successfully & the ownership got changed to libvirt-qemu kvm automatically.
root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# virsh start pkb-win2k
Domain 'pkb-win2k' started

root@hpevmenode2:/mnt/39d8222c-9700-47fe-8be2-8dc12ad0a3e8/pkb-win2k# ll
total 11508112
drwxr-xr-x 2 root root 3864 Nov 4 17:49 ./
drwxr-xr-x 26 root root 3864 Nov 4 02:13 ../
-rwxrwxr-- 1 libvirt-qemu kvm 32217432064 Nov 4 17:43 hvm_47-disk-0*
-rw------- 1 libvirt-qemu kvm 43450368 Nov 4 17:48 hvm_47-disk-0-snap-1762258423636
-rw-r--r-- 1 libvirt-qemu kvm 1114112 Nov 4 17:49 hvm_47-disk-0-snap-1762258736793

Kinldy let me know if you want to me test something else or in other sequence.

Best Regards

Ranveer



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
martezr
Occasional Advisor

Re: VM will not start after taking a snapshot when vm is shut down

I'm seeing the same behavior when attempting to start a virtual machine after creating a VM snapshot. This behavior only occurs when the virtual machine is running on local storage. If the virtual machine is running on non-local storage then the snapshot is created and the virtual machine is able to start properly.

IPAC_Ben
Frequent Visitor

Re: VM will not start after taking a snapshot when vm is shut down

I can confirm that the above VM was also running on local storage.

PeterTzvetanov
HPE Pro

Re: VM will not start after taking a snapshot when vm is shut down

Hi,

I can confirm that bug behavior. Looks like it needs to be elevated to the developers. Will make sure that it gets elevated, but unsure when it gets applied, because usually you use an shared storage.

With regards



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
RodPin
Occasional Advisor

Re: VM will not start after taking a snapshot when vm is shut down

Hello, any updates regarding this one?

When closing the VM, the snapshot file access will be changed to "root" "root", so "libvirt-qemu" cannot start the hard disk.

What doesn't make much sense to me is because this happens not to all VMs, but only one of them. I was checking the original HD qcow2 files and all of them have the same permissions.