QEMU: Difference between revisions
import>User3412 No edit summary |
m 13 revisions imported |
||
(7 intermediate revisions by one other user not shown) | |||
Line 7: | Line 7: | ||
And if you use the windows version. Then you love data snooping | And if you use the windows version. Then you love data snooping | ||
==How to QEMU yourself?== | ==How to QEMU yourself?== | ||
RTFM! or [ | 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 | 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 - | <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) |