Page 1 of 1
Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sat Jun 08, 2024 9:43 pm
by Neo_78
I need to access a couple of Windows-based applications from time to time and was wondering if this is achievable with QEMU in FatDog on a RAM-only system using only an external USB pendrive for the Windows installation drive. So the idea is to purchase a Windows 10 or 11 license key, create a virtual system drive on a USB pendrive and use it as a VM in QEMU. So you could then plug the USB-drive in and out whenever it is required.
Has someone here tested if this is a practical idea for FatDog and what was your experience like?
I found the following guide for EasyOS:
https://www.forum.puppylinux.com/viewtopic.php?t=9028
From this guide I conclude a couple of points, but would appreciate your feedback in this regard:
- The Windows VM should be assigned 4GB of RAM.
- The Windows ISO will require around 5GB and a minimum of 11GB for the virtual HDD which I would like to create on the external USB-pendrive.
- Windows 11 seems to be difficult to install as a VM due to the TPM hardware requirement, but Windows 10 still seems to be supported until October 2025.
- Windows 10 ISO seems to be available here:
https://www.microsoft.com/en-us/softwar ... ndows10ISO
Has anyone experience with this kind of setup in FatDog?
Thanks!
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sat Jun 08, 2024 10:17 pm
by p310don
I have run Win10 off of an external usb hard drive in Fatdog via virtualbox. It is definitely do-able. Not sure how Win11 goes
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 12:53 am
by Neo_78
Isn't Virtualbox more resource-intensive than QEMU?
The other problem I see is the Windows license. I think you can purchase OEM license keys online. If you activate these keys for a new VM, will that license key not be associated with this specific virtual system ID?
Let's say you delete the VM in order to create a new one, will your Windows license still be usable to activate the new VM? Because the system ID of the new VM will be different now... Has anyone tested this?
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 3:40 am
by p310don
Win10 can be downloaded from Microsoft and used without paying for a license. The only restriction is that you cannot customise the desktop. Whether you care about that or not is up to you.
If you install to one VM on a paid license, I'd assume you'd have a hard time moving it in future.
You can (should be able to) run a VM on different host if the settings are identical.
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 6:10 am
by jamesbond
- xscreenshot-20240609T160705.png (82.77 KiB) Viewed 1260 times
- xscreenshot-20240609T160751.png (81.06 KiB) Viewed 1260 times
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 8:16 am
by p310don
@jamesbond Win98 is stretching things back a bit. Wouldn't most things that run in Win98 also just run in DosBox?
@Neo_78 if you only need to run Windows things every now and again, it might be worth downloading one of these when needed:
https://developer.microsoft.com/en-us/w ... -machines/
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 9:41 am
by jamesbond
p310don wrote: Sun Jun 09, 2024 8:16 am
@jamesbond Win98 is stretching things back a bit.
Let's stretch it further, shall we?
- xscreenshot-20240609T193656.png (23.09 KiB) Viewed 1244 times
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 1:31 pm
by Neo_78
@jamesbond I actually used DosBox in FatDog to run some old DOS Games from my childhood, which worked well. However, they recommend to run DosBox within a sandbox and so far I have not found a convient sandbox approach to isolate applications without a crazy amount of configuration, e.g. bubblewrap. Firejail is easy to use but would not run in FatDog due to the AppArmor kernel requirement. Do you use a FatDog VM in QEMU on top of FatDog as your "sandbox" for DosBox?
@p310don I actually don't need to customize the desktop so if you are saying that Windows 10 can be used legally with restrictions without having to pay a license, even better.
I am not sure if QEMU has a snapshot feature like VirtualBox?
So you install Windows, install the software you need and create a snapshot of the system state, to which you can roll back every time you need to boot up Windows.
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 2:05 pm
by rockedge
I am not sure if QEMU has a snapshot feature like VirtualBox?
You can. I use AQEMU
front end which makes using a snapshot fairly straight forward. Also the manual method is available:
Create_a_snapshot in a QEMU virtual machine
Another method is using qemu-img
which looks like I need to work more with:
Example:
Code: Select all
$ qemu-img snapshot -l myamazingqemuvm.qcow2
$ qemu-img snapshot -c testing myamazingqemuvm.qcow2
$ qemu-img snapshot -l myamazingqemuvm.qcow2
Snapshot list:
ID TAG VM SIZE DATE VM CLOCK ICOUNT
1 testing 0 B 2023-05-21 00:57:50 00:00:00.000 0
$ qemu-img snapshot -d testing myamazingqemuvm.qcow2
$ qemu-img snapshot -l myamazingqemuvm.qcow2
$
To create a snapshot, qemu-img requires a write lock on the file, meaning it will only work for offline VMs.
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 6:19 pm
by Neo_78
Thanks for your feedback @rockedge
Are you referring to the following GUI for QEMU?
https://github.com/tobimensch/aqemu
So you are basically saying that when you take the snapshot manually from the terminal, the VM would have to be switched off at that moment?
In the EasyOS guide that I inititally referenced, you have to initially create a virtual system drive for your Windows VM, which I would like to create on the external USB-pendrive:
qemu-img create -f qcow2 winvirtualdisk.qcow2 20G
https://www.forum.puppylinux.com/viewtopic.php?t=9028
So you can create a snapshot of exactly that drive that already has been created, correct?
Using the QEMU docs that you referenced, something like:
qemu-img create -f qcow2 -b winvirtualdisk.img -F qcow2 snapshot.img
Is that correct?
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Sun Jun 09, 2024 7:15 pm
by rockedge
Yes that is the one I use.
Looks okay. But trying it out will tell.
Don't know if you need it so here are the steps I use to mount qcow2 .img files:
Step 1 - Enable NBD on the Host
Step 2 - Connect the QCOW2 as network block device
Code: Select all
qemu-nbd --connect=/dev/nbd0 /var/lib/vz/images/100/vm-100-disk-1.qcow2
Step 3 - Find The Virtual Machine Partitions
Step 4 - Mount the partition from the VM
Step 5 - After you done, unmount and disconnect
Code: Select all
umount /mnt/somepoint/
qemu-nbd --disconnect /dev/nbd0
rmmod nbd
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Mon Jun 10, 2024 1:49 pm
by libertas
Hi @Neo_78,
Some years ago, some user describe a way to to deal with qemu images that may be of interest to you.
https://www.linuxquestions.org/question ... 's-850038/
A read-only qemu image for the base install customized with programs and a running image that can be regenerated.
Any work can be saved in a networked file system.
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Tue Jun 11, 2024 10:10 pm
by Neo_78
A local PXE boot server (unbreakable).
+
A network partition with read-only qemu-kvm images on it (unbreakable).
Users create relative images and work on it (they can break, it, but you can regenerate the relative image in 1 second).
+
A network storage for the qemu users to save on it (never use a VM for storage).
That's what i made @ work and i can tell you i have a system that beats any 10000$ proprietary solution out there.
And it's far simpler ^^.
You can use sshfs instead of nfs. You can also use a VPN, etc...
So you are suggesting to run FatDog as a PXE boot server with a network partition containing read-only QEMU-KVM images of different operating sysyems @libertas ?
Do we have a guide for that and what hardware would typically be involved?
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Wed Jun 12, 2024 7:06 am
by Clarity
@Neo_78 if you are seeking a PXE solution, the simplest solution is the Ventoy PXE solution. Using it, FATDOG (FD) is the ONLY forum distro that behaves to PXE boot a LAN connected PC to a FD desktop.
Its a one-step solution.
Re: Running a QEMU Windows VM in FatDog RAM-Only?
Posted: Wed Jun 12, 2024 7:55 pm
by libertas
Neo_78 wrote: Tue Jun 11, 2024 10:10 pm
A local PXE boot server (unbreakable).
+
A network partition with read-only qemu-kvm images on it (unbreakable).
Users create relative images and work on it (they can break, it, but you can regenerate the relative image in 1 second).
+
A network storage for the qemu users to save on it (never use a VM for storage).
That's what i made @ work and i can tell you i have a system that beats any 10000$ proprietary solution out there.
And it's far simpler ^^.
You can use sshfs instead of nfs. You can also use a VPN, etc...
So you are suggesting to run FatDog as a PXE boot server with a network partition containing read-only QEMU-KVM images of different operating sysyems @libertas ?
Do we have a guide for that and what hardware would typically be involved?
That suggestion I mentioned tells about a PXE boot server, but for your use case (to boot Windows from a qemu img on a read only USB stick) it seemed to me that the suggestion to have a read-only qemu img disk with Windows could fit.
And additional changes could be made to another image file.
The PXE suggestion is not what I was suggesting.