Qemu: Difference between revisions

From Braindump
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<nowiki>https://youtu.be/AAfFewePE7c</nowiki>
https://youtu.be/AAfFewePE7c


<nowiki>https://denshi.org</nowiki>
https://denshi.org


qemu-img create -f qcow2 Image.img 10G
qemu-img create -f qcow2 Image.img 10G
qemu-system-x86_64 -enable-kvm -cdrom OS_ISO.iso -boot menu=on -drive file=Image.img -m 2G
qemu-system-x86_64 -nographic -kernel bzImage -initrd init.cpio -append "console=ttyS0"


qemu-system-x86_64 -enable-kvm -cdrom OS_ISO.iso -boot menu=on -drive file=Image.img -m 2G
-enable-kvm enables KVM,
 
-cdrom selects an iso to load as a cd
-enable-kvm enables KVM,
-boot menu=on enables a boot menu
 
-drive file= selects a file for the drive
-cdrom selects an iso to load as a cd
-m sets the amount of dedicated RAM)
 
-boot menu=on enables a boot menu
 
-drive file= selects a file for the drive
 
-m sets the amount of dedicated RAM)


Ctrl + Alt + G to exit capture
Ctrl + Alt + G to exit capture
Line 21: Line 17:
Ctrl + Alt + F to fullscreen!
Ctrl + Alt + F to fullscreen!


-cpu host (sets the CPU to the hosts' CPU)
-cpu host (sets the CPU to the hosts' CPU)
 
-smp 2 (sets the numbers of cores)
-smp 2 (sets the numbers of cores)
-vga qxl
-vga virtio -display sdl,gl=on


-vga qxl
https://qemu-project.gitlab.io/qemu/system/invocation.html#hxtool-6


-vga virtio -display sdl,gl=on
qemu-system-x86_64 -serial mon:stdio -nographic
 
 
<nowiki>https://qemu-project.gitlab.io/qemu/system/invocation.html#hxtool-6</nowiki>
 
qemu-system-x86_64 -serial mon:stdio -nographic


CTRL-A X
CTRL-A X


<nowiki>https://superuser.com/questions/1795299/what-is-the-proper-way-to-use-qemus-socket-feature</nowiki>
https://superuser.com/questions/1795299/what-is-the-proper-way-to-use-qemus-socket-feature
 
qemu-system-x86_64 -nographic \
 
-device isa-debugcon,chardev=debugsock -chardev socket,id=debugsock,path=/tmp/qemu.sock,server=on,wait=off \


-monitor unix:monitor.sock,server=on,wait=off \
qemu-system-x86_64 -nographic \
-device isa-debugcon,chardev=debugsock -chardev socket,id=debugsock,path=/tmp/qemu.sock,server=on,wait=off \
-monitor unix:monitor.sock,server=on,wait=off \
-serial mon:stdio


-serial mon:stdio
nc -U monitor.sock
 
socat -,raw,echo=0 UNIX-CONNECT:monitor.sock
 
nc -U monitor.sock
 
socat -,raw,echo=0 UNIX-CONNECT:monitor.sock


bios.img (0x003ffff0)
bios.img (0x003ffff0)
Line 55: Line 42:
wa "mov al, 0x48" "out 0xe9, al" "mov al, 0x69" "out 0xe9, al" "hlt"
wa "mov al, 0x48" "out 0xe9, al" "mov al, 0x69" "out 0xe9, al" "hlt"


qemu-system-x86_64 -bios bios.img -nographic \
qemu-system-x86_64 -bios bios.img -nographic \
 
-device isa-debugcon,chardev=debugsock -chardev socket,id=debugsock,path=/tmp/qemu.sock,server=on,wait=off \
-device isa-debugcon,chardev=debugsock -chardev socket,id=debugsock,path=/tmp/qemu.sock,server=on,wait=off \
-monitor unix:monitor.sock,server=on,wait=off \
 
-serial mon:stdio
-monitor unix:monitor.sock,server=on,wait=off \
 
-serial mon:stdio
 
<nowiki>https://doc.coreboot.org/tutorial/part1.html</nowiki>
 
qemu-system-aarch64 -cpu cortex-a55 -nographic   -machine virt,virtualization=on,gic-version=3   -chardev stdio,id=con,mux=on -serial chardev:con   -global virtio-mmio.force-legacy=false   -device virtio-^Crial-device,bus=virtio-mmio-bus.0   -chardev socket,telnet=on,host=127.0
 
.0.1,port=3450,server=on,wait=off,id=foo   -device virtconsole,chardev=foo   -device virtio-rng-device,bus=virtio-mmio-bus.1   -netdev user,id=u1,hostfwd


=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001   -device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.2   -drive file=./
https://doc.coreboot.org/tutorial/part1.html


mydisk-1gb.img,if=none,format=raw,id=hd   -device virtio-blk-device,bus=virtio-mmio-bus.3,drive=hd   -mon chardev=con,mode=readline -kernel ./build/nuttx
qemu-system-aarch64 -cpu cortex-a55 -nographic   -machine virt,virtualization=on,gic-version=3 -chardev stdio,id=con,mux=on -serial chardev:con   -global virtio-mmio.force-legacy=false   -device virtio-^Crial-device,bus=virtio-mmio-bus.0 -chardev socket,telnet=on,host=127.0.0.1,port=3450,server=on,wait=off,id=foo   -device virtconsole,chardev=foo   -device virtio-rng-device,bus=virtio-mmio-bus.1 -netdev user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001   -device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.2   -drive file=./mydisk-1gb.img,if=none,format=raw,id=hd   -device virtio-blk-device,bus=virtio-mmio-bus.3,drive=hd   -mon chardev=con,mode=readline -kernel ./build/nuttx

Latest revision as of 13:43, 23 September 2025

https://youtu.be/AAfFewePE7c

https://denshi.org

qemu-img create -f qcow2 Image.img 10G
qemu-system-x86_64 -enable-kvm -cdrom OS_ISO.iso -boot menu=on -drive file=Image.img -m 2G
qemu-system-x86_64 -nographic -kernel bzImage -initrd init.cpio -append "console=ttyS0"
-enable-kvm enables KVM,
-cdrom selects an iso to load as a cd
-boot menu=on enables a boot menu
-drive file= selects a file for the drive
-m sets the amount of dedicated RAM)

Ctrl + Alt + G to exit capture

Ctrl + Alt + F to fullscreen!

-cpu host (sets the CPU to the hosts' CPU)
-smp 2 (sets the numbers of cores)
-vga qxl
-vga virtio -display sdl,gl=on

https://qemu-project.gitlab.io/qemu/system/invocation.html#hxtool-6

qemu-system-x86_64 -serial mon:stdio -nographic

CTRL-A X

https://superuser.com/questions/1795299/what-is-the-proper-way-to-use-qemus-socket-feature

qemu-system-x86_64 -nographic \
-device isa-debugcon,chardev=debugsock -chardev socket,id=debugsock,path=/tmp/qemu.sock,server=on,wait=off \
-monitor unix:monitor.sock,server=on,wait=off \
-serial mon:stdio
nc -U monitor.sock
socat -,raw,echo=0 UNIX-CONNECT:monitor.sock

bios.img (0x003ffff0)

wa "mov al, 0x48" "out 0xe9, al" "mov al, 0x69" "out 0xe9, al" "hlt"

qemu-system-x86_64 -bios bios.img -nographic \
-device isa-debugcon,chardev=debugsock -chardev socket,id=debugsock,path=/tmp/qemu.sock,server=on,wait=off \
-monitor unix:monitor.sock,server=on,wait=off \
-serial mon:stdio

https://doc.coreboot.org/tutorial/part1.html

qemu-system-aarch64 -cpu cortex-a55 -nographic   -machine virt,virtualization=on,gic-version=3 -chardev stdio,id=con,mux=on -serial chardev:con   -global virtio-mmio.force-legacy=false   -device virtio-^Crial-device,bus=virtio-mmio-bus.0 -chardev socket,telnet=on,host=127.0.0.1,port=3450,server=on,wait=off,id=foo   -device virtconsole,chardev=foo   -device virtio-rng-device,bus=virtio-mmio-bus.1 -netdev user,id=u1,hostfwd=tcp:127.0.0.1:10023-10.0.2.15:23,hostfwd=tcp:127.0.0.1:15001-10.0.2.15:5001   -device virtio-net-device,netdev=u1,bus=virtio-mmio-bus.2   -drive file=./mydisk-1gb.img,if=none,format=raw,id=hd   -device virtio-blk-device,bus=virtio-mmio-bus.3,drive=hd   -mon chardev=con,mode=readline -kernel ./build/nuttx