This wiki has been permanently archived. As such, editing and registration have been closed.

QEMU: Difference between revisions

From CollabVM Wiki, the horrible, autism-inducing, trash filled wiki, featuring people who can't speak English
Jump to navigation Jump to search
import>User3412
Powered by VirtIO/libvirt™
m 13 revisions imported
 
(5 intermediate revisions by one other user not shown)
Line 9: Line 9:
RTFM! or [https://www.qemu.org/docs/master/ RTD]! If you don't want to RTFM/RTD, then look at this guide <br>
RTFM! or [https://www.qemu.org/docs/master/ RTD]! If you don't want to RTFM/RTD, then look at this guide <br>
===The guide===
===The guide===
QEMU has no GUI, but what if you want to use the command-line? Then this is for you! <br>
QEMU has no virtual machine manager (but virt-manager and GNOME boxes are good ones), but what if you want to use the command-line? Then this is for you! <br>
QEMU has many arguments, but here's a basic example of usage of the AMD64 softmmu (targeted for modern QEMU and modern linux)<nowiki>:</nowiki> <br>
QEMU has many arguments, but here's a basic example of usage of the AMD64 softmmu (targeted for modern QEMU and modern linux)<nowiki>:</nowiki> <br>
<code>qemu-system-x86_64 -hda alpine.qcow2 -cdrom alpine.iso -vga virtio -boot cd -usb -device usb-tablet -display gtk -nic user,model=virtio</code> <br>
<code>qemu-system-x86_64 -M pc -cdrom .\alpine.iso -boot cd -drive if=virtio,file=alpine.qcow2 -m 1G -accel tcg -device virtio-vga,edid=on,xres=800,yres=600 -usb -device usb-tablet -net user,hostfwd=tcp::8022-:22 -net nic,model=e1000</code> <br>
You need to create the disk image using the following command<nowiki>:</nowiki> <br>
You need to create the disk image using the following command<nowiki>:</nowiki> <br>
<code>qemu-img create -f qcow2 alpine.qcow2 30G</code> <br>
<code>qemu-img create -f qcow2 alpine.qcow2 30G</code> <br>
After that, download alpine linux [https://alpinelinux.org/downloads/ here]. Choose the Standard or Virtual variant, and choose x86_64. After downloading the image, rename it to "alpine.iso" <br>
After that, download alpine linux [https://alpinelinux.org/downloads/ here]. Choose the Standard or Virtual variant, and choose x86_64. After downloading the image, rename it to "alpine.iso" <br>
After that, just run QEMU, using the command-line arguments from the command-line example from above <br>
After that, just run QEMU, using the command-line arguments from the command-line example from above. Use openssh or dropbear as the ssh server <br>
After installing alpine linux, you're done! No KVM was needed!
After installing alpine linux, you're done! No KVM was needed! To connect to the shell from ssh, run <code>ssh root@localhost -p 8022</code> or <code>ssh user@localhost -p 8022</code> on the host system (the second ssh command example requires a user with the name of <code>user</code>, and the first ssh command example requires running <code>setup-alpine</code> again, and saying "yes" when it asks to allow root login)

Latest revision as of 23:54, 19 December 2024

This article contains true information.

This means that the creator of this article is not bullshitting.

The best generic virtualizer and/or emulator ever Template:Disputed

If you deny it. then you are a consumertard and you are making bullshit

And if you use the windows version. Then you love data snooping

How to QEMU yourself?

RTFM! or RTD! If you don't want to RTFM/RTD, then look at this guide

The guide

QEMU has no virtual machine manager (but virt-manager and GNOME boxes are good ones), but what if you want to use the command-line? Then this is for you!
QEMU has many arguments, but here's a basic example of usage of the AMD64 softmmu (targeted for modern QEMU and modern linux):
qemu-system-x86_64 -M pc -cdrom .\alpine.iso -boot cd -drive if=virtio,file=alpine.qcow2 -m 1G -accel tcg -device virtio-vga,edid=on,xres=800,yres=600 -usb -device usb-tablet -net user,hostfwd=tcp::8022-:22 -net nic,model=e1000
You need to create the disk image using the following command:
qemu-img create -f qcow2 alpine.qcow2 30G
After that, download alpine linux here. Choose the Standard or Virtual variant, and choose x86_64. After downloading the image, rename it to "alpine.iso"
After that, just run QEMU, using the command-line arguments from the command-line example from above. Use openssh or dropbear as the ssh server
After installing alpine linux, you're done! No KVM was needed! To connect to the shell from ssh, run ssh root@localhost -p 8022 or ssh user@localhost -p 8022 on the host system (the second ssh command example requires a user with the name of user, and the first ssh command example requires running setup-alpine again, and saying "yes" when it asks to allow root login)