Virtualizing a FreeBSD image on Xen

Running SLES11sp2 (64bit) with Xen 3.0.13-0.27.

I received a (VmPlayer) guest.vmdk file which I converted to a .img format with the following command : qemu-img convert guest.vmdk -O raw guest.img.

Within Xen I create a new VM as Ubuntu (as FreeBSD is not listed). I set up the memory, disk, NIC etc and then start the VM. The VM starts to boot and then after a few seconds I get the following error:

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0x0
fault code = supervisor read instruction, page not present
instruction pointer = 0x8:0x0
stack pointer = 0x10:0xffffffff80e5ec10
frame pointer = 0x10:0xffffffff80e5ec80
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current processors = 0 (swapper)
[thread pid 0 tid 100000]
stopped at 0: *** error reading from address ***
db >

This same application runs perfectly on a Windows VmPlayer version 5.02

Any help in getting this VM within the SuSE Xen to work will be much appreciated.

Regards
John

Hi John,

have you set up the DomU as an HVM? If it’s a PVM, then you’d need to prepare your image with a different kernel supporting the Xen interfaces.

Regards,
Jens

Hi,

I set up the VM in Full Virtulization.
Below is file from /etc/xen/vm/
name=“be1”
description=""
uuid=“c986595a-c073-494f-100d-1ba0469db3d5”
memory=4096
maxmem=4096
vcpus=1
on_poweroff=“destroy”
on_reboot=“restart”
on_crash=“destroy”
localtime=0
keymap=“en-us”

builder=“hvm”
device_model="/usr/lib/xen/bin/qemu-dm"
kernel="/usr/lib/xen/boot/hvmloader"
boot=“c”
disk=[ ‘file:/var/lib/xen/images/be1/be1.img,hda,w’, ]
vif=[ ‘mac=00:16:3e:21:d6:40,bridge=br1,model=rtl8139’, ]

stdvga=0
vnc=1
vncunused=1

viridian=0
apic=0
acpi=1
pae=1

serial=“pty”

and from xm list -l be1 > be1
(domain
(cpu_weight 256)
(cpu_cap 0)
(pool_name Pool-0)
(bootloader ‘’)
(vcpus 1)
(cpus (()))
(on_poweroff destroy)
(description)
(on_crash destroy)
(uuid c986595a-c073-494f-100d-1ba0469db3d5)
(bootloader_args ‘’)
(name be1)
(on_reboot restart)
(maxmem 4096)
(memory 4096)
(shadow_memory 33)
(features ‘’)
(on_xend_start ignore)
(on_xend_stop ignore)
(start_time 1365598325.2)
(cpu_time 16.067247612)
(online_vcpus 1)
(image
(hvm
(kernel ‘’)
(superpages 0)
(videoram 4)
(hpet 0)
(stdvga 0)
(loader /usr/lib/xen/boot/hvmloader)
(xen_platform_pci 1)
(rtc_timeoffset 0)
(pci ())
(hap 1)
(localtime 0)
(xenpaging_extra ())
(actmem 0)
(pci_msitranslate 1)
(oos 1)
(apic 0)
(xenpaging_file ‘’)
(timer_mode 1)
(vpt_align 1)
(serial pty)
(vncunused 1)
(boot c)
(pae 1)
(viridian 0)
(acpi 1)
(vnc 1)
(nographic 0)
(watchdog_action reset)
(nomigrate 0)
(usb 0)
(tsc_mode 0)
(guest_os_type default)
(device_model /usr/lib/xen/bin/qemu-dm)
(keymap en-us)
(pci_power_mgmt 0)
(xauthority /root/.Xauthority)
(isa 0)
(notes (SUSPEND_CANCEL 1))
)
)
(status 0)
(store_mfn 1044476)
(device
(vif
(bridge br0)
(mac 00:16:3e:21:d6:40)
(devid 0)
(model rtl8139)
(uuid 0ea77a16-db28-c69b-b99b-ebbfd5291aff)
)
)
(device
(console
(protocol vt100)
(uuid bb2b7e88-44b8-a47c-c0e4-f0b621524646)
(location 3)
)
)
(device
(vbd
(uuid 47f1915c-9b04-8cbb-9f2c-3c2b422708af)
(bootable 1)
(devid 768)
(driver paravirtualised)
(dev hda)
(uname file:/var/lib/xen/images/be1/be1.img)
(mode w)
)
)
(device
(vfb
(vncunused 1)
(vnc 1)
(uuid b39a193f-df01-6acc-5a18-406b1938cb61)
(devid 0)
(keymap en-us)
(location 127.0.0.1:5900)
)
)
)

I hope this helps
Regards
John

Hi John,

have you seen this message? http://lists.freebsd.org/pipermail/freebsd-bugs/2012-January/047016.html

I don’t know how old your system is, maybe you’re hitting that (or a similar) bug?

Regards,
Jens

Thanks Jens,

I have refered the developers to your link.

Many thanks
John