Issue

Xen4.1 error: Device model isn't ready for commands

posted in Hypervisor
Tuesday, April 08 2014, 03:50 AM
Jason
Jason
Offline
0
Hi everyone,

I have been learning Xen+Debian for about two weeks now. I followed a few online tutorial to setup my home server using Xen4.1 (Debian Wheezy). My main goal is VGA, audio passthrough to HVM windows domU for XBMC media playback and another domU for OpenMediaVault for NAS.

So far, I have managed to assign the VGA and usb to xen-pciback. And when I 'xm create' my .cfg file, I had the error as following:

Error: Device model isn't ready for commands


I looked into the log, and I couldn't understand much. Could anyone help me interpret this log and point me to the right direction? Thanks in advance!!!!

Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/1/2048
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/vif-bridge: online type_if=vif XENBUS_PATH=backend/vif/1/0
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/1/2080
Mar 27 21:52:32 DB-XEN kernel: [  169.008102] device vif1.0 entered promiscuous mode
Mar 27 21:52:32 DB-XEN kernel: [  169.010503] ADDRCONF(NETDEV_UP): vif1.0: link is not ready
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/block: Writing backend/vbd/1/2080/node /dev/loop0 to xenstore.
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/block: Writing backend/vbd/1/2080/physical-device 7:0 to xenstore.
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/block: Writing backend/vbd/1/2080/hotplug-status connected to xenstore.
Mar 27 21:52:32 DB-XEN kernel: [  169.119383] ip_tables: (C) 2000-2006 Netfilter Core Team
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/vif-bridge: Successful vif-bridge online for vif1.0, bridge xenbr0.
Mar 27 21:52:32 DB-XEN logger: /etc/xen/scripts/vif-bridge: Writing backend/vif/1/0/hotplug-status connected to xenstore.
Mar 27 21:52:33 DB-XEN logger: /etc/xen/scripts/block: Writing backend/vbd/1/2048/node /dev/loop1 to xenstore.
Mar 27 21:52:33 DB-XEN logger: /etc/xen/scripts/block: Writing backend/vbd/1/2048/physical-device 7:1 to xenstore.
Mar 27 21:52:33 DB-XEN logger: /etc/xen/scripts/block: Writing backend/vbd/1/2048/hotplug-status connected to xenstore.
Mar 27 21:52:34 DB-XEN kernel: [  171.090109] tun: Universal TUN/TAP device driver, 1.6
Mar 27 21:52:34 DB-XEN kernel: [  171.090112] tun: (C) 1999-2004 Max Krasnyansky 
Mar 27 21:52:34 DB-XEN logger: /etc/xen/scripts/vif-bridge: add type_if=tap XENBUS_PATH=
Mar 27 21:52:34 DB-XEN kernel: [  171.120276] device vif1.0-emu entered promiscuous mode
Mar 27 21:52:34 DB-XEN kernel: [  171.120325] xenbr0: port 3(vif1.0-emu) entering forwarding state
Mar 27 21:52:34 DB-XEN kernel: [  171.120332] xenbr0: port 3(vif1.0-emu) entering forwarding state
Mar 27 21:52:34 DB-XEN avahi-daemon[2723]: Withdrawing workstation service for vif1.0-emu.
Mar 27 21:52:34 DB-XEN kernel: [  171.124915] xenbr0: port 3(vif1.0-emu) entering forwarding state
Mar 27 21:52:34 DB-XEN kernel: [  171.125314] xenbr0: port 3(vif1.0-emu) entering disabled state
Mar 27 21:52:34 DB-XEN kernel: [  171.125404] device vif1.0-emu left promiscuous mode
Mar 27 21:52:34 DB-XEN kernel: [  171.125407] xenbr0: port 3(vif1.0-emu) entering disabled state
Mar 27 21:52:45 DB-XEN avahi-daemon[2723]: Withdrawing workstation service for vif1.0.
Mar 27 21:52:45 DB-XEN kernel: [  181.743993] xenbr0: port 2(vif1.0) entering disabled state
Mar 27 21:52:45 DB-XEN kernel: [  181.744054] device vif1.0 left promiscuous mode
Mar 27 21:52:45 DB-XEN kernel: [  181.744057] xenbr0: port 2(vif1.0) entering disabled state
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/1/2048
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vfb/1/0
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/vif-bridge: offline type_if=vif XENBUS_PATH=backend/vif/1/0
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/block: remove XENBUS_PATH=backend/vbd/1/2080
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/vif-bridge: brctl delif xenbr0 vif1.0 failed
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/vif-bridge: ifconfig vif1.0 down failed
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/1/2080
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/vif-bridge: Successful vif-bridge offline for vif1.0, bridge xenbr0.
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vbd/1/2048
Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/xen-hotplug-cleanup: XENBUS_PATH=backend/vif/1/0


My system:

Linux DB-XEN 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux


Xen installed via (I believed to be 4.1)

# apt-get install xen-linux-system


# lspci -n

00:00.0 0600: 8086:0150 (rev 09) #DRAM Controller
00:01.0 0604: 8086:0151 (rev 09)
00:02.0 0300: 8086:0152 (rev 09) #i5 CPU HD2500 integrated Graphics Controller!!!!!!
00:14.0 0c03: 8086:1e31 (rev 04) #USB xHCI Host Controller
00:16.0 0780: 8086:1e3a (rev 04) 
00:1a.0 0c03: 8086:1e2d (rev 04) #USB Enhanced Host Controller #2
00:1b.0 0403: 8086:1e20 (rev 04) #Audio Controller
00:1c.0 0604: 8086:1e10 (rev c4)
00:1c.4 0604: 8086:1e18 (rev c4)
00:1c.5 0604: 8086:1e1a (rev c4)
00:1c.6 0604: 8086:1e1c (rev c4)
00:1d.0 0c03: 8086:1e26 (rev 04) #USB Enhanced Host Controller #1
00:1f.0 0601: 8086:1e4a (rev 04) 
00:1f.2 0106: 8086:1e02 (rev 04) 
00:1f.3 0c05: 8086:1e22 (rev 04)
01:00.0 0200: 8086:105e (rev 06) #intel gigabit ethernet eth2
01:00.1 0200: 8086:105e (rev 06) #intel gigabit ethernet eth3
03:00.0 0200: 10ec:8168 (rev 06) #Realtek gigabit ethernet eth0
04:00.0 0200: 10ec:8168 (rev 06) #Realtek gigabit ethernet eth1
05:00.0 0280: 8086:0887 (rev c4)


Network setting:
# ifconfig

eth2      Link encap:Ethernet  HWaddr 00:15:17:36:a6:ac  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5383 errors:0 dropped:0 overruns:0 frame:0
          TX packets:681 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:470248 (459.2 KiB)  TX bytes:143210 (139.8 KiB)
          Interrupt:16 Memory:f7d80000-f7da0000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

xenbr0    Link encap:Ethernet  HWaddr 00:15:17:36:a6:ac  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::215:17ff:fe36:a6ac/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:982 errors:0 dropped:0 overruns:0 frame:0
          TX packets:171 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:55692 (54.3 KiB)  TX bytes:23508 (22.9 KiB)


pci bind and unbind procedures:
- pciback script named pciback to /etc/init.d
- make this script executable
- run script just after send (# update-rc.d pciback defaults 21 19)
- load xen-pciback module in /etc/initramfs-tools/modules and let pciback pick up passthrough devices
- # xm pci-list-assignable-devices

0000:00:02.0
0000:00:1b.0


Content of M7.cfg file

# Windows Micro7 SP1 64x

kernel = '/usr/lib/xen-4.1/boot/hvmloader'
builder = 'hvm'

vcpus = '2'
memory = '2048'
iommu = 'soft'

# Name of the domU:
name = 'HVM_Micro7_x64'

acpi = '1'
apic = '1'
on_xend_stop = 'shutdown'

vif = [ 'type=ioemu' ]

disk = ['file:/etc/xen/images/HVM_Micro7_x64.img,sda,w','file:/home/jyu/ISO/Micro_7_Ultimate_SP1_x64.iso,sdc:cdrom,r']
#device_model = '/usr/lib/xen-4.1/bin/qemu-dm'
boot = 'dc'

sdl = '0'
vnc = '1'
vnclisten = '0.0.0.0'
vncpasswd = ''
stdvga = '0'

on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'

viridian = '1'
xen_platform_pci= '1'

# This allows sharing the USB mouse/keyboard:
# When usb=1 (see below), this option improves mouse tracking
usb = '1'
usbdevice = 'tablet'


# Enable Xen VGA Passthrough, try it with 0 first
# gfx_passthru=0 is how it works for most AMD cards and my Quadro 2000 card.
# gfx_passthru=1 would pass through the graphics card as primary display adapter.
gfx_passthru=1

# VGA Passthrough HD2500 GPU, PCI Passthrough Intel HD Audio Controller.
pci = [ '00:02.0','00:1b.0' ]

# The following lets Windows take the local time from the dom0:
localtime=1

#To turn on pci power management globally, use (see remarks under pci=... below):
pci_power_mgmt=1


I tried the following setting in this .cfg, problem persisted.

vif=[ 'mac=00:16:3e:68:e1:01, model=e1000, bridge=xenbr0' ]
Responses (4)
  • Accepted Answer

    Jason
    Jason
    Offline
    Tuesday, April 08 2014, 04:24 AM - #permalink
    0
    I posted a long thread:p . Shall I post this to Xen-users mailing list? :)
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 08 2014, 04:35 AM - #permalink
    0
    I've not come across this before personally, but it sounds like it is trying to use Qemu and it isn't there or isn't functional.

    Searching the web, I have found a few references to this error when using PCI or VGA passthru.

    This reference:
    http://www.phoronix.com/forums/showthread.php?57068-Xen-VGA-passthrough-is-the-way-to-go!!!/page8

    refers to this error being caused by a missing file for qemu, which the user rectified with the command:
    ln -s /usr/share/qemu-linaro/keymaps/en-us /usr/share/qemu/keymaps/en-us

    I'd check logs relating to qemu to see if you can see a qemu-related error. If not, let us know.

    Russ
    The reply is currently minimized Show
  • Accepted Answer

    Jason
    Jason
    Offline
    Tuesday, April 08 2014, 04:55 AM - #permalink
    0
    Thanks Russ! I saw that thread before. I tried the same command,
    ln -s /usr/share/qemu-linaro/keymaps/en-us /usr/share/qemu/keymaps/en-us


    I can't remember the exact message I was given. I remember it said "file exist" .

    but I will try again and report back.

    I just wonder if I posted the right log above? Is it under /var/log?

    I checked the log I posted again. I noticed this,

    Mar 27 21:52:45 DB-XEN logger: /etc/xen/scripts/vif-bridge: brctl delif xenbr0 vif1.0 failed


    Anything wrong with my network settings?
    The reply is currently minimized Show
  • Accepted Answer

    Jason
    Jason
    Offline
    Wednesday, April 09 2014, 12:04 AM - #permalink
    0
    I think I looked into the wrong log file:p . There is a log file name after the .cfg file. Every time I execute xm create, the last log file will rename as .log1 and the current log file is always named .log

    I will close this thread since I re-installed my system again.
    The reply is currently minimized Show
Your Reply