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

[Question]: tutorial for *.img.gz #552

Open
2 tasks done
EinFreierUser opened this issue Jun 10, 2024 · 9 comments
Open
2 tasks done

[Question]: tutorial for *.img.gz #552

EinFreierUser opened this issue Jun 10, 2024 · 9 comments
Labels
question Further information is requested

Comments

@EinFreierUser
Copy link

Is your question not already answered in the FAQ?

  • I made sure the question is not listed in the FAQ.

Is this a general question and not a technical issue?

  • I am sure my question is not about a technical issue.

Question

Hello, i like the idea of the qemu in a docker. But its different for a beginner like me compared to the native qemu. My goal is to run things like Libre Elec in it (images like *img.gz, that arent *.iso). I get it running in the native qemu by converting it into qcow2, but in your version it starts booting only to a certain point and then gets stuck. Perhaps u can add a few steps and cli-commands in your description, how to get such an image running?

Thank you and keep up the great work

@EinFreierUser EinFreierUser added the question Further information is requested label Jun 10, 2024
@kroese
Copy link
Collaborator

kroese commented Jun 10, 2024

Thanks. The container is more based on the assumption that you have a CD-ROM ISO to install from, instead of a pre-made disk IMG.

However, it should be possible by extracting the *.img.gz to a file called data.img which you place in the /storage folder, and then making the BOOT variable empty.

That way it should work, but if you have a download link to the file, I can see if I can make this process easier (automatic).

@EinFreierUser
Copy link
Author

Thanks, I will give it a try.

That would be even easier. The link for this example is
https://releases.libreelec.tv/LibreELEC-Generic.x86_64-12.0.0.img.gz

@kroese
Copy link
Collaborator

kroese commented Jun 12, 2024

@EinFreierUser I created a new version (v5.15) now, that supports images like *.img.gz now, and if I set:

environment: 
  BOOT: "https://releases.libreelec.tv/LibreELEC-Generic.x86_64-12.0.0.img.gz"

it seems to work fine. Please try it out!

@EinFreierUser
Copy link
Author

hey, i downloaded the new version and typed

docker run -it --rm -e "BOOT="https://releases.libreelec.tv/LibreELEC-Generic.x86_64-12.0.0.img.gz -p 8006:8006 --device=/dev/kvm --cap-add NET_ADMIN qemux/qemu-docker

and it started up! Only Problem is that it cant install because of a missing hdd... i read ur advice to change it into blk when this problem comes up... but im stuck at looking for the right command... compose is sadly no option for me... is there a list with the commands i can use?

@kroese
Copy link
Collaborator

kroese commented Jun 13, 2024

-e "DISK_TYPE=ide"

@EinFreierUser
Copy link
Author

right code, but dont solve the problem... with qemu it worked with

qemu-system-x86_64 -enable-kvm -cpu host -machine q35 -device amd-iommu -m 4096 -smp 4 -device virtio-vga-gl -display sdl,gl=on -device intel-hda -device hda-duplex -device virtio-serial -chardev spicevmc,id=vdagent,debug=0,name=vdagent -device virtserialport,chardev=vdagent,name=com.redhat.spice.0 -hda /home/x/vmplatten/LibreELEC-Generic.x86_64-12.0.0.qcow2 -name "LibElec"

i dont unterstand the whole lines and its copied somewhere and modified a little bit for this, but it runs... if i need all the parameters, i dont know, but if it is starting up, i will see how it will perform :D

@kroese
Copy link
Collaborator

kroese commented Jun 13, 2024

@EinFreierUser Ow nevermind, the reason was very simple.

When booting via a .qcow2 it replaces the hard disk that it normally creates when booting via cd-rom. My assumption was that as you already have a harddrive (the .qcow2 file) you dont need a second one.

But with the LibreElec file it is not a ready-installed OS, but an installer. So you need to add a second harddrive even though you already have one.

I created a new version (v5.16) which fixes this, please try it out.

@EinFreierUser
Copy link
Author

hey, the v5.16 works like a charm, many thanks. The disk is found. Its still not booting up completely, but i think, there is something different missing like 3D accelleration or similar. I'll try to solve it with compose... is there a list with the whole commands to make a bash script (*.sh)? seems not to be equal to the original qemu commands

@kroese
Copy link
Collaborator

kroese commented Jun 15, 2024

If you set -e "DEBUG=Y" it will print out the generated QEMU commandline. If you set -e "ARGUMENTS=" you can add extra commands to that line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants