Sabuj Pattanayek
2009-Feb-11 18:18 UTC
[Xen-users] how to get a scsi tape device to work with xen 3.3.1
Hi, I''m using Centos 5.2 i386 and have installed xen 3.3.1 from the repository mentioned here: http://grantmcwilliams.com/index.php?option=com_content&view=article&id=229:install-xen-33-on-centos-5-the-easy-way&catid=97:xen-howtos&Itemid=465 I''m trying to get tape devices on the dom0 (virt4) to work on the domU (seabass): #### [root@virt4 ~]# rpm -qa | grep xen xen-libs-3.3.1-0 kernel-xen-2.6.18-92.1.22.el5 xen-3.3.1-0 [root@virt4 ~]# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 1507 4 r----- 189.9 seabass 2 512 2 -b---- 27.4 [root@virt4 ~]# lsscsi [0:0:3:0] tape IBM ULTRIUM-TD3 57F7 /dev/st0 [0:0:4:0] tape HP C1537A HP02 /dev/st1 [root@virt4 ~]# xm scsi-attach seabass 0:0:3:0 0:0:3:0 [root@virt4 ~]# xm scsi-list seabass Idx BE state phy-hctl phy vir-hctl devstate 0 0 1 0:0:3:0 st0 0:0:3:0 None [root@seabass ~]# modprobe st dmesg: SCSI subsystem initialized st: Version 20050830, fixed bufsize 32768, s/g segs 256 [root@seabass ~]# ls -l /dev/nst0 ls: /dev/nst0: No such file or directory [root@seabass ~]# ls -l /dev/st0 ls: /dev/st0: No such file or directory [root@seabass ~]# lsscsi [root@seabass ~]# cat /proc/scsi/scsi [root@virt4 ~]# xm scsi-detach seabass 0:0:3:0 Error: Driver status is not connected Usage: xm scsi-detach <Domain> <VirtDevice> #### Ok so maybe I need to try to get the PCI scsi card attached to the domU first? #### [root@virt4 ~]# lspci | grep -i scsi 01:01.0 SCSI storage controller: Adaptec AIC-7892A U160/m (rev 02) [root@virt4 ~]# xm pci-attach seabass 01:01.0 Error: Device 0 not connected Usage: xm pci-attach <Domain> <domain:bus:slot.func> [virtual slot] Insert a new pass-through pci device.>From /var/log/xen/xend.log:[2009-02-11 12:11:24 5643] DEBUG (XendDomainInfo:688) XendDomainInfo.pci_device_configure: [''pci'', [''dev'', [''domain'', ''0x0''], [''bus'', ''0x01''], [''slot'', ''0x01''], [''func'', ''0x0''], [''vslt'', ''0x0'']], [''state'', ''Initialising'']] [root@virt4 ~]# xm pci-list seabass VSlt domain bus slot func 0x0 0x0 0x01 0x01 0x0 [root@seabass ~]# lspci Any ideas on how to get this to work? Thanks, Sabuj Pattanayek _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sabuj Pattanayek
2009-Feb-12 05:40 UTC
[Xen-users] Re: how to get a scsi tape device to work with xen 3.3.1
> [root@virt4 ~]# lspci | grep -i scsi > 01:01.0 SCSI storage controller: Adaptec AIC-7892A U160/m (rev 02)I tried the pciback method but the domU (seabass) still doesn''t show the SCSI card above under lspci . #### virt4:/etc/rc.local : modprobe pciback SLOT=0000:01:01.0 # Unbind a PCI scsi card from its driver echo -n $SLOT > /sys/bus/pci/drivers/aic7xxx/unbind # Add a new slot to the PCI Backend''s list echo -n $SLOT > /sys/bus/pci/drivers/pciback/new_slot # Now that the backend is watching for the slot, bind to it echo -n $SLOT > /sys/bus/pci/drivers/pciback/bind xm create PCI=${SLOT} /etc/xen/seabass #### virt4:/etc/modprobe.conf: options pciback hide=(0000:01:01.0) #this didn''t really work to load pciback #install aic7xxx /sbin/modprobe pciback ; /sbin/modprobe --first-time --ignore-install aic7xxx # alias eth0 tg3 alias eth1 tg3 alias scsi_hostadapter aic7xxx alias scsi_hostadapter1 cciss Here''s the log from virt4:/var/log/xen/xend.log : #### [2009-02-11 23:28:00 5647] DEBUG (XendDomainInfo:89) XendDomainInfo.create([''vm'', [''name'', ''seabass''], [''memory'', 512], [''maxmem'', 512], [''on_poweroff'', ''destroy''], [''on_reboot'', ''restart''], [''on_crash'', ''restart''], [''vcpus'', 2], [''on_xend_start'', ''ignore''], [''on_xend_stop'', ''ignore''], [''uuid'', ''f137a596-566e-4a3c-a771-6596dad0c247''], [''bootloader'', ''/usr/bin/pygrub''], [''bootloader_args'', ''-q''], [''image'', [''linux'']], [''device'', [''tap'', [''uname'', ''tap:aio:/var/lib/xen/images/seabass.img''], [''dev'', ''xvda''], [''mode'', ''w'']]], [''device'', [''vif'', [''bridge'', ''xenbr0''], [''mac'', ''00:16:3e:36:15:d7'']]], [''device'', [''vkbd'']], [''device'', [''vfb'', [''vncunused'', ''1''], [''keymap'', ''en-us''], [''type'', ''vnc''], [''xauthority'', ''/root/.Xauthority'']]]]) [2009-02-11 23:28:00 5647] DEBUG (XendDomainInfo:2036) XendDomainInfo.constructDomain [2009-02-11 23:28:00 5647] DEBUG (balloon:132) Balloon: 527336 KiB free; need 2048; done. [2009-02-11 23:28:00 5647] DEBUG (XendDomain:449) Adding Domain: 2 [2009-02-11 23:28:00 5647] DEBUG (XendDomainInfo:2142) XendDomainInfo.initDomain: 2 256 [2009-02-11 23:28:00 6660] DEBUG (XendBootloader:99) Launching bootloader as [''/usr/bin/pygrub'', ''--output=/var/run/xend/boot/xenbl.2511'', ''-q'', ''/var/lib/xen/images/seabass.img'']. [2009-02-11 23:28:00 5647] DEBUG (image:302) No VNC passwd configured for vfb access [2009-02-11 23:28:00 5647] DEBUG (XendDomainInfo:2223) _initDomain:shadow_memory=0x0, memory_static_max=0x20000000, memory_static_min=0x0. [2009-02-11 23:28:00 5647] DEBUG (balloon:132) Balloon: 527336 KiB free; need 526336; done. [2009-02-11 23:28:00 5647] INFO (image:166) buildDomain os=linux dom=2 vcpus=2 [2009-02-11 23:28:00 5647] DEBUG (image:631) domid = 2 [2009-02-11 23:28:00 5647] DEBUG (image:632) memsize = 512 [2009-02-11 23:28:00 5647] DEBUG (image:633) image /var/run/xend/boot/boot_kernel.nfqi98 [2009-02-11 23:28:00 5647] DEBUG (image:634) store_evtchn = 1 [2009-02-11 23:28:00 5647] DEBUG (image:635) console_evtchn = 2 [2009-02-11 23:28:00 5647] DEBUG (image:636) cmdline = ro root=LABEL=/ rhgb quiet [2009-02-11 23:28:00 5647] DEBUG (image:637) ramdisk /var/run/xend/boot/boot_ramdisk.d4Ykl6 [2009-02-11 23:28:00 5647] DEBUG (image:638) vcpus = 2 [2009-02-11 23:28:00 5647] DEBUG (image:639) features [2009-02-11 23:28:00 5647] INFO (XendDomainInfo:1900) createDevice: vkbd : {''uuid'': ''4a327468-6131-8534-b3bd-eb5c997a7de9''} [2009-02-11 23:28:00 5647] DEBUG (DevController:122) DevController: writing {''protocol'': ''x86_32-abi'', ''state'': ''1'', ''backend-id'': ''0'', ''backend'': ''/local/domain/0/backend/vkbd/2/0''} to /local/domain/2/device/vkbd/0. [2009-02-11 23:28:00 5647] DEBUG (DevController:124) DevController: writing {''frontend-id'': ''2'', ''domain'': ''seabass'', ''frontend'': ''/local/domain/2/device/vkbd/0'', ''state'': ''1'', ''online'': ''1''} to /local/domain/0/backend/vkbd/2/0. [2009-02-11 23:28:00 5647] INFO (XendDomainInfo:1900) createDevice: vfb : {''vncunused'': ''1'', ''uuid'': ''4fff46cb-c529-6970-d398-cf5108aeca7a'', ''other_config'': {''vncunused'': ''1'', ''keymap'': ''en-us'', ''type'': ''vnc'', ''xauthority'': ''/root/.Xauthority''}, ''keymap'': ''en-us'', ''type'': ''vnc'', ''xauthority'': ''/root/.Xauthority''} [2009-02-11 23:28:00 5647] DEBUG (DevController:122) DevController: writing {''protocol'': ''x86_32-abi'', ''state'': ''1'', ''backend-id'': ''0'', ''backend'': ''/local/domain/0/backend/vfb/2/0''} to /local/domain/2/device/vfb/0. [2009-02-11 23:28:00 5647] DEBUG (DevController:124) DevController: writing {''vncunused'': ''1'', ''domain'': ''seabass'', ''frontend'': ''/local/domain/2/device/vfb/0'', ''xauthority'': ''/root/.Xauthority'', ''state'': ''1'', ''keymap'': ''en-us'', ''online'': ''1'', ''frontend-id'': ''2'', ''type'': ''vnc'', ''uuid'': ''4fff46cb-c529-6970-d398-cf5108aeca7a''} to /local/domain/0/backend/vfb/2/0. [2009-02-11 23:28:00 5647] INFO (XendDomainInfo:1900) createDevice: tap : {''bootable'': 1, ''uname'': ''tap:aio:/var/lib/xen/images/seabass.img'', ''mode'': ''w'', ''dev'': ''xvda'', ''uuid'': ''5bbd2dfd-0b41-f8bf-5eec-9b778408903b''} [2009-02-11 23:28:00 5647] DEBUG (DevController:122) DevController: writing {''virtual-device'': ''51712'', ''device-type'': ''disk'', ''protocol'': ''x86_32-abi'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/tap/2/51712''} to /local/domain/2/device/vbd/51712. [2009-02-11 23:28:00 5647] DEBUG (DevController:124) DevController: writing {''domain'': ''seabass'', ''frontend'': ''/local/domain/2/device/vbd/51712'', ''uuid'': ''5bbd2dfd-0b41-f8bf-5eec-9b778408903b'', ''dev'': ''xvda'', ''state'': ''1'', ''params'': ''aio:/var/lib/xen/images/seabass.img'', ''mode'': ''w'', ''online'': ''1'', ''frontend-id'': ''2'', ''type'': ''tap''} to /local/domain/0/backend/tap/2/51712. [2009-02-11 23:28:00 5647] INFO (XendDomainInfo:1900) createDevice: vif : {''bridge'': ''xenbr0'', ''mac'': ''00:16:3e:36:15:d7'', ''uuid'': ''a82b6a88-0dd7-25fd-aed3-bea431a39101''} [2009-02-11 23:28:00 5647] DEBUG (DevController:122) DevController: writing {''mac'': ''00:16:3e:36:15:d7'', ''handle'': ''0'', ''protocol'': ''x86_32-abi'', ''backend-id'': ''0'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vif/2/0''} to /local/domain/2/device/vif/0. [2009-02-11 23:28:00 5647] DEBUG (DevController:124) DevController: writing {''bridge'': ''xenbr0'', ''domain'': ''seabass'', ''handle'': ''0'', ''uuid'': ''a82b6a88-0dd7-25fd-aed3-bea431a39101'', ''script'': ''/etc/xen/scripts/vif-bridge'', ''mac'': ''00:16:3e:36:15:d7'', ''frontend-id'': ''2'', ''state'': ''1'', ''online'': ''1'', ''frontend'': ''/local/domain/2/device/vif/0''} to /local/domain/0/backend/vif/2/0. [2009-02-11 23:28:01 5647] INFO (image:375) spawning device models: /usr/lib/xen/bin/qemu-dm [''/usr/lib/xen/bin/qemu-dm'', ''-d'', ''2'', ''-domain-name'', ''seabass'', ''-k'', ''en-us'', ''-vnc'', ''127.0.0.1:0'', ''-vncunused'', ''-serial'', ''pty'', ''-M'', ''xenpv''] [2009-02-11 23:28:01 5647] INFO (image:422) device model pid: 6680 [2009-02-11 23:28:01 5647] INFO (image:511) waiting for sentinel_fifo [2009-02-11 23:28:01 5647] DEBUG (XendDomainInfo:2731) Storing VM details: {''on_xend_stop'': ''ignore'', ''shadow_memory'': ''0'', ''uuid'': ''f137a596-566e-4a3c-a771-6596dad0c247'', ''on_reboot'': ''restart'', ''start_time'': ''1234416481.15'', ''on_poweroff'': ''destroy'', ''bootloader_args'': ''-q'', ''on_xend_start'': ''ignore'', ''on_crash'': ''restart'', ''xend/restart_count'': ''0'', ''vcpus'': ''2'', ''vcpu_avail'': ''3'', ''bootloader'': ''/usr/bin/pygrub'', ''image'': "(linux (kernel ) (device_model /usr/lib/xen/bin/qemu-dm) (notes (FEATURES ''writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'') (VIRT_BASE 3221225472) (GUEST_VERSION 2.6) (PADDR_OFFSET 3221225472) (GUEST_OS linux) (HYPERCALL_PAGE 3225423872) (LOADER generic) (PAE_MODE yes) (ENTRY 3225419776) (XEN_VERSION xen-3.0)))", ''name'': ''seabass''} [2009-02-11 23:28:01 5647] DEBUG (XendDomainInfo:1359) Storing domain details: {''console/ring-ref'': ''210884'', ''image/entry'': ''3225419776'', ''console/port'': ''2'', ''store/ring-ref'': ''210885'', ''image/loader'': ''generic'', ''vm'': ''/vm/f137a596-566e-4a3c-a771-6596dad0c247'', ''control/platform-feature-multiprocessor-suspend'': ''1'', ''image/guest-os'': ''linux'', ''cpu/1/availability'': ''online'', ''image/features/writable-descriptor-tables'': ''1'', ''image/virt-base'': ''3221225472'', ''memory/target'': ''524288'', ''image/guest-version'': ''2.6'', ''image/features/supervisor-mode-kernel'': ''1'', ''image/pae-mode'': ''yes'', ''console/limit'': ''1048576'', ''image/paddr-offset'': ''3221225472'', ''image/hypercall-page'': ''3225423872'', ''cpu/0/availability'': ''online'', ''image/features/pae-pgdir-above-4gb'': ''1'', ''image/features/writable-page-tables'': ''1'', ''console/type'': ''ioemu'', ''image/features/auto-translated-physmap'': ''1'', ''name'': ''seabass'', ''domid'': ''2'', ''image/xen-version'': ''xen-3.0'', ''store/port'': ''1''} [2009-02-11 23:28:01 5647] DEBUG (DevController:122) DevController: writing {''protocol'': ''x86_32-abi'', ''state'': ''1'', ''backend-id'': ''0'', ''backend'': ''/local/domain/0/backend/console/2/0''} to /local/domain/2/device/console/0. [2009-02-11 23:28:01 5647] DEBUG (DevController:124) DevController: writing {''domain'': ''seabass'', ''frontend'': ''/local/domain/2/device/console/0'', ''uuid'': ''7accfd52-3f69-a4b7-3916-9cc948674cfe'', ''frontend-id'': ''2'', ''state'': ''1'', ''location'': ''2'', ''online'': ''1'', ''protocol'': ''vt100''} to /local/domain/0/backend/console/2/0. [2009-02-11 23:28:01 5647] DEBUG (XendDomainInfo:1443) XendDomainInfo.handleShutdownWatch [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices vif. [2009-02-11 23:28:01 5647] DEBUG (DevController:171) Waiting for 0. [2009-02-11 23:28:01 5647] DEBUG (DevController:656) hotplugStatusCallback /local/domain/0/backend/vif/2/0/hotplug-status. [2009-02-11 23:28:01 5647] DEBUG (DevController:670) hotplugStatusCallback 1. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices vscsi. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices vbd. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices irq. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices vkbd. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices vfb. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices console. [2009-02-11 23:28:01 5647] DEBUG (DevController:171) Waiting for 0. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices pci. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices ioports. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices tap. [2009-02-11 23:28:01 5647] DEBUG (DevController:171) Waiting for 51712. [2009-02-11 23:28:01 5647] DEBUG (DevController:656) hotplugStatusCallback /local/domain/0/backend/tap/2/51712/hotplug-status. [2009-02-11 23:28:01 5647] DEBUG (DevController:670) hotplugStatusCallback 1. [2009-02-11 23:28:01 5647] DEBUG (DevController:166) Waiting for devices vtpm. [2009-02-11 23:28:01 5647] INFO (XendDomain:1174) Domain seabass (2) unpaused. #### Any ideas? Thanks, Sabuj Pattanayek _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Sabuj Pattanayek
2009-Feb-12 05:57 UTC
[Xen-users] Re: how to get a scsi tape device to work with xen 3.3.1
> xm create PCI=${SLOT} /etc/xen/seabasschanged that to : xm create pci=0000:01:01.0 /etc/xen/seabass and tried to start it manually. I got the following in xend.log: [2009-02-11 23:45:55 5647] ERROR (xmlrpclib2:178) Internal error handling xend.domain.create Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/xen/util/xmlrpclib2.py", line 131, in _marshaled_dispatch response = self._dispatch(method, params) File "/usr/lib/python2.4/SimpleXMLRPCServer.py", line 406, in _dispatch return func(*params) File "/usr/lib/python2.4/site-packages/xen/xend/server/XMLRPCServer.py", line 79, in domain_create info = XendDomain.instance().domain_create(config) File "/usr/lib/python2.4/site-packages/xen/xend/XendDomain.py", line 967, in domain_create dominfo = XendDomainInfo.create(config) File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 92, in create vm.start() File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 447, in start XendTask.log_progress(31, 60, self._initDomain) File "/usr/lib/python2.4/site-packages/xen/xend/XendTask.py", line 209, in log_progress retval = func(*args, **kwds) File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 2268, in _initDomain self._createDevices() File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1902, in _createDevices devid = self._createDevice(devclass, config) File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 1869, in _createDevice return self.getDeviceController(deviceClass).createDevice(devConfig) File "/usr/lib/python2.4/site-packages/xen/xend/server/DevController.py", line 94, in createDevice self.setupDevice(config) File "/usr/lib/python2.4/site-packages/xen/xend/server/pciif.py", line 416, in setupDevice devs_str = dev.find_coassigned_devices(True) File "/usr/lib/python2.4/site-packages/xen/util/pci.py", line 465, in find_coassigned_devices dev = self.find_the_uppermost_pci_bridge() File "/usr/lib/python2.4/site-packages/xen/util/pci.py", line 420, in find_the_uppermost_pci_bridge (dom, b, d, f) = self.find_parent() TypeError: unpack non-sequence [root@virt4 ~]# xm create -n pci=0000:01:01.0 /etc/xen/seabass Using config file "/etc/xen/seabass". (vm (name seabass) (memory 512) (maxmem 512) (on_poweroff destroy) (on_reboot restart) (on_crash restart) (vcpus 2) (on_xend_start ignore) (on_xend_stop ignore) (uuid f137a596-566e-4a3c-a771-6596dad0c247) (bootloader /usr/bin/pygrub) (bootloader_args -q) (image (linux)) (device (tap (uname tap:aio:/var/lib/xen/images/seabass.img) (dev xvda) (mode w) ) ) (device (pci (dev (domain 0x0000) (bus 0x01) (slot 0x01) (func 0x0)))) (device (vif (bridge xenbr0) (mac 00:16:3e:36:15:d7))) (device (vkbd)) (device (vfb (vncunused 1) (keymap en-us) (type vnc) (xauthority /root/.Xauthority) ) ) ) What''s going on, is it not able to find the parent PCI-bridge? Here''s the complete lspci: [root@virt4 ~]# lspci 00:00.0 Host bridge: Broadcom CMIC-LE Host Bridge (GC-LE chipset) (rev 32) 00:00.1 Host bridge: Broadcom CMIC-LE Host Bridge (GC-LE chipset) 00:00.2 Host bridge: Broadcom CMIC-LE Host Bridge (GC-LE chipset) 00:03.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27) 00:04.0 RAID bus controller: Compaq Computer Corporation Smart Array 5i/532 (rev 01) 00:05.0 System peripheral: Compaq Computer Corporation Integrated Lights Out Controller (rev 01) 00:05.2 System peripheral: Compaq Computer Corporation Integrated Lights Out Processor (rev 01) 00:0f.0 ISA bridge: Broadcom CSB5 South Bridge (rev 93) 00:0f.1 IDE interface: Broadcom CSB5 IDE Controller (rev 93) 00:0f.2 USB Controller: Broadcom OSB4/CSB5 OHCI USB Controller (rev 05) 00:0f.3 Host bridge: Broadcom CSB5 LPC bridge 00:11.0 Host bridge: Broadcom CIOB-X2 PCI-X I/O Bridge (rev 05) 00:11.2 Host bridge: Broadcom CIOB-X2 PCI-X I/O Bridge (rev 05) 01:01.0 SCSI storage controller: Adaptec AIC-7892A U160/m (rev 02) 01:02.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5703X Gigabit Ethernet (rev 02) 04:02.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5703X Gigabit Ethernet (rev 02) Thanks, Sabuj Pattanayek _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users