Giter VIP home page Giter VIP logo

utm-snapshot-manager's Introduction

UTM Snapshot Manager

This is a companion app for the popular MacOS virtual machine host UTM to manage snapshots for existing virtual machines. UTM itself doesn't give access to that functionality so far; however the QEMU hypervisor which UTM leverages per default, offers snapshot management. This project is intended as proof-of-concept for that functionality and not as a releasable product – especially it doesn't support taking live snapshots, supports only the default QEMU hypervisor and doesn't come with a precompiled release binary (since I don't have a paid Apple Developer subscription to create an app package signed for distribution). However it should be perfectly possible to just download and compile it out of the box.

UTM Snapshot Manager - Screenshot of the main window with navigation pane on the left and details view with VMs on the right

Building

Clone the repository ( git clone [email protected]:Metamogul/UTM-Snapshot-Manager.git ), open the included project file in a recent XCode version (14.2. or newer) and build. There are no further source dependencies.

Dependencies

For it's functionality the app depends on qemu-img – it's basically a nice UI frontend for it. The app expects to find it at /opt/homebrew/bin/qemu-img. This dependency is not included. It can be installed as part of the brew qemu package via brew install qemu.

Usage

Use the navigation pane on the right to manage groups of VMs. A group can also just contain one virtual machine. With a group selected, virtual machines can be added via the ➕ icon in the navigation area. Every virtual machine in a group will display a list of it's snapshots or a placeholder if there are none. Use the ➕, ➖ and 🔄 icons in the central toolbar area to create, delete or restore a snapshot of the disks for every VM in the group. Open a context menu in an empty space at the bottom of a snapshot list to add a snapshot to just that single virtual machine's disk. Select a snapshot in a list and open a context menu to restore or delete just that particular snapshot.

Warning: Please keep in mind that the snapshot creation operates only on the disk files of the VMs. Don't use it on live VMs, because there's a very high risk of ending up with a corrupted file system due to uncommitted changes, unwritten caches etc.

Known issues

During development and testing, I've discovered a number of minor issues with the UI which I didn't take the time to fix so far.

  • When deleting the VM group directly over the creation button, the creation button will be highlighted until clicked again.
  • Selecting a row in a snapshot table sometimes takes clicking on it twice or more, same goes for opening the context menu on it.
  • When deleting a snapshot, occasionally a bunch of === AttributeGraph: cycle detected through attribute 787512 === warnings show up in the debug log.

Contributing

Feel free to contribute by creating a fork and issuing a pull request. When issuing a pull request, it would be nice if you could relate it to an open ticket so there's documentation later on.

If you're part of the UTM development team and want to incorporate such functionality into UTM, let me know. I'd be glad to help.

Reporting a bug

To report a bug, please create an issue ticket for it. In the ticket please provide a description of the state of the app, the action you've been performing, the expected outcome and the actual outcome. Also include your system architecture as reported by arch, the MacOS version you're on as reported by sw_vers, the XCode-Version you've been using as reported by xcodebuild -version as well as any other information that seems relevant to you.

License

This project is distributed under the permissive Apache 2.0 license as included. It doesn't use any other source components, packages or libraries under different licenses (apart from Apple's own system frameworks).

The app icon was taken from the orignal UTM project, where it's included with the source. If you're part of that project and feel that this is not appropriate, please contact me so I can replace it.

utm-snapshot-manager's People

Contributors

metamogul avatar omogenot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

utm-snapshot-manager's Issues

How is this creating snapshots from UTM's raw images?

I'm just curious how to create a manual snapshot from a raw image in a UTM container? When I try to use the following command manually I always get an error. I'd appreciate any clarification on this. Thanks in advance!

Command I use:
qemu-img snapshot -c $tag /User/$username/Library/Containers/com.utmapp.UTM/Data/Documents/macOS.utm/Data/$id.img

Error I get:
qemu-img: Could not create snapshot '$tag': -45 (Operation not supportetd)

VMs file system corrupted after restoring snapshot

Action performed:

  1. Start a VM
  2. Create a snapshot in the snapshot manager
  3. Restore the snapshot

Expected outcome:

  1. The VM will start in that state when the snapshot was created

Actual outcome

  1. The VMs disk is reported as corrupted by UTM, the VM cannot be used anymore.

System Architecture, MacOS version, Xcode version:

MacOS Ventura 13.3.1(a) (22E772610a), arm64, Xcode 14.3, Build version 14E222b

Unable to create snapshot of macOS

Hello,

I am getting this error in the xcode console when I try to create a snapshot:

2023-07-30 11:24:27.690485-0500 UTM Snapshot-Manager[62137:786247] [default] CGSWindowShmemCreateWithPort failed on port 0

To reproduce:

  1. Run project using xcode
  2. Create new group
  3. Import vm
  4. click create snapshot button
  5. unable to add

Unable to create snapshot.

Hi!

Every time I try to create a snapshot, I get this error:

"CLIENT ERROR: TUINSRemoteViewController does not override -viewServiceDidTerminateWithError: and thus cannot react to catastrophic errors beyond logging them"

Is it possible that this error appears, since my vm is on a SD Card?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.