Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VM Snapshots

Featured Replies

  • Author
  • Community Expert
2 hours ago, bmartino1 said:

So i'm playing around with the unraid VM in v7 beta 2

image.thumb.png.9491a0e843a86d9368a3ceeff2b14587.png

 

I have found a few bugs here and there from general use and would like to know more on the snapshot system

 

another small bug is removing older VMs... 

 

image.thumb.png.d94201b2c4a04989bee58306e51021ef.png

image.png.1df6802886fb380c9b38e488a5f3a056.png

 

image.thumb.png.5df4669b6c63d9ad3a97e64f7dc7bca6.png

 

This was a vm that I chose to remove vm and disk. but I can't remove this folder... 

 

Another small bug is a new vm created in vdisk 1 doen't build the vdisk. I was able to copy the vdisk over to other VMs, as if unrad makes a vdisk it 500 mb and a ubuntu installer can't find the disk missing block device... but copy over a unraid 20GB premade form unraid 6 and the same vm ubuntu installer can now see and use the vdsik...


Example in testing for example the libvirt.img breaks, moves or is no longer, any vm wiht snapshots is lost. there may be a way to fix this IDK. but is a concern if moving a vm from one unraid to another... Unless we merge the snapshot back into vdisk 1...

From my experience.

image.png.a21073382b52c481962ca9f9472c2253.png

 

I need to make 2 snapshots for a backup. If i want to revert to snapshot base per testing i would click the earlier chain and click revert snapshot. Great!

I can't remove an older snapshot as this will break the chain needed to boot and have my curent work in the lattest sna[shot (hence 2) 1 for the actual backup, 1 for the back runnig new code...

So my question is what does block commit and block Pull due and what is the use case.

How would I Merge my current chain into 1 disk image now that i have a finished project in testing.

So other side VM feature request hat would be nice as we have a excellent implementation of ejecting disks would be to add a boot order option to the web gui to change the boot from the vdisk file over the disk drive file.

Thoughts concerns, or am I miss understanding the implementation of how snapshots in VM is supposed to work?

Bug report added here:

 

This section is just for general info, issues should be posted in the prerelease bug section

  • Replies 90
  • Views 21.2k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • There are two options at present qemu which creates a qcow2 overlay and zfs filesystem. Default is qemu. Option for btrfs will be added at a future date.   Snapshot is not a backup of the wh

  • I have tried any of the new options yet, you can download new binary from gitlab releases and replace the current file.   /usr/bin/virtiofsd     Additional options can be pass

  • I have a NVME cache drive I use to hold my VMs, very close to capacity. So when I go to create a snapshot I get a storage error as I no extra space on the NVME to store 'said' snapshot. Is there the a

Posted Images

  • Author
  • Community Expert
2 hours ago, bmartino1 said:

This was a vm that I chose to remove vm and disk. but I can't remove this folder..

Is this on zfs storage is so it will be fixed in next release.

  • Author
  • Community Expert
2 hours ago, bmartino1 said:

not sure if these are causing problems with snapshots and other issues in beta 7

Snapshot plugin does not do anything with zfs snaps. It just show zfs list.

 

Are you doing zfs snaps in vm manager or qemu ones?

  • Author
  • Community Expert
3 hours ago, bmartino1 said:

So my question is what does block commit and block Pull due and what is the use case.

Info on this post. 

 

  • 2 weeks later...

Hey guys, running unraid 7 beta 2 and made an snapshot of an windows 10 VM before upgrading to 11.
The upgrade went throught, and now i wanted to delete the snapshot and stay on the data the VM now is.
After reading threads the "Block commit" function is what i am wanting.
Started it, with the VM shutdown.

 

Sadly, the output window is empty, for over 15 minutes now (See picture).

 

The files disk files seems untouched:

 

image.png.1a8de43d38b17fb033dbff4b79d177a9.png

 

Any hint's what i can do to merge those vdisk's?
Do i have to start the VM to get it merged?

(Dont want to mess it up :-)

 

Thank you

 

 

image.thumb.png.d0d8a340aea1af8250aa9ad1db5048d2.png

 

image.thumb.png.57f32e61ff362941a8c2643065cc46d7.png

Edited by pOpYRaid

After half an hour my unraid was going to sleep.
File are unchanged.
Started the commit again, and again the window is empty (as on the first try).
Also the file are not changing (size and time stamp).

 

Please help?

Where are Log files for the commands launched?

 

thx

  • Author
  • Community Expert
56 minutes ago, pOpYRaid said:

After half an hour my unraid was going to sleep.
File are unchanged.
Started the commit again, and again the window is empty (as on the first try).
Also the file are not changing (size and time stamp).

 

Please help?

Where are Log files for the commands launched?

 

thx

Should appear on from Page.

 

image.png

@SimonFin my case it's empty. It doesn't matter how often i start the commit:

 

image.thumb.png.794d7ce9113c654973d252c3a9b95584.png

 

Any hint's how i can proceed?
Maybe because my VM name and snapshot has spaces in it?

 

ok, i fixed it!

 

It was definitely the issue that i used KVM (domain) name with spaces!
I will call it a bug, you find articles on the net saying the frontend using libvirt should NOT allow KVM (domain) names with spaces.

 

I fixed it by doing the following:

  • Rename the maschine with the webgui to a name without spaces ("Windows11" in my case)
  • The snapshots seems to be gone and are not shown in webgui
    That's because the snapshotdb\{domain} folder is not renamed.
    Maybe that's another bug.
    I manually renamed it in directory "/etc/libvirt/qemu/snapshotdb/" from "Windows\ 11\ Server\ \(Macrium\ Site\ Manager\)" to "Windows11" (same as KVM name)
    After pressing F5 in the webgui on the VM tab, snapshots for this machine is shown again
  • Sadly "Block commit" does'nt work, it complains about missing base image
    Sure, the sanpshotdb has the wrong domain path in it.
  • I dirty/lazy fixed it by coping the new renamed domain folder to the old name.

    cd /mnt/cache/domains
    cp -r Windows11 "Windows 11 Server (Macrium Site Manager)"
     
  • After that the "Block commit" worked
  • Now you have to remove the New domain with "rm -R Windows11".
    Because the merged disk is at the old path.
    An than move the new vdisk back to the new KVM/domain name 'mv "Windows 11 Server (Macrium Site Manager)"/ Windows11'

    !! Attention !! Before you remove anything, be SURE that's the correct directory or make an backup.
    I have double checked the timestamps of vdisk1.img.

And yessss, it boots up!

 

@limetech can you please look into this, this should be fixed for the final v7 release.
There are two issues:

  • Don't allow spaces in KVM & snapshot names
  • Also rename the snapshotdb when renaming KVM over webgui and maybe fix the baseimage path inside the db
    or prevent renaming in the gui when there are snapshots.

thx

Edited by pOpYRaid

  • Author
  • Community Expert
42 minutes ago, pOpYRaid said:

ok, i fixed it!

 

It was definitely the issue that i used KVM (domain) name with spaces!
I will call it a bug, you find articles on the net saying the frontend using libvirt should NOT allow KVM (domain) names with spaces.

 

I fixed it by doing the following:

  • Rename the maschine with the webgui to a name without spaces ("Windows11" in my case)
  • The snapshots seems to be gone and are not shown in webgui
    That's because the snapshotdb\{domain} folder is not renamed.
    Maybe that's another bug.
    I manually renamed it in directory "/etc/libvirt/qemu/snapshotdb/" from "Windows\ 11\ Server\ \(Macrium\ Site\ Manager\)" to "Windows11" (same as KVM name)
    After pressing F5 in the webgui on the VM tab, snapshots for this machine is shown again
  • Sadly "Block commit" does'nt work, it complains about missing base image
    Sure, the sanpshotdb has the wrong domain path in it.
  • I dirty/lazy fixed it by coping the new renamed domain folder to the old name.

    cd /mnt/cache/domains
    cp -r Windows11 "Windows 11 Server (Macrium Site Manager)"
     
  • After that the "Block commit" worked
  • Now you have to remove the New domain with "rm -R Windows11".
    Because the merged disk is at the old path.
    An than move the new vdisk back to the new KVM/domain name 'mv "Windows 11 Server (Macrium Site Manager)"/ Windows11'

    !! Attention !! Before you remove anything, be SURE that's the correct directory or make an backup.
    I have double checked the timestamps of vdisk1.img.

And yessss, it boots up!

 

@limetech can you please look into this, this should be fixed for the final v7 release.
There are two issues:

  • Don't allow spaces in KVM & snapshot names
  • Also rename the snapshotdb when renaming KVM over webgui and maybe fix the baseimage path inside the db
    or prevent renaming in the gui when there are snapshots.

thx

Will look at my code it maybe the snapshot with spaces i need to check.

@SimonF sorry, didn't know VM Engine is your code :)

 

Thanks for looking into it.

  • Author
  • Community Expert
25 minutes ago, pOpYRaid said:

@SimonF sorry, didn't know VM Engine is your code :)

 

Thanks for looking into it.

Works ok for me so far,

 

Can you confirm some details of names you used. I have tried with spaces all ok.

 

image.png

Sure, the VM name was "Windows 11 Server (Macrium Site Manager)" (without quotes).
The snapshot name was "Vor Windows 11 Upgrade" (without quotes).

Maybe it was the bracket's in the KVM name?

 

 

  • Author
  • Community Expert
30 minutes ago, pOpYRaid said:

Sure, the VM name was "Windows 11 Server (Macrium Site Manager)" (without quotes).
The snapshot name was "Vor Windows 11 Upgrade" (without quotes).

Maybe it was the bracket's in the KVM name?

 

 

You running on a ZFS pool? This has been add to next release.

 

image.png

  • Author
  • Community Expert
2 hours ago, pOpYRaid said:

Also rename the snapshotdb when renaming KVM over webgui and maybe fix the baseimage path inside the db
or prevent renaming in the gui when there are snapshots.

Will look to add disable for rename in this version as snapshotdb will need all paths updating also. So will look to allow rename in 7.1+

root@computenode:~# cat /etc/libvirt/qemu/snapshotdb/AAArch/snapshots.db 
{
    "S20240820195913": {
        "name": "S20240820195913",
        "parent": "Base",
        "state": "shutoff",
        "desc": null,
        "memory": {
            "@attributes": {
                "snapshot": "no"
            }
        },
        "creationtime": "1724180353",
        "method": "QEMU",
        "backing": {
            "hdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2"
            ],
            "rhdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2"
            ]
        },
        "primarypath": "\/mnt\/vmpoolzfs\/domains2\/AAArch",
        "disks": [
            {
                "@attributes": {
                    "name": "hdc",
                    "snapshot": "external",
                    "type": "file"
                },
                "driver": {
                    "@attributes": {
                        "type": "qcow2"
                    }
                },
                "source": {
                    "@attributes": {
                        "file": "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2"
                    }
                }
            },
            {
                "@attributes": {
                    "name": "hda",
                    "snapshot": "no"
                }
            }
        ]
    },
    "S20240820200054": {
        "name": "S20240820200054",
        "parent": "S20240820195913",
        "state": "shutoff",
        "desc": null,
        "memory": {
            "@attributes": {
                "snapshot": "no"
            }
        },
        "creationtime": "1724180454",
        "method": "QEMU",
        "backing": {
            "hdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820200054qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2"
            ],
            "rhdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820200054qcow2"
            ]
        },
        "primarypath": "\/mnt\/vmpoolzfs\/domains2\/AAArch",
        "disks": [
            {
                "@attributes": {
                    "name": "hdc",
                    "snapshot": "external",
                    "type": "file"
                },
                "driver": {
                    "@attributes": {
                        "type": "qcow2"
                    }
                },
                "source": {
                    "@attributes": {
                        "file": "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820200054qcow2"
                    }
                }
            },
            {
                "@attributes": {
                    "name": "hda",
                    "snapshot": "no"
                }
            }
        ]
    }
}

 

36 minutes ago, SimonF said:

You running on a ZFS pool? This has been add to next release.

 

image.png

Nice, thanks a lot adding the character check!

 

No, I am running just an BTRFS JBOD Array with 2 disks and one parity disk.

26 minutes ago, SimonF said:

Will look to add disable for rename in this version as snapshotdb will need all paths updating also. So will look to allow rename in 7.1+

root@computenode:~# cat /etc/libvirt/qemu/snapshotdb/AAArch/snapshots.db 
{
    "S20240820195913": {
        "name": "S20240820195913",
        "parent": "Base",
        "state": "shutoff",
        "desc": null,
        "memory": {
            "@attributes": {
                "snapshot": "no"
            }
        },
        "creationtime": "1724180353",
        "method": "QEMU",
        "backing": {
            "hdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2"
            ],
            "rhdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2"
            ]
        },
        "primarypath": "\/mnt\/vmpoolzfs\/domains2\/AAArch",
        "disks": [
            {
                "@attributes": {
                    "name": "hdc",
                    "snapshot": "external",
                    "type": "file"
                },
                "driver": {
                    "@attributes": {
                        "type": "qcow2"
                    }
                },
                "source": {
                    "@attributes": {
                        "file": "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2"
                    }
                }
            },
            {
                "@attributes": {
                    "name": "hda",
                    "snapshot": "no"
                }
            }
        ]
    },
    "S20240820200054": {
        "name": "S20240820200054",
        "parent": "S20240820195913",
        "state": "shutoff",
        "desc": null,
        "memory": {
            "@attributes": {
                "snapshot": "no"
            }
        },
        "creationtime": "1724180454",
        "method": "QEMU",
        "backing": {
            "hdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820200054qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2"
            ],
            "rhdc": [
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820193043qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820195913qcow2",
                "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820200054qcow2"
            ]
        },
        "primarypath": "\/mnt\/vmpoolzfs\/domains2\/AAArch",
        "disks": [
            {
                "@attributes": {
                    "name": "hdc",
                    "snapshot": "external",
                    "type": "file"
                },
                "driver": {
                    "@attributes": {
                        "type": "qcow2"
                    }
                },
                "source": {
                    "@attributes": {
                        "file": "\/mnt\/user\/domains2\/AAArch\/vdisk1.S20240820200054qcow2"
                    }
                }
            },
            {
                "@attributes": {
                    "name": "hda",
                    "snapshot": "no"
                }
            }
        ]
    }
}

 

Thx a lot, also for this change!

  • Author
  • Community Expert
35 minutes ago, pOpYRaid said:

Thx a lot, also for this change!

Will do something similar for rename

 

image.png

  • 1 month later...

@SimonF

 

In poking around with the crashing VM issue, I deleted a few VM's and made some new ones. I am on a full ZFS system, and all VM's have/had snapshots taken. 2 x VM's that I deleted and removed still have remnants in /etc/libvirt/qemu/snapshotdb:

 

image.png.a75da22edf80754c879fa20a1735c00c.png

 

Is this expected and is it safe to manually delete them? Two of those folders no longer exist as a VM (so I assume the snap shots must be gone as well, right?).

 

 

Another thing, I noticed weird spacing issues on the VM snapshot names. I used regular spaces and parenthesis and got lots of white space it looks like.

Spacing.thumb.jpg.7a48a50981d127e6ddabe2ca1135e286.jpg

 

And finally, while I have you 🙂 I'm sure you're already aware, but the ability to snapshot breaks if you enable clipboard functionality. I had previously found a bug report online for it somewhere, seems like someone picked it up and then it went silent.

Edited by cybrnook

  • Author
  • Community Expert
51 minutes ago, cybrnook said:

Is this expected and is it safe to manually delete them? Two of those folders no longer exist as a VM (so I assume the snap shots must be gone as well, right?).

Yes snapshots are in the domains path, it is safe to remove from the snapshotdb. I will check the code.

 

Re clip board I think I have put a check to not allow if copy paste is enabled. Beta 3 is due to release so will check this and your other reports. Thanks for reporting.

 

49 minutes ago, SimonF said:

Yes snapshots are in the domains path, it is safe to remove from the snapshotdb. I will check the code.

 

Re clip board I think I have put a check to not allow if copy paste is enabled. Beta 3 is due to release so will check this and you other reports. Thanks for reporting.

Side note, I modified manually the snapshots.db file for my EnGenius Fitcon VM as an example and removed the parenthesis as well as minimized my spacing to a single space in the "desc": and that brought the formatting back in. (Browser is Edge Chromium):

 

image.png.767e6b6f646eb8834f79587ca20c8b4a.png

 

Maybe something as simple as wrapping in ' ' instead of " " ? 🤷‍♂️

Edited by cybrnook

  • Author
  • Community Expert
19 hours ago, cybrnook said:

Side note, I modified manually the snapshots.db file for my EnGenius Fitcon VM as an example and removed the parenthesis as well as minimized my spacing to a single space in the "desc": and that brought the formatting back in. (Browser is Edge Chromium):

 

image.png.767e6b6f646eb8834f79587ca20c8b4a.png

 

Maybe something as simple as wrapping in ' ' instead of " " ? 🤷‍♂️

If copy and paste is enabled you should get this error if you try to snapshot if running.

 

image.png

 

The same table format is used at the disks and may not be wide enough for description so starting working on new css for snapshot table.(WIP)

 

image.png

 

@SimonF for the clipboard error, yes agreed and I think I got an error/warning similar to that when I tried to make my first snap on a VM where I had clipboard functionality enabled (as I normally had done in the past, so didn't think much of it). The head scratcher I had was trying to decipher what the warning/error was telling me and equating it to having to disable the clipboard. That's where google came in handy. I didn't realize that warning was put in by you and not just a generic one being provided from the subsystem.

 

This is that link I found that pointed me to the clipboard. Seems it was a known issue, but perhaps abandoned for a fix? https://gitlab.com/qemu-project/qemu/-/issues/1380

 

 

For the spacing, would be greatly appreciated at least for verbose folks like myself who run in debug mode 🙂 

Edited by cybrnook

  • Author
  • Community Expert
8 minutes ago, cybrnook said:

@SimonF for the clipboard error, yes agreed and I think I got an error/warning similar to that when I tried to make my first snap on a VM where I had clipboard functionality enabled (as I normally had done in the past, so didn't think much of it). The head scratcher I had was trying to decipher what the warning/error was telling me and equating it to having to disable the clipboard. That's where google came in handy. I didn't realize that warning was put in by you and not just a generic one being provided from the subsystem.

 

This is that link I found that pointed me to the clipboard. Seems it was a known issue, but perhaps abandoned for a fix? https://gitlab.com/qemu-project/qemu/-/issues/1380

 

 

For the spacing, would be greatly appreciated at least for verbose folks like myself who run in debug mode 🙂 

Yes I posted on that thread I will see if I look at what needs to be done and create a pr for it.

Just now, SimonF said:

Yes I posted on that thread

ROFL, and so you did. I see that now 🙂 Obviously you're well aware then.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.