Run QEMU as an Appimage in BookwormPup64

Moderator: Forum moderators

Post Reply
Geek3579
Posts: 248
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 62 times

Run QEMU as an Appimage in BookwormPup64

Post by Geek3579 »

QEMU run as an Appimage in BookwormPup64 and others

A requirement for me to use BookwormPup64 for a daily driver is the functionality of QEMU. If somebody on the Forum would be able to compile this that would be great, but in the meantime I looked for other options. (compiling did not work...I’m not surprised with my skill level)

However, I came across this QEMU Appimage at https://github.com/lucasmz1/Qemu_Appimage.
There are two variants available, and without exhaustive testing, they both seem to work in BookwormPup64, as well as Fossapup64, Debian Dog and Quickpup64.
It does not run without error in S15pup for some reason, thus far.

To use the Appimge, download and change the permissions to executable. Lets say its called QEMU-x86_64.AppImage. For convenience, place in a new directory (say, QEMU). Open a terminal in that directory.

If you wish to use a virtual HDD, say to install the ISO, create a compressed qcow2 virtual HD drive in that folder: ./QEMU-x86_64.AppImage qemu-img create -f qcow2 VirtualHDD.img 30G

Copy the target ISO eg myiso.iso to the QEMU directory. I am assuming it is a 64 bit ISO.

Add this shell script to a text file using Geany and save in the same directory:
Make sure that the shell script is marked as executable.
#!/bin/sh
modprobe kvm-intel # start KVM on an intel device
./QEMU-x86_64.AppImage qemu-system-x86_64 -enable-kvm -cpu host -smp 2 \
-m 4G -boot d -cdrom myiso.iso -hda VirtualHDD.img \
-cpu host -vga std -usb -device usb-tablet -soundhw ac97
bash # this may keep the terminal open if there is an error

There should now be three files in the QEMU directory. Exactly how to run the executable file will depend on the filemanger. In any case run the script in a terminal to test it..

Once running use Geany in the virtual OS to add a partition table to the VirtualHDD and then format it to say, vfat32. Then install the OS as required on the HDD. The installed image can then be booted by changing the script from -boot d to -boot a.

I welcome others’ feedback on their experiences using this method.

Addenda:

a) If you are using an AMD computer, the second line must be modprobe kvm-amd.

b) In one case the Appimage did not run unless all spaces were removed from the appimage folder path. No idea why.

c) There is no need to cater for EFI booting unless the resulting image is designed to be burnt to a USB or HDD and booted independently.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

Hello Dear user, hope you enjoy my qemu appimage!

please share to all of your freinds if you need another build I can provide.

ass.: lucasmz1

Clarity
Posts: 3318
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1370 times
Been thanked: 442 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by Clarity »

lucasmz1 wrote: Thu Dec 21, 2023 12:05 am

... if you need another build I can provide.

Just a couple of comments that you might find useful for your next build:

  1. The latest version of QEMU, v8.2, is now available here.

  2. AND, instead of having to look up the correct mod-probe to use on your PC, no matter if Intel or if AMD, use this Puppy Linux exclusive for QEMU users to do that for you by @norgo . This tiny utility SHOULD be included in all QEMU packages provided for forum distros for its automation of testing and turning the KVM ability 'on' within the running system.

Hope this is helpful

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

well the mode probe you sent a link is not working the code page is missing, if you mind to give another link I'll be glad to pack it for you.

sonny
Posts: 579
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 441 times
Been thanked: 137 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by sonny »

lucasmz1 wrote: Thu Dec 21, 2023 12:05 am

Hello Dear user, hope you enjoy my qemu appimage!

please share to all of your freinds if you need another build I can provide.

ass.: lucasmz1

Wonderful builds!
Please keep it up, Luc.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

thank you! dear friend I've made a qemu build from the latest version avaible 8.2.0 using junest, but it's quiet big than the others, would you like guys for testing it?

sonny
Posts: 579
Joined: Mon Feb 15, 2021 4:50 pm
Has thanked: 441 times
Been thanked: 137 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by sonny »

lucasmz1 wrote: Sun Dec 31, 2023 6:23 pm

thank you! dear friend I've made a qemu build from the latest version avaible 8.2.0 using junest, but it's quiet big than the others, would you like guys for testing it?

Most certainly!

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

It's available in my repository now enjoy!

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

by the way, if you need something you can find me on telegram by the name of @zainotel, you just need to say that you found me in PuppyLinux forum. thank you all of you!

Geek3579
Posts: 248
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 62 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by Geek3579 »

I tried the vs 8 Appimage in both BookwormPup64 and Fossapup64.

In both cases I got this error message:

You cannot access with root privileges. Use --groot option instead.
/initrd/mnt/tmpfs/tmp/.mount_QEMU-8drZWOa/junest/lib/core/wrappers.sh: line 30: /initrd/mnt/tmpfs/tmp/.mount_QEMU-8drZWOa/.junest/usr/bin/junest_wrapper: Read-only file system

Any suggestions ? (I have no idea how one might use --groot ?? )

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

try to unpack the appimage and use the -f option into the apprun, before the bind section. I'll download the fossapup to see what went wront. wait for my answer.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

Geek3579 wrote: Wed Jan 03, 2024 10:33 am

I tried the vs 8 Appimage in both BookwormPup64 and Fossapup64.

In both cases I got this error message:

You cannot access with root privileges. Use --groot option instead.
/initrd/mnt/tmpfs/tmp/.mount_QEMU-8drZWOa/junest/lib/core/wrappers.sh: line 30: /initrd/mnt/tmpfs/tmp/.mount_QEMU-8drZWOa/.junest/usr/bin/junest_wrapper: Read-only file system

Any suggestions ? (I have no idea how one might use --groot ?? )

don't worry I'll try to fix it... I'm testing a new package management system.

to be faster for you unpack the appimage with ./my_appimage --appimage-extract and modify the AppRun file adding the option -f in the proot line after the proot option in $HERE/junest/bin/junest proot -f -n -b it should look like this, if you are in a hurry otherwise wait for my change in the github, I belive this is the fix for this problem.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

friends I'm trying to fix that problem you have informed, but no success. I have other builds of qemu but it's old builds that I have built using old linux distros for better compatibilty in newer systems, it was build using pkg2appimage if you have interest on it just tell me I can upload for you.

Geek3579
Posts: 248
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 62 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by Geek3579 »

lucasmz1 wrote: Wed Jan 03, 2024 4:17 pm
Geek3579 wrote: Wed Jan 03, 2024 10:33 am

I tried the vs 8 Appimage in both BookwormPup64 and Fossapup64.

In both cases I got this error message:

You cannot access with root privileges. Use --groot option instead.
/initrd/mnt/tmpfs/tmp/.mount_QEMU-8drZWOa/junest/lib/core/wrappers.sh: line 30: /initrd/mnt/tmpfs/tmp/.mount_QEMU-8drZWOa/.junest/usr/bin/junest_wrapper: Read-only file system

Any suggestions ? (I have no idea how one might use --groot ?? )

don't worry I'll try to fix it... I'm testing a new package management system.

to be faster for you unpack the appimage with ./my_appimage --appimage-extract and modify the AppRun file adding the option -f in the proot line after the proot option in $HERE/junest/bin/junest proot -f -n -b it should look like this, if you are in a hurry otherwise wait for my change in the github, I belive this is the fix for this problem.

I tried to unpack the appimage using your suggested command in Bookworm64 but there was an error. I am happy to wait for another solution.

User avatar
Sofiya
Posts: 1824
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1210 times
Been thanked: 1090 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by Sofiya »

QEMU-BookwormPup64 :thumbup: Thanks @lucasmz1 for the AppImage !!!

Code: Select all

#!/bin/sh
modprobe kvm-amd # modprobe kvm-intel  -  start KVM on an intel device
/mnt/home/2-QEMU/QEMU-2.5.0-ubu16.04.AppImage qemu-system-x86_64 -enable-kvm -cpu host -smp 2 \
-m 4G -boot d -cdrom /root/Downloads/KLV-Airedale-sr8.iso -hda /mnt/home/2-QEMU/VirtualHDD.img \
-cpu host -vga std -usb -device usb-tablet -soundhw ac97
Attachments
Снимок экрана.png
Снимок экрана.png (283.41 KiB) Viewed 679 times

Vanilla Dpup 9.2.X - KLV-Airedale - KLA-OT2
PUPPY LINUX Simple fast free

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

dear friends I've tried everything but no success. I guess for now we may stick with ordinary builds made by pkg2appimage using old linux distros. Junest is not a bad idea but needs to maturate a bit. I've find out that junest is not good enough to run on systems that uses root directly like puppy linux does, I've installed fossa puppy in my machine for testing this appimages built on top of junest.
I am able to accept ideas if anyone find out a solution contact me.
I'll be uploading other builds of qemu I've made before to github.
thanks for your patience.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

Hello friends again, I have uploaded all the builds I've made of qemu, from ubuntu 14.04 til 22.04 https://github.com/lucasmz1/Qemu_Appima ... re-Release
pealse enjoy, if you need something just tell me.

Geek3579
Posts: 248
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 62 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by Geek3579 »

lucasmz1 wrote: Fri Jan 05, 2024 2:43 pm

Hello friends again, I have uploaded all the builds I've made of qemu, from ubuntu 14.04 til 22.04 https://github.com/lucasmz1/Qemu_Appima ... re-Release
pealse enjoy, if you need something just tell me.

Thanks for this. QEMU-x86_64-6.2.0-ubu22.04.AppImage seems to work well in Bookwormpup64.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

your welcome, hope I could help more.

lucasmz1
Posts: 12
Joined: Thu Dec 21, 2023 12:02 am
Has thanked: 1 time
Been thanked: 13 times

Re: Run QEMU as an Appimage in BookwormPup64

Post by lucasmz1 »

hello friends I've made a new appimage using the git version of qemu it's the latest version from the source code built against ubuntu 20.04, still having some things to be done but the network is working.
I need ideas of how to enable audio on the host os. please if you download it read it the readme file for new instructions.
hope you enjoy!

Post Reply

Return to “BookwormPup”