OSDev.org
https://forum.osdev.org/

Reading an ISO file for virtualization
https://forum.osdev.org/viewtopic.php?f=1&t=33183
Page 1 of 1

Author:  CRoemheld [ Wed Sep 12, 2018 9:38 am ]
Post subject:  Reading an ISO file for virtualization

Hello,

is it possible to read an ISO image in memory just like an elf file in regard to finding its entry point or start address? I just finished setting up VMX on my OS and I also successfully entered the guest by setting the GUEST_RIP field in my VMCS to a dummy function. However, I wanted to try it on a real guest OS, e.g. a linux image. For that to work, I would need to load an ISO image into memory and try to get its entry point.

But this would only work if an ISO image has got the same structure as an elf, which is obviously doesn't.

I hope you can help me understand how to achieve this, maybe in connection to the ISO9660 article on OSDev.

Author:  thomtl [ Wed Sep 12, 2018 10:46 am ]
Post subject:  Re: Reading an ISO file for virtualization

An ISO file is a filesystem so first you would need to create an ISO9660 driver to extract the file that needs to be virtualized, and then when you have the file in memory you can have the ELF loader load the file and then you can use VMX to run the file. Please do note that to run the Linux kernel a lot more infrastructure needs to be in place and you should probably just port qemu or bochs.
-thomtl

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/