12 ms·
Quickemu: Quickly create and run optimised Win-10,11/macOS/Linux on Linux
- esjeon 5y agoI've always kept a script like this on my computer, but the idea of "optimized" is very subjective, volatile, and prone to change. Also, that was a reason why I ditched libvirt, because once its internal change impacted the performance on my side. There's just no correct answer here. Certainly, however, this can be handy if one needs to quickly spin up something.
- alufers 5y agoWhat I would really like to exist, is a VM image for Windows 10, without all the telemetry, updates and anti-virus software. I hate that when I need to test something on IE, my laptop's fans start spinning up, and the VM is unusable, because Microsoft decided its a good time to scan the whole disk and consume all the vCPUs allocated to the vm.
- jbaber 5y agoI think that's what https://reactos.org/ https://reactos.org/ is supposed to be, but I haven't personally installed it.
- gattilorenz 5y agoIt's not. ReactOS is a long-running project aiming at creating an open source OS that is fully Windows compatible so you can run Windows programs on it. While it doesn't have telemetry and you can run it as a VM (arguably the better choice, given it's state), it is not Windows 10 by any stretch, and I guess it doesn't run the latest IE version (but I haven't tried it in ages)
- c0npr 5y agoRead from other posts that a win10 ameliorated unofficial build exist. Seems functional and depends on how much you trust the guys behind it. (or compile your own) https://ameliorated.info/ https://ameliorated.info/ Another option is to buy a ltsc win10 license (if you can find it cheap online)
- gavinray 5y agoThanks for posting this -- hadn't heard of it! I use the Windows Insider program to run legitimate Windows, and used a bunch of debloat/decrapify programs from Github to try to remove the worst offenders. But damn does Windows Defender and some of the other stuff really ream my resources, and there doesn't seem to be any easy way of permanently disabling them =( I'd never heard of an "LTSC" Windows either. Interesting. --- EDIT: Ahh it says there's no support for DirectX12, only Vulkan? I don't know much about this stuff -- I thought it was a software SDK you could just install. But if not, that seems like a pretty huge con: https://wiki.ameliorated.info/doku.php?id=faq#is_directx_12_supported https://wiki.ameliorated.info/doku.php?id=faq#is_directx_12_...
- gizdan 5y agoIs there a windows image that contains none of the hard dependencies like Edge and all stuff? I'm looking for a Windows 10/11 with every that's not necessary stripped out for a local VM for when I need Windows. Ideally things like telemetry, unnecessary apps, windows store etc all removed would be nice. I recall nLite used to be a thing for Windows XP.
- simcop2387 5y agoI don't know if there's one out there right now but I think it should be possible through the UUP process for creating windows install isos. At least if it is possible that'll be how it's done these days. That might give you enough info to find it if it does exist. edit: from another comment thread here, https://ameliorated.info/ https://ameliorated.info/ is apparently everything you're after. Not sure of any info about it myself but that looks to be decently useful.
- jmnicolas 5y agoTry Windows 10 LTSB if you can get a cheap license online.
- willjp 5y agoI haven’t tried this yet, but I’m very excited about this. Virtualizing MacOS is extremely painful, and windows is not fantastic. It would be wonderful to be able to quickly jump in, and build and test a program without a lot of preparation. Thank you!
- implying 5y agoTook a little while to find the magic words in there: https://github.com/wimpysworld/quickemu/blob/af26f41440d63a069045660fad860c797011310a/quickemu#L351 https://github.com/wimpysworld/quickemu/blob/af26f41440d63a0...
- sydthrowaway 5y agoWhat is this?
- lelanthran 5y agoourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc
- alfiedotwtf 5y agoBonus points if you also know these ones (without searching for them): K4HVD... 09 F9 11 02 9D...
- latortuga 5y agoI don't know them but I'm going to venture a guess that at least 1 of them is the DVD decryption key.
- hunter2_ 5y agoThe first looks like a Windows VLK (maybe XP?)
- sydthrowaway 5y agoNo thats FCKGW I can't believe I remembered that.
- WesleyJohnson 5y agoIt's odd the things we remember. I memorized a 25-digit Windows 98 Key because of how many times I reinstalled it. I don't remember why I had to reinstall it so many times, but I sure remember the key!
- hdjjhhvvhga 5y agoI'm not sure how it works now, but a few years ago it was illegal to use more than one copy of Windows in this way (provided that you already have a purchased copy). If you wanted to have two instances, you had to purchase a second copy. I'm not sure what the relevant terms are for macOS now apart from the fact that in the old days VMware had an artificial block you need to remove in order to run Mac OS X. It would be interesting to know the current legal ramifications.
- GeekyBear 5y agoThe old trick of buying an OEM copy of Windows (instead of paying full retail) when you were not an OEM building a computer to be sold to others was just as "illegal".
- detaro 5y agoThat wasn't "illegal" at all in jurisdictions that recognize the first-sale doctrine for licenses (e.g. the EU)
- BBC-vs-neolibs 5y agoWas it illegal, or against a non-enforceable contract?
- jeroenhd 5y agoAFAIK you can use Windows unlicensed as long as you activate it after evaluation. You're right that you can only run one instance of a given Windows product code on a machine for long-time use, though. The last I heard about the macos situation is that virtualisation of macOS is allowed as long as you do it on Apple hardware that you have a license to run macOS on. You can run as many virtual machines on your mac as you want, as long as you've paid for the OS on your mac, which you can't buy separately anymore (making any restrictions on licenses a full ban on macOS VMs, which nobody wants). Perhaps you could buy additional licenses through second hand shops, depending on your jurisdiction. As for legal ramifications, I don't think either Microsoft or Apple will care if you use this for your personal projects. Don't try this as a business, though, because that's where the lawyers start caring. Legally, you'll probably be liable for a civil lawsuit from either Apple or Microsoft. I don't think it's actually considered a crime to run a copy of software without a license in most countries.
- ngcc_hk 5y agoFor legal argument and for macOS I wonder whether I can run this in bootcamp Ubuntu then … For windows alone I wonder as windows do allow no activation (other than …) and should it ok?
- inickt 5y agoLegally, I think yes? You can definitely run macOS under ESXi when it is installed on a real Mac, so I can't imagine the difference between a type 1 and type 2 hypervisor making a difference.
- andrewmackrodt 5y agoFWIW I use my Windows 10 Pro (VLK) license on my gaming PC, and as a virtual machine when using Linux. It's undergone 3 activations, initially for the desktop, once when I was using VirtualBox and the last when I converted my VDI to VMDK when I migrated to VMware. All activations were several months apart however. Windows activation servers were happy enough with that, without any install becoming unactivated (other than the VirtualBox to VMware conversion which is the 3rd activation). While you can use Windows unactivated but it restricts access to various settings, which may not be important to you depending on your use case.
- rcarmo 5y agoThis is pretty handy. I set up a KVM guest the other day and it was a very straightforward affair, but I can see how this can streamline testing. I do wonder if it can use KVM directly instead of QEMU (I can always move the .qcow after, just curious as to how it would work with virsh)
- maccolgan 5y agoWhat do you mean by using KVM directly? Using the KVM module directly, without an userspace component?
- rcarmo 5y agoUsing virsh and virt-manager instead of qemu.
- yjftsjthsd-h 5y agoI'm pretty sure that's less direct; libvirt wraps qemu
- pizza234 5y agoNeat. Something not to forget is that USB devices (host) passthrough can be tricky, as it's a passthrough of the device, not the port. In difficult situations, https://github.com/darkguy2008/hotplugger https://github.com/darkguy2008/hotplugger comes handy (although it needs setup work).
- ncrmro 5y agoFor my gaming windows vm in addition to passing through the gpu I have a dedicated usb card that solves things like Bluetooth controllers acting up
- andrewmackrodt 5y agoIf anyone tries running Photoshop under Windows using this and has good performance please tag me in a comment. I've migrated several times from Qemu, VirtualBox and settled on VMware player (for non commercial usage). I found that to be the "best" performing, although still leaves a lot to be desired and having to open the application, manually sign kernel drivers and then reboot after every kernel upgrade is a little tiresome.
- inickt 5y agoAre you passing in a second GPU to the VM using VFIO? Otherwise I don't believe graphics will be accelerated.
- andrewmackrodt 5y agoSadly no, my Ryzen doesn't have an iGPU and I only have the one dedicated GPU. VMware's software? acceleration is partially useful however, there are some bugs requiring disabling transparency in Windows but various Direct X programs run mostly acceptably. I find it the best performing of the 3 setups when using GPU passthrough is not available.
- shivak 5y agoThe first problem is rendering within the guest. If you only have one GPU, then GVT-g [1] virtualizes it with just a bit of overhead. But it's Intel only. The second problem is getting those pixels onto your screen in the host. SPICE is not as fast as Looking Glass [2], which sets up a shared memory buffer between the host and guest. This has acceptable performance even for modern games. The OP doesn't seem to utilize these techniques, so I don't think it can plausibly claim to have the fastest configuration - at least not yet. [1] https://wiki.archlinux.org/title/Intel_GVT-g https://wiki.archlinux.org/title/Intel_GVT-g [2] https://looking-glass.io https://looking-glass.io
- throwaway888abc 5y agoThanks! TIL [1,2]
- acatton 5y agoWhile I appreciate the effort, and the code is very readable. I just want to give a friendly warning that these shell scripts just download random stuff from the internet and run this random stuff without checking any integrity/signature. Apart from that, I will definitely use that project as a documentation for "how to run MacOS/Windows in KVM". Cool project :) .
- password4321 5y agoIt does check SHA256 for Ubuntu images, but nothing else I could see. https://github.com/wimpysworld/quickemu/blob/af26f41440d63a069045660fad860c797011310a/quickget#L469 https://github.com/wimpysworld/quickemu/blob/af26f41440d63a0...
- GeekyBear 5y agoIt seems to be grabbing the MacOS system recovery images straight off of Apple's servers.
- coldacid 5y agoWhich, without some form of certificate pinning, could still be MITM'd. At least if there's a catalogue of hashes for everything it downloads (hard-coded or configurable by the user, latter preferred) then at least it can verify the right files are being downloaded regardless of source.
- theknarf 5y agoWhat does this solve that isn't already solved by Vagrant?
- bravetraveler 5y agoOr even libvirt/the various virt-* utilities (eg: virt-install) I'm not against tooling like this, but as someone already pretty familiar with KVM... I think I'd be quicker with virsh as I've been operating
- yebyen 5y agoI didn't use this, but a similar/related project that is for MacOS as host OS, https://github.com/knazarov/homebrew-qemu-virgl https://github.com/knazarov/homebrew-qemu-virgl Vagrant is an orthogonal tool to this, it is a VM orchestrator not an actual VM. What does this do: well, qemu doesn't have virgl support merged yet, so you need to go to some lengths to compile it for yourself. All of the other stuff (spice, virtio) is for "it should be a nice user experience and perform well" above and beyond simply being fast enough to use. In other words, you should be able to copy and paste between the host OS and the guest. You should be able to slide your mouse across the border of the VM window and do some clicking around then simply slide it back out and use your mouse with native host-OS windows again. It should have all of the features you expect and not force you to read a bunch of tutorials to find the features you expect from your desktop VM. These things are all not granted when you use qemu out of the box. I have this intense 25-lines "qemu" script for invoking qemu-system properly. It was enlightening but I'm not sure how much I was enriched by the process of actually figuring all this out. Quickemu is, I guess, for making figuring out all this stuff and making it easier to do (and on Linux.)
- codetrotter 5y ago> I have this intense 25-lines "qemu" script for invoking qemu-system properly. It was enlightening but I'm not sure how much I was enriched by the process of actually figuring all this out. Do you have your script posted publicly somewhere?
- 5y ago
- edward 5y agoI made a spelling correction: https://github.com/wimpysworld/quickemu/pull/66 https://github.com/wimpysworld/quickemu/pull/66
- londons_explore 5y agoIt's sad that Qemu is so hard to use that scripts like this are necessary. All this autodetection of the OS to apply tweaks and workarounds to make the OS run properly should ideally be eliminated entirely, and if that really isn't possible, it should be part of Qemu itself rather than requiring a special wrapper script to apply the right flags to make things work.
- maccolgan 5y agoYou are not really supposed to run QEMU directly if you are looking for that kind of experience, that's why libvirt exists. Other than that, QEMU should really be a generic emulator rather than being infested with platform-specific stuff, everything else should be independently maintained and pluggable. (Autodetection is also extremely fragile, and takes away from keeping a VM a VM)
- londons_explore 5y agoBut it would be easy to design qemu to have 1000+ config options which are on/off/auto settings, and the 'auto' mode is autodetected based on which OS is probably running. Nothing stops someone overriding some or all of those flags to whatever values they like. It's still a power user tool, just one that also 'just works' for common usecases of people who don't want to manually set the IRQ number for the DMA controller by hand...
- q3k 5y ago> But it would be easy to design qemu to have 1000+ config options which are on/off/auto settings, and the 'auto' mode is autodetected based on which OS is probably running. That would add a ton of new responsibility to a codebase that so far has been doing none of this. It would have to be aware of different operating systems, operating system image formats for autodetection, OS releases and their corresponding quirks, ... And some way to test this, and test this automatically, so that this stuff doesn't immediately rot away. People would begin to depend on this, and any change in this behaviour would be a breaking bug, and would introduce implicit stability contracts for complex scenarios. Let qemu be low-level emulator and make zero assumptions about how it's being used - that makes life so much easier for those of us who integrate it into non-standard scenarios. Libvirt gives you everything needed for typical 'I wanna run a commercial OS in a VM on my desktop/server', and can afford to make assumptions about its usage scenario.
- trothamel 5y agoI like this. Does anyone know what how to type special keys, like ctrl-alt-delete, in qemu/quickemu?
- matja 5y agoIf QEMU is compiled with graphical window support, and is started without `-nodefaults`, then you can press ctrl-alt-2 to switch to the monitor, type "sendkey ctrl-alt-delete", then press ctrl-alt-1 to switch back to the emulated display. Common QEMU frontends may have a UI button or keyboard sequence to do this for you (they connect to the monitor backend and send the same command, either as text or as JSON (in "qmp" mode)).
- cracksfre 5y agoI really love your work it's very beneficial to many people. Your blog approach helps many people like myself. Its content is very easy to understand and helps a lot, Do visit my site for new and Updated software : <a href="https://www.cracksfre.com/freemake-video-converter-crack-latest-version/">Freemake https://www.cracksfre.com/freemake-video-converter-crack-lat... Video Converter</a>
- hda111 5y agoWhy? I’m happy with Vagrant (libvirt/VirtualBox), Multipass and LXD (also provides secreboot + UEFI VMs + USB redirection). No need for another tool.
- 0des 5y agoHave you tried Dropbox?
- moondev 5y agoCan multipass launch an accelerated virgl desktop? Vagrant depends on premade boxes normally built with packer. This tool is much more convenient
- hda111 5y agoThere is no need to reinvent packer and vagrant. This “project” would be much better when it was a collection of packer templates. I’m using several packer templates and prebuilt vagrant boxes and vagrant’s workflow is much better than this strange NIH tool.
- smusamashah 5y agoI want to run many old windows [95 - XP] applications and games. If there is a way to have minimal os emulator (at least with all dependencies of that app/game) it would be great to have it as a container for that app. I tried setting up qemu once by downloading many images. Almost none worked with apps I wanted to run. Also I had a very hard time finding a sane qemu documentation in one place. It's wiki is very messy to go through. So is there anything to run win 98 to win xp apps in emulator/sandbox/container easily?
- jdmoreira 5y agoBest I've found so far is dosbox-x at https://dosbox-x.com/ https://dosbox-x.com/
- smusamashah 5y agoIs there an easy to follow documentation for dosbox-x? And can it work with pre-built images? I have tried to use it a few times but got overwhelmed by all the options. From the screenshot it looks exactly what I want (only for windows 98 though).
- G4E 5y agoI haven't tested it yet, but I recently came across boxedwine[0] which is basically wine + an emulation of the linux syscalls + graphical api forwarded to the host. All that wrapped in SDL. [0] http://www.boxedwine.org/ http://www.boxedwine.org/
- smusamashah 5y agoFrom apps and games page it looks like it will run all apps I want. Thanks.
- alexeiz 5y agoI'm not sure how "optimized" it is. I used it to create an Ubuntu VM and it was very laggy. Keyboard, mouse response and display update was slow.
- husamia 5y agowhen "Add discrete GPU pass-through"