Hi,
e820 bug had fixed.
https://gist.github.com/syuu1228/7210108/raw/a23bf85b72e9b219d9abb04c7ab2d372277ffe51/osv-bhyve-20131029-1.diff
Then I got new error:
Assertion failed: st == AE_OK (../../drivers/hpet.cc: hpet_init: 171)
Aborted
This is because OSv only have paravirt clock drivers + HPET driver, and BHyVe only have PIT device.
I'll try to look into clock driver..
Hi,
On 10/29/2013 03:21 AM, Takuya ASADA wrote:
> Hi,
>
> I'm working on BHyVe hypervisor support for OSv.
> BHyVe is a hypervisor for FreeBSD, will be installed by default on up
> coming release of FreeBSD(10.0-RELEASE).
> Web site link: http://bhyve.org/
>
> Currently, BHyVe hasn't wide support of guest OSes, because:
> - No BIOS/UEFI support
> - Not able to execute 16bit/32bit code
How do you boot extra vcpus?
> - Very few device support(UART, virtio-net, virtio-blk only)
What do you use for clocks?
> - Required to implement custom OS loader
>
> For OSv, few driver support is not a problem, but we have to implement
> OS loader for OSv to use BHyVe.
> So I implemented a OSv loader for BHyVe, and modified OSv kernel a
> little bit for it.
> Here's a initial version of a patch:
> https://gist.github.com/syuu1228/7207615/raw/34193e12d606cf3b76800454eba36c7d8581eba1/osv-bhyve-20131029.diff
>
Nice. I imagine you need to build the loader on FreeBSD?
Is there a way to include th loader in the image? It is awkward to
distribute a VM image in two pieces.
An alternative is to make osv conform to the same ABI that the FreeBSD
loader uses to load FreeBSD (assuming there is such an ABI).
> - Required to implement custom OS loader
>
> For OSv, few driver support is not a problem, but we have to implement
> OS loader for OSv to use BHyVe.
> So I implemented a OSv loader for BHyVe, and modified OSv kernel a
> little bit for it.
> Here's a initial version of a patch:
> https://gist.github.com/syuu1228/7207615/raw/34193e12d606cf3b76800454eba36c7d8581eba1/osv-bhyve-20131029.diff
>
Nice. I imagine you need to build the loader on FreeBSD?
Is there a way to include th loader in the image? It is awkward to
distribute a VM image in two pieces.Unless they release UEFI firmware, we need to provide original loader.
On 10/30/2013 05:01 AM, Takuya ASADA wrote:
> - Required to implement custom OS loader
>
> For OSv, few driver support is not a problem, but we have to implement
> OS loader for OSv to use BHyVe.
> So I implemented a OSv loader for BHyVe, and modified OSv kernel a
> little bit for it.
> Here's a initial version of a patch:
> https://gist.github.com/syuu1228/7207615/raw/34193e12d606cf3b76800454eba36c7d8581eba1/osv-bhyve-20131029.diff
>
Nice. I imagine you need to build the loader on FreeBSD?
Is there a way to include th loader in the image? It is awkward to
distribute a VM image in two pieces.Unless they release UEFI firmware, we need to provide original loader.
I just got a mail from a BHyVe developer, he sent a link which is new userland OS loader:It's userland GRUB.
OSv is currently boot from original boot code, the disk format is not compatible with GRUB, but it already has multiboot header so I guess there's a way to solve it.Maybe we can put OSv's ELF image(contains multiboot header) on ZFS, GRUB should able to read the kernel.
Yes, that is possible, and grub supports zfs. I am worried that grub will slow the boot time though.
It will be much better if bhyve adds support for enough bios (or bios emulation) to boot osv directly. All that is needed is int 15/e820 (for which the information is already available) and int 13 (for which a small virtio driver is needed).
2013年10月30日水曜日 Avi Kivity a...@cloudius-systems.com:
On 10/30/2013 05:01 AM, Takuya ASADA wrote:
> - Required to implement custom OS loader
>
> For OSv, few driver support is not a problem, but we have to implement
> OS loader for OSv to use BHyVe.
> So I implemented a OSv loader for BHyVe, and modified OSv kernel a
> little bit for it.
> Here's a initial version of a patch:
> https://gist.github.com/syuu1228/7207615/raw/34193e12d606cf3b76800454eba36c7d8581eba1/osv-bhyve-20131029.diff
>
Nice. I imagine you need to build the loader on FreeBSD?
Is there a way to include th loader in the image? It is awkward to
distribute a VM image in two pieces.Unless they release UEFI firmware, we need to provide original loader.
I just got a mail from a BHyVe developer, he sent a link which is new userland OS loader:It's userland GRUB.
OSv is currently boot from original boot code, the disk format is not compatible with GRUB, but it already has multiboot header so I guess there's a way to solve it.Maybe we can put OSv's ELF image(contains multiboot header) on ZFS, GRUB should able to read the kernel.
Yes, that is possible, and grub supports zfs. I am worried that grub will slow the boot time though.You mean OSv already able to boot from GRUB?
It will be much better if bhyve adds support for enough bios (or bios emulation) to boot osv directly. All that is needed is int 15/e820 (for which the information is already available) and int 13 (for which a small virtio driver is needed).According to BHyVe developer who sent a link, the user land GRUB try to boot Linux/x86_64 from protected mode entry point directly, works without BIOS emu.(And because of this, i386 kernel doesn't works. It calls BIOS after entering protected mode.)
Userland GRUB runs on Host OS, setup register and everything protected mode needs, just like my OSv Loader.
Actually, he also said Multiboot binary is not supported yet, it only supports Linux bzImage and OpenBSD ELF.Maybe it can fix soon though.
On 11/06/2013 04:37 PM, Takuya ASADA wrote:
> Hi,
Hi Takuya
>
> I could boot-up unmodified OSv disk-image(usr.img) on BHyVe, with my
> custom OS loader(bhyveosvload).
> # Actually OSv still dies while initializing clock driver, since there's
> no HPET on BHyVe. I'll work on it soon.
Which clock device does BHyVe uses?
> # And BHyVe doesn't support QCOW2, I needed to convert QCOW2 to RAW
> before loading the image.
>
We also need to do this for Amazon, so we'll likely have both images.