# Virtualizing a FreeBSD image on Xen

**URL:** <https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835>\
**Category:** SLES Virtualization\
**Created:** [April 10, 2013, 12:05pm UTC](https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835 "2013-04-10T12:05:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Gill](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@John\_Gill](https://forums.suse.com/u/John_Gill)\
**Post date:** [April 10, 2013, 12:05pm UTC](https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835/1 "2013-04-10T12:05:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [April 10, 2013, 1:07pm UTC](https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835/2 "2013-04-10T13:07:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![John\_Gill](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@John\_Gill](https://forums.suse.com/u/John_Gill)\
**Post date:** [April 10, 2013, 4:02pm UTC](https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835/3 "2013-04-10T16:02:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [April 10, 2013, 5:50pm UTC](https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835/4 "2013-04-10T17:50:33Z")

</div>

Hi John,

have you seen this message? [http://lists.freebsd.org/pipermail/freebsd-bugs/2012-January/047016.html](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

---

<div class="post-metadata">

**Author:** ![John\_Gill](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@John\_Gill](https://forums.suse.com/u/John_Gill)\
**Post date:** [April 15, 2013, 1:55pm UTC](https://forums.suse.com/t/virtualizing-a-freebsd-image-on-xen/23835/5 "2013-04-15T13:55:18Z")

</div>

Thanks Jens,

I have refered the developers to your link.

Many thanks  
John
