Page 1 of 1

How to let a guest start from CDRom?

Posted: Tue Feb 17, 2015 1:57 pm
by Mackerel
Hi guys,

I have a simple question (I guess). I have my own hypervisor that kicks of my kernel via my ELF loader (the ELF file resides in a ramdisk). This works quite well and is hassle free.

Now I am thinking of expanding this scenario and let the guest boot via CD. Does anybody have leads as to how i would do so? My hypervisor so far sets up most of the real mode stuff for the guest. I can also start a guest in unrestricted guest mode (through which I successfully boot NetBSD these days). I am new to IO interaction (hard disks/cdroms) so I am kind of lost here.

Thanks!

Re: How to let a guest start from CDRom?

Posted: Tue Feb 17, 2015 3:55 pm
by SpyderTL
When you say "I have my own hypervisor", do you mean you wrote your own hypervisor, from scratch, or you have installed a hypervisor?

Re: How to let a guest start from CDRom?

Posted: Wed Feb 18, 2015 9:07 am
by Mackerel
I mean that I wrote my own minimalist hypervisor.

Re: How to let a guest start from CDRom?

Posted: Wed Feb 18, 2015 10:48 am
by Combuster
Then you'll have to complete a few things, roughly in this order:

1) Parse the CD image according to the El-Torito standard to get the boot image, and put it in the VM's RAM instead of loading and ELF.
2) Implement support for the BIOS interrupts to redirect to the CD (or the disk image to emulate during boot)
3) Implement SATA or IDE emulation so that an actual kernel can resume using the CD once in protected mode and using native drivers instead of the BIOS.