utmapp / UTM

Virtual machines for iOS and macOS
https://getutm.app
Apache License 2.0
26.14k stars 1.31k forks source link

Backup Management #4205

Open ozbrk opened 2 years ago

ozbrk commented 2 years ago

It seems there is no way to run backup operations on UTM. It would be greate to add a feature for that and a manager for backups.

LostInCompilation commented 2 years ago

You can use the "Share..."-function of every VM to export an .UTM file which you can import again. Or what do you mean by backup feature/backup manager? A backup manager doesn't make much sense in my opinion. Backups should be managed by specialised 3rd party software or TimeMachine. With your requirement every program would need their own backup manager, which would be quite a mess.

ozbrk commented 2 years ago

For example I need to create a malware analysis lab. Which means I need to make a backup of the current victim VM to return the original state after messing it up quite a little bit. That's what I meant

LostInCompilation commented 2 years ago

You could use "Run without saving changes" for this I think.

ideologysec commented 2 years ago

I think the idea in question is snapshots. Which is something being worked on, but would need to be implemented with APFS files clones. You can get halfway there by duplicating the UTM bundle in Finder when in a known good state, running it, and then shutting down -> deleting -> recopying in Finder.

Track the pull request for the feature here: https://github.com/utmapp/UTM/pull/3893

ozbrk commented 2 years ago

Yeah sorry for my terminology on that I completely forgot the true term for it and used somthing different.

KhaineBOT commented 1 year ago

Are there two things here, one is to create snapshots so you can revert to a known good state, and then the other is support to allow backup tools to create a consistent backup of the virtual machine.

For example, Parallels has a feature called SmartGuard which works to ensure that Time Machine backups are consistent. I think it works by taking a snapshot prior to Time Machine running. The is independent of a users ability to manually create a snapshot.

jkleckner commented 6 months ago

I returned to a VM after a year (tax time...) and forgot the lesson that "clone" is not a "backup". It modifies the macaddr and UUID.

I happily spent hours cloning (mistakenly as backup) prior to changes, switching to the clone when a change broke something, and finally had a VM that worked. Except that now Windows wouldn't accept the license any more that I bought for this VM.

Perhaps I could have gone into the config.plist and edited it, but at that moment I just reverted to an original backup from Time Machine and gave up on the effort.

It would be super nice to just have a "backup" operation right beside "clone" that just made a copy without creating a new UUID and macaddr. Yes, it duplicates disk hugely, but during an inner loop of experimentation that is fine. Waiting for snapshots is not required for this common use case.