Skip to content
Snippets Groups Projects
Commit d67fcb5c authored by Timmy Chan's avatar Timmy Chan
Browse files

Add booting with qemu

parent 4b81e927
No related branches found
No related tags found
1 merge request!5Feat/cve linux kernel
......@@ -68,7 +68,7 @@ def main(*args):
copy_kernel_to_vm_directory(vm_directory)
verbose_log("Running with QEMU")
# TODO: Run qemu
boot_with_qemu()
sys.exit()
......@@ -143,10 +143,14 @@ def copy_kernel_to_vm_directory(vm_directory):
def boot_with_qemu():
command = """qemu-system-x86_64 \
-kernel bzImage \
-hda disk.img \
-append "root=/dev/sda rw biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0" \
-nographic \
-m 512 \
-append "root=/dev/sda rw biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200 earlyprintk=ttyS0,115200 consoleblank=0" \
-hda disk.img \
-device rtl8139,netdev=net00 \
-netdev type=user,id=net00 \
-net nic \
-net user,hostfwd=tcp:127.0.0.1:59355-:22 \
;"""
subprocess.run(command, shell=True)
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment