1

I have fallowed the steps from Arch Linux #KVM and #qemu

1) sudo pacman -S then installed libs

libvirt
libiscsi 
libaio
qemu
qemu-arch-extra 
qemu-block-iscsi 
qemu-block-rbd 
qemu-block-gluster 

2) $ lscpu check if VT-x is enabled

3) added the .conf file in the /etc/modprobe.d/ for the fallowing modules:

network device (virtio-net)
block device (virtio-blk)
controller device (virtio-scsi)
serial device (virtio-serial)
balloon device (virtio-balloon)

4) I have included and run the mkinitcpio.conf the modconf hook to load the modules in initramfs.

5) run $ lsinitcpio

I think is an issues here because in the output i don't see any virtualization module loaded:

usr/lib/modules
usr/lib/modules/4.5.4-1-ARCH
usr/lib/modules/4.5.4-1-ARCH/modules.devname
usr/lib/modules/4.5.4-1-ARCH/modules.builtin.bin
usr/lib/modules/4.5.4-1-ARCH/modules.symbols.bin
usr/lib/modules/4.5.4-1-ARCH/modules.alias.bin
usr/lib/modules/4.5.4-1-ARCH/modules.dep.bin
usr/lib/modules/4.5.4-1-ARCH/kernel
usr/lib/modules/4.5.4-1-ARCH/kernel/sdhci.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/ext4.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/usb-common.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/ehci-pci.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/sd_mod.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/rtsx_pci_sdmmc.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/serio.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/cdrom.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/hid.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/ehci-hcd.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/sdhci-acpi.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/atkbd.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/xhci-pci.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/usbhid.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/xhci-hcd.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/sr_mod.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/crc16.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/rtsx_pci.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/libps2.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/libahci.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/led-class.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/scsi_mod.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/mmc_core.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/mmc_block.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/i8042.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/usbcore.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/ahci.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/libata.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/mbcache.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/usb-storage.ko
usr/lib/modules/4.5.4-1-ARCH/kernel/jbd2.ko

6) When I run :

$ modinfo virtio-scsi I get the fallowing answer :

filename:       /lib/modules/4.5.4-1-ARCH/kernel/drivers/scsi/virtio_scsi.ko.gz
license:        GPL
description:    Virtio SCSI HBA driver
alias:          virtio:d00000008v*
depends:        virtio,scsi_mod,virtio_ring
intree:         Y
vermagic:       4.5.4-1-ARCH SMP preempt mod_unload modversions 

$ systool -v -m virtio-scsi and here for same module I get an error msg:

Error opening module `virtio-scsi`

7) And when I try to create a qemu image $ qemu-img create -f raw arch-qemu 8G i get the fallowing error:

$ Failed to open module:libiscsi.so.4: cannot open shared object file: No such file or directory

Any help is appreciated !

  • You have done a partial update: run -Syyu and make sure your mirror is up-to-date. – jasonwryan May 16 '16 at 9:31
  • if I check the package files pacman -Ql libiscsi, it appears a file libiscsi /usr/lib/libiscsi.so.7 and I thing it has to do with the libiscsi installed version (v1.17.0-2). I try to build the libiscsi-1.4.0 but I get a lot of errors – Mihai B. May 16 '16 at 11:37
  • @jasonwryan no results after update – Mihai B. May 16 '16 at 11:39
0

I manage to fix the issue after I installed manually an older version (v1.14.0) of libiscsi where qemu could find the libiscsi.so.4 file.

First I removed the v1.17.0-2 installed with pacman sudo pacman -Rddn libiscsi without uninstalling the qemu-block-iscsi dependency.

I cloned the source code from github sahlberg/libiscsi and after the build I installed the library with libtool. I'm aware that this is not the best solution because on the next update of qemu i will have to remove my manual install and use the pacman package again.

For the moment I see that on the arch linux qemu-page the package is :

Flagged out-of-date on 2016-05-10 Version 2.6.0-1 in testing

code executed as root:

# git clone folder - libiscsi/

# Making install in lib
# directory 'libiscsi/lib'

 mkdir -p '/usr/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libiscsi.la '/usr/lib'

 libtool --finish /usr/lib

----------------------------------------------------------------------

# Libraries have been installed in: /usr/lib

----------------------------------------------------------------------

# Making install in utils
# directory 'libiscsi/utils'

 mkdir -p '/usr/bin'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c iscsi-inq iscsi-ls iscsi-perf iscsi-readcapacity16 iscsi-swp '/usr/bin'

----------------------------------------------------------------------

# directory 'libiscsi/examples'

 mkdir -p '/usr/bin'
 install -c ld_iscsi.so '/usr/bin'

----------------------------------------------------------------------

# directory 'libiscsi/    

 mkdir -p '/usr/include/iscsi'
 install -c -m 644 include/iscsi.h include/scsi-lowlevel.h '/usr/include/iscsi'
 mkdir -p '/usr/lib/pkgconfig'
 install -c -m 644 libiscsi.pc '/usr/lib/pkgconfig'

I had run the commands manually because by default the make install from libiscsi was installing the lib in /usr/local/bin and /usr/local/lib.

Any comments and suggestions are welcome!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.