Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View/manage/export vm's that were started using the qemu-system-arm or qemu-system-x86_64 cli #6907

Closed
mattboston opened this issue Dec 19, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@mattboston
Copy link

There are two things I haven't found a way to do. First, there are times that I need to start a vm from the cli by using the qemu-system-arm or qemu-system-x86_64 cli such as when I use Packer to build vm's. It would be nice for these vm's to appear in UTM and be able to be viewed or managed.

Second, it would be nice to be able to take an existing vm that was built in UTM and export as a qemu-system-* command.

@mattboston mattboston added the enhancement New feature or request label Dec 19, 2024
@ideologysec
Copy link

ideologysec commented Dec 19, 2024

How would UTM know about qemu images that you were running in a completely different context? there's no easy way to add them in from outside the sandbox. Are you looking for it to monitor a directory? Import a qemu command with a path to an image?

Also, UTM now has a Packer plugin, which might help you out: https://github.com/naveenrajm7/packer-plugin-utm

Secondly, you can in fact export as a QEMU command, in 4.6.2, edit the VM, go to QEMU -> Arguments and "Export QEMU Command.." is available.

 2024-12-19 at 15 53 12

@mattboston
Copy link
Author

I was looking at packer-plugin-utm, but it looks like it's missing the ability to create a vm from iso. I found an example in the author's repo, but looks like it hasn't been implemented yet.

As far as monitoring another directory or context, I'm not sure how UTM's qemu differs from the standard macos version. If it were possible, it would be a nice feature.

For the second, that's perfect. I didn't see that before.

@naveenrajm7
Copy link
Contributor

Hello,

Packer

Thank you for checking out the UTM Packer plugin. The iso builder has been implemented and it resides in the branch utm-iso. We want to show one solid example of how to use iso builder end-to-end, after that it will be merged and released. We will update here when its merged.

While the most components required for packer functionality exists, there are few APIs still lacking from UTM side. eg: Ability to add/remove/update displays (required for vnc). Until these are done the build process will be semi-automatic , where you will be prompted to add displays etc.

Beyond this, from our experience of trying to build several base images using this plugin for our vagrant plugin , we found while the plugin automation works great, it is hard and time consuming to figure out which packer recipe suites which VM. eg: As evident by other issues here, it is difficult to know which display works well for which OS installation. However, once you have the steps for proper autoinstall it is easy to let packer do it.

Difference between UTM Qemu and Standard Qemu

UTM uses a custom fork of qemu. More specifics are detailed in the UTM Documentation

@naveenrajm7
Copy link
Contributor

Just released a new version of UTM packer plugin with ISO builder support
https://github.com/naveenrajm7/packer-plugin-utm/releases/tag/v0.1.0

Example with packer recipe:
https://github.com/naveenrajm7/utm-box?tab=readme-ov-file#example

@osy
Copy link
Contributor

osy commented Dec 23, 2024

Closing this because as indicated in the comment above, the ability to export the QEMU command is already a feature. However, be warned that we use a fork of QEMU so some devices may not work as-is on QEMU. Additionally, we use SPICE which isn't built with brew's QEMU. So the arguments should be seen more as a reference for debugging than something you can copy-paste and expect to work.

@osy osy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants