Commit 813fc8d7 authored by Mike Hibler's avatar Mike Hibler

For FBSD VMs, choose the kernel based on the imagename.

Ideally, the kernel would be extracted from the image itself, but we live
in an imperfect world.
parent c21db146
......@@ -475,13 +475,18 @@ sub vnodeCreate($$$$)
# XXX need a better way to determine this!
#
my $os;
if ($imagename =~ /BSD/) {
if ($imagename =~ /FBSD/) {
$os = "FreeBSD";
# XXX prefer a FreeBSD9 kernel if we have it
if (-r "/boot/freebsd9/kernel") {
if ($imagename =~ /FBSD9/) {
$image{'kernel'} = "/boot/freebsd9/kernel";
} else {
} elsif ($imagename =~ /FBSD8/) {
$image{'kernel'} = "/boot/freebsd8/kernel";
} else {
$image{'kernel'} = "/boot/freebsd/kernel";
}
if (! -e "$image{'kernel'}") {
print STDERR "libvnode_xen: no FreeBSD kernel for '$imagename' on $vnode_id\n";
return -1;
}
undef $image{'ramdisk'};
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment