Brian McEntire
2005-Nov-28 05:41 UTC
[Xen-users] Example PCI hiding in dom0 and direct access in domU
Hello all, I''m new to the list and working my way up the Xen learning curve. This is exciting technology and my initial experience has been very positive!! I''ve set up several dom0 and single domU VMs on different computers to get my feet wet. Now I''m trying to get set up an Asterisk server in a domU VM so I can take one of my home computers offline (and hopefully save on the electric bill.) I''m using a Zaptel TDM422B PCI card. That may or may not mean something to most people on the list, but the short of it is, it''s a PCI card that interfaces the Asterisk Open Source PBX system to plain old telephone service lines. I have this card working on a Debian Testing install an also in a Debian Stable Linux system. Now I''d like to get it working inside a Xen virtual machine. Here is the grub menu.lst config in Dom0: title Xen 2.0.7 / XenLinux 2.6 kernel /boot/xen-2.0.7.gz dom0_mem=262144 physdev_dom0_hide=(03:01.0) module /boot/vmlinuz-2.6-xen0 root=/dev/hda1 ro console=tty0 Before booting with the physdev_dom0_hide parameter, lspci showed the following information about the Zaptel PCI card: 0000:03:01.0 Communication controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN interface The trouble I''m having is being able to see this card inside of a DomU after it is confirmed/successfully hidden from domO. My DomU config has this line and, other than not seeing the PCI card, works fine: pci = [''03,01,0''] I''m running Xen 2.0.7 built from source using make-world. It appeared to grab the latest 2.6.11 kernel and patch it during the build process. The result is Xen 2.0.7 running a 2.6.11.12-xen0 kernel. After booting dom0, I use xm create -c asterisk to start the asterisk domU instance. It boots fine, but it does not successfully load the wctdm module (which I built in dom0 by setting KSRC to domU''s kernel source location. I also copied the /lib/modules/2.6.11.12-xenU tree into the domU file system so it would have access to the compiled modules.) Inside the booted domU, modprobe gives this error: # modprobe wctdm Zapata Telephony Interface Registered on major 196 ZT_CHANCONFIG failed on channel 1: No such device or address (6) FATAL: Error running install command for wctdm lspci inside of domU does not work: # lspci pcilib: Cannot open /sys/bus/pci/devices pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. However, at least /proc is mounted and looks normal. I have tried recompiling the domU kernel and changing these options to Y in the .config:> CONFIG_XEN_PRIVILEGED_GUEST=y > CONFIG_XEN_PHYSDEV_ACCESS=y(in fact, I tried all four combinations -- NN, YN, NY, YY -- none of these allowed the card to work in domU) Can anyone walk me through hiding a device from dom0 and getting it to work in domU, or point out the mistakes in what I tried above? For now, I am successfully running the card in dom0 (after undo''ing the hiding parameter in grub and rebooting). Thank you! Brian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Robin Schroeder
2005-Nov-28 08:01 UTC
Re: [Xen-users] Example PCI hiding in dom0 and direct access in domU
Brian McEntire schrieb:> Hello all,[...]> # modprobe wctdm > Zapata Telephony Interface Registered on major 196 > ZT_CHANCONFIG failed on channel 1: No such device or address (6) > FATAL: Error running install command for wctdm > > lspci inside of domU does not work: > > # lspci > pcilib: Cannot open /sys/bus/pci/devices > pcilib: Cannot open /proc/bus/pci > lspci: Cannot find any working access method.Have you tried usind a Dom0 kernel for the virtual machine? In my opinion DomU kernels don''t support real hardware access. Regards Robin Schroeder _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Brian McEntire
2005-Dec-04 02:41 UTC
Re: [Xen-users] Example PCI hiding in dom0 and direct access in domU
Thanks for the tip. You were right, after hiding the PCI card from DOM0, I was then able to start another Dom0 VM and lspci showed only the Digium PCI card. Unfortunately, even then, Asterisk core dumps when I try to start it. One of the messages from the dump/oops (?) is "General Protection Fault". I''ll probably give up trying to get Asterisk to run in a VM since it is running okay in domain0. But if anyone has made this work (with Zaptel/wctdm modules and the Digium TDM PCI card,) I''d love to hear about it. Thanks! On 11/28/05, Robin Schroeder <robin@tp4.ruhr-uni-bochum.de> wrote:> > Brian McEntire schrieb: > > Hello all, > [...] > > # modprobe wctdm > > Zapata Telephony Interface Registered on major 196 > > ZT_CHANCONFIG failed on channel 1: No such device or address (6) > > FATAL: Error running install command for wctdm > > > > lspci inside of domU does not work: > > > > # lspci > > pcilib: Cannot open /sys/bus/pci/devices > > pcilib: Cannot open /proc/bus/pci > > lspci: Cannot find any working access method. > > Have you tried usind a Dom0 kernel for the virtual machine? In my > opinion DomU kernels don''t support real hardware access. > > Regards > Robin Schroeder > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users