[SOLVED] kvm vs qemu

Hello all,
I'm confused as to which I should be using.  I am running arch 64, AMD processor with 6 cores.
I am trying to set up virtualization with KVM, and I am following the wiki here:
https://wiki.archlinux.org/index.php/Kv … e_packages
though I'm not sure what I should be installing/running.
I tried qemu, and when I go to install windows 7, the 64bit gives me a blue screen with error code upon booting the the VM to the windows 764bit cd.  When I try the 32-bit version of windows 7, same command line used to launch qemu, the installer starts, but once I pick my language and click next, the installer stays at the "Starting Windows Setup" screen.  It has stayed here for over 24 hours.
When talking with a guy from work, he suggested trying qemu-kvm, so over lunch I uninstalled qemu and installed qemu-kvm from the repos.  when I execute:
modprobe kvm-amd
I get the following:
libkmod: kmod_module_parse_depline: ctx=0xb9d010 path=/lib/modules/3.2.6-2-ARCH/kernel/arch/x86/kvm/kvm.ko.gz error=No such file or directory
When I had qemu installed the modprobe line just returned with no error, so I'm assuming that is good.
Not sure how to get windows 7 installed.  is this possible with KVM, or should I be using virtualbox/vmware?  I don't need graphic acceleration, and the same co-worker mentioned kvm gives him better windows performance over virtualbox or vmware.
what info can I provide to the forums that will help solve this issue?
Any help installing win7 in kvm is much appreciated.
--nixIT.
Last edited by nixIT (2012-03-06 20:10:32)

nixIT wrote:
modprobe kvm-amd
I get the following:
libkmod: kmod_module_parse_depline: ctx=0xb9d010 path=/lib/modules/3.2.6-2-ARCH/kernel/arch/x86/kvm/kvm.ko.gz error=No such file or directory
--nixIT.
That's probably related to an update you made to your system (pacman -Syu) that included the kernel and by simply rebooting you'll get rid of that error message.
HTH
Last edited by limaunion (2012-02-25 00:27:31)

Similar Messages

  • [SOLVED] KVM and Qemu fail after installation

    I tried installing Windows 7 and Vista with both Qemu and KVM.
    Installation goes fine but after Windows reboots during the installation I only get a strange screen after the bios. It shows some random characters, as shown in the image. I tried varying the filesystem (raw, qcow and qcow) and the memory size, etc. but nothing works, not even the standalone kvm project. Any suggestions?
    I used the following code to install the OS:
    qemu-img create -f qcow2 windows7.img 20G
    qemu -enable-kvm -boot d -m 1500 -hda windows7.img -cdrom win7.iso
    Last edited by Wilco (2009-11-29 08:26:59)

    I had the same problem. i have tried many things (even -vga std) but that screen always appear at reboot. because i really wanted to give w7 a try i have tested another windows 7 iso. VERDICT : IT WORKS PERFECTLY. so, just try with another iso.

  • [SOLVED] KVM Broken After Switch from KVM to Qemu-KVM

    Since I made the switch from KVM 88-1 to Qemu-KVM 0.11.0-1 yesterday, my virtual Win XP64 guest OS will not load; I just get a black screen. When I try safe mode, I can see that it is getting stuck on "acpitabl.dat."
    Here's the line I've always used to start it up,
    qemu-kvm -boot c -m 512 -hda win_xp.img -net nic,vlan=1 -net user,vlan=1 -localtime -k en-us -soundhw ac97 -vga std
    Does anyone have any ideas? Thanks in advance.
    Last edited by tony5429 (2009-11-27 05:03:43)

    I see that my user was not on 'kvm' group after the switch.
    When I added my user to de kvm group Qemu-KVM works like a charm.

  • [SOLVED]KVM error for Intel CPU

    KVM: entry failed, hardware error 0x80000021
    If you're running a guest on an Intel machine without unrestricted mode
    support, the failure can be most likely due to the guest entering an invalid
    state for Intel VT. For example, the guest maybe running in big real mode
    which is not supported on less recent Intel processors.
    It is OK for WinXP/Linux guest run at text, but it failed after entering graphic mode. How to resolve this problem, thansk very much
    Name           : qemu
    Version        : 1.4.0-2
    uname -a
    Linux myserver 3.7.10-1-ARCH #1 SMP PREEMPT Thu Feb 28 09:59:14 CET 2013 i686 GNU/Linux
    cat /proc/cpuinfo
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 14
    model name      : Intel(R) Core(TM) Duo CPU      U2500  @ 1.20GHz
    stepping        : 12
    microcode       : 0x54
    cpu MHz         : 1197.091
    cache size      : 2048 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 2
    apicid          : 0
    initial apicid  : 0
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dtherm
    bogomips        : 2395.93
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 32 bits physical, 32 bits virtual
    power management:
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 14
    model name      : Intel(R) Core(TM) Duo CPU      U2500  @ 1.20GHz
    stepping        : 12
    microcode       : 0x54
    cpu MHz         : 1197.091
    cache size      : 2048 KB
    physical id     : 0
    siblings        : 2
    core id         : 1
    cpu cores       : 2
    apicid          : 1
    initial apicid  : 1
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc arch_perfmon bts aperfmperf pni monitor vmx est tm2 xtpr pdcm dtherm
    bogomips        : 2395.93
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 32 bits physical, 32 bits virtual
    power management
    Last edited by netawater (2013-08-07 00:55:06)

    with code tags that post looks  a lot better, netawater.
    The lscpu output shows that virtualization is enabled four your system (didn't really doubt that, but wanted to be sure).
    Trying to break down your qemu start command to make clearer which options you use :
    (You can use multiple-line commands by ending each line with a / )
    /usr/bin/qemu-system-i386 /
    -name NewWinXP /
    -S /
    -M pc-i440fx-1.4 /
    -enable-kvm /
    -m 1024 /
    -smp 1,sockets=1,cores=1,threads=1 /
    -uuid b1e25e7e-7a2a-eded-13da-994512cc8898 /
    -no-user-config /
    -nodefaults /
    -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/NewWinXP.monitor,server,nowait /
    -mon chardev=charmonitor,id=monitor,mode=control /
    -rtc base=localtime /
    -no-shutdown /
    -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 /
    -drive file=/usr/local/virtimages/WinXP.img,if=none,id=drive-ide0-0-0,format=qcow2 /
    -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 /
    -drive file=/usr/local/virtimages/Tools.img,if=none,id=drive-ide0-0-1,format=qcow2 /
    -device ide-hd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1 /
    -netdev tap,fd=23,id=hostnet0 /
    -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:ff:8c:ee,bus=pci.0,addr=0x3 /
    -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 /
    -device usb-tablet,id=input0 /
    -vnc 127.0.0.1:0 /
    -k en-us /
    -vga std /
    -device ES1370,id=sound0,bus=pci.0,addr=0x4 /
    -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
    Apart from the fact you use a very specific set of hardware for the VM, i don't see anything special.
    A search with duckduckgo lead me to this german blog : virtualisierung-mit-kvm-und-virtuelle-netzwerke-mit-vde .
    (section KVM Hardware Error).
    The error the blog poster got looks very similar to yours, and was solved by applying a special parameter to the kvm_intel kernel module.
    try loading the module with
    modprobe kvm_intel emulate_invalid_guest_state=0
    and test if that solves the problem.
    (it's probably best to rmmod the kvm_intel module before giving the above command)

  • [SOLVED] KVM and Bridged Networking

    I've got KVM working and a Windows 2008 server installed on a image now, but it's only getting a NAT ip address. I need to get this server onto my main network, on Windows I'd use Virtual Box and Bridged Networking, but I thought I'd give KVM a try out.
    I've followed the setup at https://wiki.archlinux.org/index.php/KV … Networking
    Using Netcfg
    Bridged networking is used when you want your VM to be on the same network as your host machine. This will allow it to get a static or DHCP IP address on your network, and then you can access it using that IP address from anywhere on your LAN. The preferred method for setting up bridged networking for KVM is to use the netcfg package. You will also need to install bridge-utils.
    Netcfg#Configuring_a_bridge_for_use_with_virtual_machines_.28VMs.29
    And this page https://wiki.archlinux.org/index.php/Ne … _.28VMs.29
    I've got a bridge working I believe (all my stuff is DHCP by the way)
    Output of ifconfig
    br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 metric 1
    inet 192.168.1.52 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 fe80::21d:7dff:fea9:bb2f prefixlen 64 scopeid 0x20<link>
    ether 00:1d:7d:a9:bb:2f txqueuelen 0 (Ethernet)
    RX packets 2966 bytes 520670 (508.4 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 2351 bytes 1874150 (1.7 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500 metric 1
    ether 00:1d:7d:a9:bb:2f txqueuelen 1000 (Ethernet)
    RX packets 2977 bytes 570261 (556.8 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 2364 bytes 1875202 (1.7 MiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 45 base 0xc000
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 0 (Local Loopback)
    RX packets 72 bytes 7056 (6.8 KiB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 72 bytes 7056 (6.8 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    I've got "bridge" added to my rc.conf as a MODULE which is loaded. (I saw reference to this somewhere else on the forum that this might be needed)
    I'm starting my VM with the following command
    qemu-kvm -vnc 192.168.1.52:0 -hda Nekomi -m 2048 -smp 2 -net nic
    Yet I still can't get an IP outside of the 10.0.0.0 range on the VM.
    The VNC line above is because the HOST has not VGA output at all, completely headless.
    I'm trying to get this working and trying to learn at the same time. KVM is new to me, as is bridged networking on linux.
    Any ideas? Thanks
    Last edited by Naijeru (2012-09-18 16:28:20)

    Sorry for the delay, bit a PC rebuild occurred :-(
    Anyway, I managed to get this working with steps #1-#7 from the linked section. Thanks for that. I did have a few minor issues in getting a DHCP on the host machine itself, turns out I'd missed a single ) from the daemons section of rc.conf. A human error, but difficult to fix as the machine was rendered off the network and without a VGA card... fun!
    I diverge, I have this script to bring up a bridge when the qemu-kvm starts
    #!/bin/sh
    echo "Executing /etc/qemu-ifup"
    echo "Bringing up $1 for bridged mode..."
    sudo /sbin/ifconfig $1 0.0.0.0 promisc up
    echo "Adding $1 to br0..."
    sudo /usr/sbin/brctl addif br0 $1
    sleep 2
    But when the kvm shutdowns it complains it can't find qemu-ifdown script. So I'm thinking of making one but just want to check it over first.
    #!/bin/sh
    echo "Executing /etc/qemu-ifdown"
    echo "Removing $1 from br0..."
    sudo /usr/sbin/brctl delif br0 $1
    echo "Taking down $1 from bridged mode..."
    sudo /sbin/ifconfig $1 0.0.0.0 promisc down
    sleep 2
    I've reversed the logic here, is the above the correct way to bring down the guest interface?

  • Kernel KVM and Qemu

    Hi, I'm sure this is a daft question, but prior to the .20+.21 kernels, I was happily using the apt-packages qemu 0.9.0-1 and kqemu 1.3.0pre11-6. Now with a .21 kernel, I can load the kvm module in (which doesn't support the major=0 module options), but qemu fails to use it.  What should I be doing to use qemu with the new kvm modules? sorry, I've read the wiki, but it seems out of date for these newer kernels ?

    Thanks very much!!
    Hi, I've built kvm-17 (to which i had to manually add arch=x86_64) , and modprobed in kvm-intel,  however the qemu-system_x86-64 binary seems to run images very slowly, and in /var/log/messsages I see a large number of ' rtc: lost some interrupts at 1024Hz.' statements.
    Reading around the KVm/Qemu FAQs I see a comment about turning on 'CONFIG_HPET_EMULATE_RTC=y', I'm guessnig this is a kernel configuration propery??.  is anyone else using KVM on 64?

  • [Solved] KVM-84

    I have not succeeded to install KVM 83/84 on Arch x86-64. I followed both:
    http://wiki.archlinux.org/index.php/Kvm   and
    http://bbs.archlinux.org/viewtopic.php?id=55387.
    Both didnt help me.
    Any chance for someone to put up PKGBUILD?
    Thx
    Last edited by gluni (2009-03-04 07:54:57)

    gluni - if you put [solved] in the topic, you should also post the solution.

  • [Solved]KVM Modules

    how can i enable kvm module to run qemu with kvm
    please help
    Last edited by ibenomar (2014-03-02 13:51:19)

    Seems you have found an answer. Can you please post it here, so that others can benefit?
    I have no way of knowing if reading the wiki was all that was necessary to fix your issue.

  • [SOLVED] KVM Virtual machine using virt-install on a LVM partition

    Hello,
    I am far from an expert, and I am trying to build a virtual machine (debian squeeze) on my Arch 64 bits host. The VM will serve as a server with usual services (http, mail, ftp, media server etc). This is only for my own purpose and I do it as a hobby.I have no obligation to success, and more important I want to understand everything i do. I have some doubts, so why my post here.
    I want to install the VM on a LVM partition.
    -I first create successfully a LVM partition on /dev/sda4
    $fdisk -l /dev/sda
    /dev/sda4 1925115904 2949116309 512000203 8e LVM Linux
    I will install the VM (named "daffodil") on a 200G Logical Volume on groupe vg0
    $ lvcreate –n lv_daffodil –L 200G vg0
    Logical volume “lv_daffodil” created
    Now I need to create the VM. I want to use virt-install IN COMMAND LINE. After days an days of reading (and headache), here is what i think is the correct command :
    virt-install --connect qemu:///system --name=daffodil --ram 8192 --cpu host
    --disk path=/dev/vg0/lv_daffodil,size=200,bus=virtio,sparse=false,format=raw --cdrom /var/lib/libvirt/images/isofiles/debian-6.0.4-amd64-netinst.iso
    --description="daffodil (debian squeeze) - vm guest on host magnolia" --graphics vnc --os-type=linux --os-variant=debiansqueeze
    --network bridge:br0 --video=vga --hvm --accelerate
    So my questions :
    Is the command correct and academic?
    I think size=200 is maybe not needed, as the LV has already be created. Right?
    format=raw seems weird to me and not needed. Right?
    My host has 16G RAM. Shall I put 16 as --ram argument or stay with 8 ?
    How about the filesystem? I want an ext4. Shall I create it on lv_daffodil BEFORE the install or will I do it under the install process when partitioning?
    Any advantage in creating smaller than 200G logical volume, even if I want my VM have enough space (The whole HD is 2T)?
    Not sure about the --accelerate argument
    Any hint for optimization?
    As a n00b ++, will I be able to manage SELinux on my server, as it seems a litle bit tricky?
    what about --noautoconsole argument?
    Thank you for your help and knowledge.
    Last edited by gabx (2012-05-02 10:39:16)

    As I didn't have any answer in one week, I suscribed to [email protected]
    For those of you interested in KVM, find below a script doing excatly the needed job.
    #!/bin/bash
    #created Thursday April 26 2012
    #following Richard W.M.Jones <[email protected]> advices and script
    #this script can be changed according your own need. This one will
    #install a debian VM called daffodil on a LVM partition, with 2 CPU, 8192 RAM
    # Script used to install VMs.
    # You have to lvcreate the disk first!
    # lvcreate -L sizeG -n $name vg_data
    set -e
    name=daffodil
    cpus="--cpu=host --vcpus=2"
    disk="--disk path=/dev/vg0/lv_daffodil"
    location="--cdrom /var/lib/libvirt/images/isofiles/debian-6.0.4-amd64-netinst.iso
    type="--os-type=linux"
    variant="--os-variant=debiansqueeze"
    graphics="--graphics spice"
    bus="virtio"
    network="--network bridge=br0"
    virt-install -n $name -r 8192 \
    $name $cpus $type $variant $disk $location $graphics $bus $network
    To answer to some of my queries in first post:
    no need to give the size as I want to use the full lvm I created first. Virt-install will pick up the size
    the filesystem will be created during install
    CPU amount should be less than the host, as well as CPU numbers.
    --accelerate argument is no more needed
    spice give usually better graphic results than vnc

  • [SOLVED] After qemu update: KVM does not work anymore

    Hi,
    I used to use qemu-kvm, as in
    qemu-kvm \
    -net nic,vlan=1 -net user,vlan=1 \
    -drive file=/home/flash-vm/hdd0,if=virtio,cache=writethrough \
    -vga std -vnc localhost:2 -usbdevice tablet \
    -m 1024
    However, now qemu-kvm has been removed. If I replace "qemu-kvm" with "qemu-system-x86_64" and try to run it with an extra argument  "-machine accel=kvm" or "-enable-kvm", what I get is
    Could not access KVM kernel module: Permission denied
    failed to initialize KVM: Permission denied
    The kernel modules are there:
    # lsmod | grep kvm
    kvm_intel 124064 0
    kvm 384721 1 kvm_intel
    and the processor is
    $ lscpu
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 4
    On-line CPU(s) list: 0-3
    Thread(s) per core: 2
    Core(s) per socket: 2
    Socket(s): 1
    NUMA node(s): 1
    Vendor ID: GenuineIntel
    CPU family: 6
    Model: 37
    Stepping: 5
    CPU MHz: 1197.000
    BogoMIPS: 5321.24
    Virtualization: VT-x
    L1d cache: 32K
    L1i cache: 32K
    L2 cache: 256K
    L3 cache: 3072K
    NUMA node0 CPU(s): 0-3
    I have added my user to the group kvm as well, as instructed by pacman. Any help would be much appreciated!
    Last edited by ffcitatos (2013-03-07 06:47:06)

    Interestingly, mine worked without being in the new group. However, I think that's because I hadn't logged out since the update, so the session didn't know that I had been removed from the group. Though I could be missing something.

  • Resize2fs fails; kvm-qemu; ext4; lvm2 [SOLVED]

    the problem:
    * a virtual machine (varch3) is created with kvm-qemu where /dev/sda on the guest is logical volume /dev/vg0/varch3 on the host with the following command:
         $ sudo /usr/local/kvm/bin/qemu-system-x86_64 /dev/vg0/varch3 -m 1024 -smp 2 -net nic,macaddr=00:16:3e:73:86:97 -net tap -nographic
    * here are the partitions on the guest (primary partitions):
         $ df -h
         Filesystem            Size  Used Avail Use% Mounted on
         /dev/sda3             7.3G  1.4G  5.5G  21% /
         none                  501M     0  501M   0% /dev/shm
         /dev/sda1              38M  9.7M   27M  27% /boot
         /dev/sda4             2.4G  104M  2.2G   5% /home
    * /home on varch3 is too small so /dev/vg0/varch3 is extended from 10G to 210G:
          $ sudo lvextend -L +200G /dev/vg0/varch3 /dev/sdc2
          $ sudo lvscan
          ACTIVE            '/dev/vg0/varch3' [210.00 GB] contiguous
    * it is expected that the guest will see a /dev/sda that is now 210G instead of 10G
    * after logging into the guest, i unmounted /dev/sda4 and attempted to increase the size of this primary partition with resize2fs:
         $ sudo e2fsck /dev/sda4
         e2fsck 1.41.5 (23-Apr-2009)
         /dev/sda4: clean, 191/155648 files, 36355/622518 blocks
         $ sudo resize2fs -f /dev/sda4 200G
         resize2fs 1.41.5 (23-Apr-2009)
         Resizing the filesystem on /dev/sda4 to 52428800 (4k) blocks.
         resize2fs: Invalid argument while trying to resize /dev/sda4
    * in an attempt to understand this cryptic result i ran cfdisk on /dev/sda4:
                                                                                                                                                               cfdisk (util-linux-ng 2.14.2)
                                                                                                                                                                    Disk Drive: /dev/sda
                                                                                                                                                             Size: 225485783040 bytes, 225.4 GB
                                                                                                                                                   Heads: 255   Sectors per Track: 63   Cylinders: 27413
                     Name                                               Flags                                             Part Type                                  FS Type                                                              [Label]                                                      Size (MB)
                     sda1                                               Boot, NC                                           Primary                                   Linux ext2                                                                                                                            41.13                                       
                     sda2                                                                                                         Primary                                   Linux swap / Solaris                                                                                                                 271.44
                     sda3                                                                                                         Primary                                   Linux ext3                                                                                                                          7871.60
                     sda4                                                                                                         Primary                                   Linux ext3                                                                                                                          2549.84
                                                                                                                                                                                      Unusable                                                                                                                          214745.62
    the questions:
    * how is it possible that the space on /dev/sda4 is known AND unusable?
    * what do i need to do to get a larger /home on varch3?
    TIA
    Last edited by poopship21 (2009-08-03 21:15:53)

    for some reason, the MBR can hold up to four primary partitions and zero extended partitions or up to three primary partitions and an arbitrary number of extended partitions.  i dont know exactly why this is the case but i can accept it and go on with my life.  intuitively, the space which is not part of the existing primary partitions could be made into another partition since cfdisk must be able to see the beginning and ending blocks, and therefore every block in between in order to know the size of the unused space.  i guess that the four-partition maximum is just a convention which reflects the limitations of legacy systems.
    Last edited by poopship21 (2009-08-03 21:15:41)

  • [QEMU/KVM] Use KVM switch to switch mouse/kayboard between host and VM

    I finally have my QEMU/KVM setup running and working as I want it, except for one thing. I have a KVM switch (a piece of hardware not the hypervisor ) to switch audio and video. It also offers the feature to switch mouse/keyboard between to Computers. Here is the relevant excerpt from my lsusb:
    Bus 002 Device 048: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 002 Device 047: ID 0557:8021 ATEN International Co., Ltd CS1764A [CubiQ DVI KVMP Switch]
    Bus 002 Device 046: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 002 Device 045: ID 0557:8021 ATEN International Co., Ltd CS1764A [CubiQ DVI KVMP Switch]
    The device named "Logitech, Inc. Unifying Receiver" is the dongle for my mouse and keyboard. The first problem is that both devices (in both states of the switch they both appear) have the same device id 046d:c52b. This can be solved by telling qemu to identify the device by #bus.#device instead of the id. The problem is that after each switching the device number increases. This makes sense as for the system the switching process is as if the device was unplugged and plugged in in a different usb port. Therefore the device would probably be disconnected from the VM when it was assigned on the VM's startup (is there a way to add usb devices on the fly to a vm without typing an add_usb command in the qemu shell). Do you have any ideas what I could do?
    EDIT: Just found about QMP. Would it be possible to save an initial condition (mouse/keyboard is on host) and fetch new devices busses after switching (udev?) and switch the saved sate? If the state is now "m/k should be on the vm" one could send qemu an adequate add command.
    EDIT2: I found out that my mainboard's usb is organized using 3 usb controllers (2x2.0, 1x3.0 each with 4 ports). I want to pass one of those PCI controllers to the VM but all I get is a black screen.
    EDIT3: I tried the other usb controller and it worked. Well, kind of. I moved the mouse in a circle and made a right click. Than I was not able to use the mouse or the keyboard anymore. Should I consider buying a PCI USB2.0 controller as that might be easier to forward?
    Last edited by fkoehler (2015-04-29 23:50:07)

    This article has someinteresting information in the comments. You don't have to use a kvm switch neccessarily. I for one prefer a software solution.
    Okay, so to make things clear: I do not switch keyboard/mouse. I keep them shared between both OS, using Synergy. The host OS runs a web server, and the guest OS runs a client – they exchange mouse position information, so that at any time only one of them receives ‘clicks’. This is great for both multi- and single-monitor setups.
    Another story is that I have two video outputs connected to a single monitor, and I would like to switch between them without using the buttons on the monitor itself. For this, I use the I2C that is embedded within HDMI or DP.
    Almost all monitors support DDC, but there are scarce apps that can make us of it. There is DDCcontrol for linux, but it is completely outdated, and failed to work with my particular monitor. So I ended up getting to know the VESA DDC standard, reading the source of that tool and several similar ones, and created a simple C program (source) that works in case of my setup. Most likely it will not work elsewhere, but it should give you a nice starting point for communicating with the monitor. The fragile spots are line 41 – you may need to change the i2c bus number the the one correct for your system, and you may need to prepare other data to send to the monitor (68 and 71) if you want to switch between other outputs than I do. Refer to the standard in order to prepare them.
    As for how to change his source code to help you, I am not of much help right now as I do not know the DDC protocol. Hope that helps.
    Last edited by noctlos (2015-04-30 16:01:45)

  • [SOLVED] No sound in VMs on top of qemu 1.3

    After replacing qemu-kvm with qemu 1.3.x, I can't get sound to work in my VMs. The devices are properly recognized inside VM, alsamixer shows all controls OK, but speaker-test doesn't produce any sound.
    On the host, the sound works, so it's not a permissions issue. The guests are archlinux and archbang, all running systemd and polkit... There are no error messages in host logs or terminal which I use to call qemu (except the OSS complaints).
    Does anyone have an idea how to investigate this further?
    TIA.
    Last edited by Leonid.I (2013-02-08 18:47:46)

    Well, scratch that.
    It turns out that I was stupid and forgot to set QEMU_AUDIO_DRV=alsa before calling qemu... Now the sound works

  • [CLOSED] install windows 7 in kvm/qemu

    Hey all,
    running arch 64, and just installed kvm and qemu by following the wiki:
    https://wiki.archlinux.org/index.php/Qe … ws_version
    https://wiki.archlinux.org/index.php/Kvm
    when I try to install windows 7 32bit:
    qemu-system-x86_64 -hda win7-32 -m 3072 -cdrom win7cd.iso -boot d -vga std
    The installer starts, and then right after I select my language, and click the "Install Now" button, windows appears to hang.  I can move the mouse around the virtualized window, but it just sits there.  I let it be for over and hour and nothing.
    Has anyone installed windows 7 32bit in KVM/qemu?
    Thanx in advance.
    Last edited by nixIT (2012-02-24 19:37:51)

    jelly wrote:It worked for me ~ 1  year ago with qemu-kvm. You could ask around in #kvm in freenode or try to use virtio disks ( you need to find the driver for it on the internet for windows) which will boost I/O performance. The default -hda is ide and terrible slow when installing windows..
    Thanx, that's what I've been reading up on, but am a bit confused on how to set up the virtio disks.  I have the driver pulled from the fedora forums.   how can I set it up with virtio disks?  I've seen a post, but it looks like it's talking about setting it up on an already installed windows client.

  • Kvm: qemu with option "-enable-kvm" or kvm-84 from AUR?

    whats the difference between the two? Which one should be preferred?
    thanks!

    Yeah, my bad.  The patches to qemu would come from upstream KVM, like they did before.  Avi Kivity, not Tobias.  My mistake there.
    And yeah, I think some of those distinctions are us using different semantics.  I'd call the qemu implementation that Avi maintains a fork -- but that is different to me than, as you worded it, kvm being a fork of qemu.  When saying "kvm" and referring to a chunk of code, not what I'll call for this conversation's sake "the kvm project," has always referred to the kvm module -- the kernel code, again hence the name.  Back when the userspace code was just a set of patches to qemu, this confusion was rarer.  (Even after the kvm project started maintaining their own version of the code, they also maintained the qemu patch set to apply to the qemu project -- their version was just qemu, pre-patched.  Avi discusses that philosophy of modifying the original code as little as possible in his most recent blog a few months ago.)  The kvm userspace code is -- again, by Avi's own description -- qemu and libkvm.  (http://www.linux-kvm.org/page/Code - "The kvm userspace code (libkvm and qemu) is available through a git tree.")  kvm-the-project does maintain a prepatched qemu, but that doesn't make it kvm's code -- particularly when kvm's intent all along was to have their patches accepted by qemu, which they now have.  So while you can say that kvm-the-project has within it a build of qemu -- and if you wanted, you could even call it a fork, though the maintainer declines to use the term -- qemu is not kvm.
    I'd also add that though the gray area there exists, from a future-discussion perspective it does make things a lot clearer if we refer to kvm the module, the "pure" build of qemu, and kvm's qemu build (or qemu-kvm) as separate.
    And by extension, no, kvm-userspace has not reached 10.0.0.  There's a reason that the kvm userspace code just has build numbers.  Its version number is 85.  It would make a lot of sense to say that the kvm-maintained patches were modified and applied to qemu upstream to make qemu 10.0.0, but the post-10 stability patches for kvm were applied independently to qemu and qemu-kvm -- qemu-kvm basically getting just kvm-related stability patches, which are submitted upstream to qemu (and thus qemu-kvm moving up in build number), and qemu using the qemu-kvm patches as well as patches relating to other parts of the system.
    Getting back to the meat of the question, it is important to note that the kvm we're getting from the arch package is NOT the kvm that you would get from building the download file.  You called it clean, and you're absolutely right -- it's *too* clean.  Download the KVM package from sourceforge, build, and do a make -n install; you get:
    make -C kernel DESTDIR="" install
    make -C libkvm DESTDIR="" install
    make -C qemu DESTDIR="" install
    Which makes sense if you read their docs -- the KVM build, as per KVM, come as a (independent of the kernel) set of modules and a QEMU build to go with those modules, just like it was before it was accepted by linux-kernel.  (You could probably have noticed that kernel modules were being build when you run make, but there was so much stuff in there that I thought it easier to cut/paste the install phase for clarity.)  The Arch PKGBUILD, however, just compiles qemu-kvm and its necessary libraries:
    for dir in libkvm user qemu extboot; do
            cd ${srcdir}/kvm-${pkgver}/${dir}
            make || return 1
        done
    and then hand-installs those components without the kernel modules meant to go with it.  Unless the package builder knows something the KVM developer doesn't, I wouldn't go around using that qemu build with whatever KVM module version from whatever different kernel version you may have willy-nilly.
    If I had the hankering to run the KVM maintained userspace stuff, I'd do what they said and run their kernel stuff too.  I think a proper KVM build should do that.  But that's not my call, since I'm not the extra maintainer.  As it stands, for me I'd rather use the in-kernel version, which I think will get the kernel-side patches that the KVM project's kernel code gets anyway since there is so much attention on the kernel, but also has the benefit of the qemu userspace code getting bug fixes from the qemu devs themselves.  It sounded to me like that was the direction kvm itself was moving.  But to each their own, of course.  I'd just say better to stick all the way with one or all the way with the other method, and not just start making hybrids without a much deeper knowledge of the code than I think any of us have.
    Last edited by slinkygn (2009-05-04 02:11:30)

Maybe you are looking for

  • How do I get firefox to ask if I want to view or save downloads?

    I used to be able to click on the attachment download link and it would ask me if I wanted to view or save the file. Now it only allows me to save the file! How do I change this back to previous way that was better?

  • Query to find patches that were applied using admrgpch

    Hi, I Hav a query to find what are all patches merged and applied using admrgpch.Here,From the output I am concluding that, all the bugs that were fixed during a specific time were merged and applied using admrgpch. Could u please suggest my approach

  • What are the selections when defining a job triggered by an event?

    I use SM36 by defining a job triggered by an event. I click "Start conditions" button, then click "After event" button and place the event name.  I wonder if I would have to continue to click the button "Immediate" button and save it?  or just save i

  • How to view details of excluded items?

    I have 3 partitions that time machine wants to backup. Two of the partitions are similar (one is Panther the other is Leopard), and they have similar structures (ie, they have /System, /Library, /Users etc..). There are only certain directories from

  • Creating sequence in Pointbase db

    Hi, i am a student trying to develop a database using Pointbase by Sun Microsystems. Does anyone know the SQL coding for creating a sequence in pointbase because the SQL coding is slightly different compared to Oracle. In Oracle the normal coding wou