Qemu-kvm on real partition

Hello,
I am a new user of Archlinux coming from  Gentoo. I know also a little bit FreeBSD  and I am appreciating Archlinux that has the flexibility of Gentoo and the cleaning of FreeBsd structure.
After a successufull Archlinux install, I am trying to run with qemu-kvm a Linux distro (Gentoo) installed on another partition of my hard-disk as explained in Qemu page in Archlinux wiki (paragraph "Using any real partition as the single primary partition of a hard disk image"), but the virtualizer Qemu starts and hangs.
I am not sure about the command used to create the raid device and format it.
There is anyone that has already tried this configuration and can post the exact command line used to format the raid device and create also the bootloader ?
Take into account that qemu-kvm is rightly installed because it is working with a Windows7, Wxp and Ubuntu guests.
Thanks for your help, fabio

IT'S WORKING |||
I have some problem with assignment of right /dev/sdx in grub entry because Gentoo inverted hw-disk /dev/sda with /dev/sdb, but this method it's perfectly working with Ubuntu and Windows-XP.
Someone should amend the Qemu wiki pages inserting the method suggested by Odysseus that, by the way, it seems to me closer to archlinux-style-of-life (kiss) instead of the complicated md-array.
Thanks a lot, Odysseus; I will continuiing to explore Archlinux.
fabio

Similar Messages

  • Problems in starting windows using qemu-kvm from arch

    Hello,
    I am facing problems in launching windows XP & 7 using qemu-kvm / qemu from arch. I have arch 2010.05 installed (kernel 2.6.33.4) which has kvm.ko, intel & amd modules. System is Intel Core 2 Duo 3.0GHz. Windows XP is installed on partition 0 (real) and i am trying to start windows from that real partition using qemu-kvm.
    I installed qemu-kvm using pacman -S qemu-kvm. I am running modprobe kvm and modprobe kvm-intel. Also, i have added username to kvm group.
    Command -
    qemu-kvm /dev/sda - I have grub menu.lst which gives me list and i am selecting windows to boot but windows does not start. I can see startup but then fails.
    qemu-kvm /dev/sda1 - sda1 has windows. With this qemu-kvm just hangs at Booting from Hard-disk...
    qemu-kvm -no-kvm /dev/sda - Selecting windows but this time get Windows XP activation error however i can boot same windows XP directly without any error.
    For Windows 7 - I have another HDD with Windows 7 installed on partition 0 and Arch. Everytime when i try to start Windows 7 using qemu-kvm (with kvm or without kvm) it gives blue screen with STOP: 0x... If i start Windows 7 directly it works fine.
    Also, i downloaded kernel 2.6.35 and built with KVM but still facing same problems. I also tried with qemu.
    Can anyone help me in resolving this issue? I want to qemu-kvm Windows from real partition. Let me know if it is not possible.
    Am i missing any installation/configuration steps?
    I searched on google and on arch forum/wiki but was not able to resolve this issue. Let me know if you need more details.
    Thank you,
    Satish.
    Last edited by satishk (2010-10-18 15:21:06)

    satishk wrote:Hi,
    Do i need to create two hardware profiles in Windows or Linux?
    the hardware profiles are only needed for windows , linux guest doesn't need it (unless you have compiled your own kernel without more then 1 HDD controller..  specifically for the guest)
    satishk wrote:1. Can i run qemu-kvm from linux kernel with only command support. No desktop environment installed (X11)? If yes, what is the procedure?
    qemu-KVM uses SDL, NOT X11 .
    added : SDL can be installed seperately, it doesn't require X11 .
    you can run qemu-kvm without SDL by using a special startup parameter, -nodisplay
    you have to connect with a serial connection to get to the console of the VM.
    satishk wrote:2. If i restart/shutdown from quest OS that is windows in my case, is it possible to restart/shutdown the complete system (i.e. host OS
    too)?
    you can do that by using a bash script to start the VM, that script can also be used to stop the host.
    satishk wrote:3. Whether Windows would be able to detect USB drivers and other devices by default or i need to do anything special in qemu-kvm?
    USB devices are normally detected, although you have to test how well they work.
    You may have to use udev rules to prevent the host from using those devices, they can't be used by both host and guest at the same time.
    Network cards will not be detected, but you can link a physical network device with qemu-kvm virtual network devices.
    search for qemu documentation, it also applies to qemu-kvm.
    Last edited by Lone_Wolf (2010-10-22 18:35:13)

  • Qemu-kvm guest virtio networking halts

    Hi,
    I recently switched from Debian to Archlinux, but seems to have stumbled on a bug that has made the transition a bit painfull since i rely on virtualization.
    Overview:
    qemu-kvm guests network interface dies after "some"  traffic over nfs via virtio interface.
    Using e1000 instead of virtio network seems to solve the problem som far... but at a cost of performance.
    Any suggestions on how to resolve the issue or how to work around the problem without sacrificing performance?
    How to reproduce:
    Configure the guest to use virtio as network driver and attach the interface to a bridge that the hosts has a configured interface on.
    Export a share with a large amount of data over nfs from the host and read that data over nfs from the guest.
    ( what is funny/strange is that i could not get nuttcp to force the problem... )
    Detail:
    My guest are connected via tap interfaces to a bridge on my host and they are using virtio.
    After retreiving "some" network traffic from the host over nfs the guests interface stops receiving traffic and logs "page allocation failure. order:0, mode:0x20" ( Log included below )
    - tshark on guest verifies guest sending arp requests but not receiving arp reply
    - tshark on host show that the host is both receiving arp request and sending arp reply
    Guests are running with the following parameters:
    %sudo /usr/bin/qemu-system-x86_64 -M pc-0.11 -enable-kvm -m 512 -smp 1 -name myguest -boot c -drive file=/mnt/myguest.img,if=virtio,index=0,boot=on -net nic,vlan=0,model=virtio,name=virtio.0 -net tap,vlan=0,name=tap.0,ifname=tap0 -serial pty -parallel none -usb -vnc 0.0.0.0:10 -k sv -vga std
    host is currently running:
    qemu-kvm 0.11.0-1
    testing/kernel26 2.6.32-1
    testing/kernel26-firmware 2.6.32-1
    guest is currently running
    testing/kernel26 2.6.32-1
    testing/kernel26-firmware 2.6.32-1
    kernel from testing on both host/guest was a attempt to work around a potential issue in 2.6.30 but the fault is present with both kernels.
    I don't belive that the problem lies on the archlinux guest since a Debian(Lenny) guest experiances the same problem.
    The same guest on the same hardare running on Debian(Lenny) as a host works fine.
    from /var/log/messages
    2009-12-14T00:10:58.160723+01:00 myguest kernel: tar: page allocation failure. order:0, mode:0x20
    2009-12-14T00:10:58.160809+01:00 myguest kernel: Pid: 31303, comm: tar Not tainted 2.6.32-ARCH #7
    2009-12-14T00:10:58.160821+01:00 myguest kernel: Call Trace:
    2009-12-14T00:10:58.160859+01:00 myguest kernel: <IRQ> [<ffffffff810d5778>] ? __alloc_pages_nodemask+0x6b8/0x700
    2009-12-14T00:10:58.160864+01:00 myguest kernel: [<ffffffffa019cb4b>] ? try_fill_recv+0x8b/0x1c0 [virtio_net]
    2009-12-14T00:10:58.160869+01:00 myguest kernel: [<ffffffffa019d57d>] ? virtnet_poll+0x3ad/0x6e0 [virtio_net]
    2009-12-14T00:10:58.160872+01:00 myguest kernel: [<ffffffff8129146a>] ? net_rx_action+0x15a/0x2a0
    2009-12-14T00:10:58.160876+01:00 myguest kernel: [<ffffffffa019c2b5>] ? skb_recv_done+0x25/0x40 [virtio_net]
    2009-12-14T00:10:58.160884+01:00 myguest kernel: [<ffffffff8105d177>] ? __do_softirq+0xd7/0x240
    2009-12-14T00:10:58.160887+01:00 myguest kernel: [<ffffffff810131dc>] ? call_softirq+0x1c/0x30
    2009-12-14T00:10:58.160891+01:00 myguest kernel: <EOI> [<ffffffff81015315>] ? do_softirq+0x65/0xa0
    2009-12-14T00:10:58.160894+01:00 myguest kernel: [<ffffffff8105d07e>] ? local_bh_enable+0xae/0xb0
    2009-12-14T00:10:58.160901+01:00 myguest kernel: [<ffffffff81291f44>] ? dev_queue_xmit+0x144/0x4e0
    2009-12-14T00:10:58.160905+01:00 myguest kernel: [<ffffffff812c1b36>] ? ip_queue_xmit+0x196/0x440
    2009-12-14T00:10:58.160908+01:00 myguest kernel: [<ffffffff812a82de>] ? sch_direct_xmit+0x6e/0x1e0
    2009-12-14T00:10:58.160912+01:00 myguest kernel: [<ffffffff812d61c8>] ? tcp_transmit_skb+0x3a8/0x750
    2009-12-14T00:10:58.160915+01:00 myguest kernel: [<ffffffff812d875c>] ? tcp_write_xmit+0x1ec/0xa10
    2009-12-14T00:10:58.160923+01:00 myguest kernel: [<ffffffff812890bf>] ? __alloc_skb+0x6f/0x180
    2009-12-14T00:10:58.160926+01:00 myguest kernel: [<ffffffff812d8fe3>] ? __tcp_push_pending_frames+0x23/0x90
    2009-12-14T00:10:58.160930+01:00 myguest kernel: [<ffffffff812cb9e9>] ? tcp_sendmsg+0x8b9/0xbb0
    2009-12-14T00:10:58.160933+01:00 myguest kernel: [<ffffffff8127f95e>] ? sock_sendmsg+0x12e/0x150
    2009-12-14T00:10:58.160940+01:00 myguest kernel: [<ffffffff81074040>] ? autoremove_wake_function+0x0/0x30
    2009-12-14T00:10:58.160944+01:00 myguest kernel: [<ffffffff8127fd79>] ? kernel_sendmsg+0x39/0x50
    2009-12-14T00:10:58.160947+01:00 myguest kernel: [<ffffffffa0291292>] ? xs_send_kvec+0x82/0x90 [sunrpc]
    2009-12-14T00:10:58.160951+01:00 myguest kernel: [<ffffffffa02912f4>] ? xs_sendpages+0x54/0x200 [sunrpc]
    2009-12-14T00:10:58.160955+01:00 myguest kernel: [<ffffffffa02915d8>] ? xs_tcp_send_request+0x58/0x190 [sunrpc]
    2009-12-14T00:10:58.160962+01:00 myguest kernel: [<ffffffffa028ee3c>] ? xprt_transmit+0x7c/0x300 [sunrpc]
    2009-12-14T00:10:58.160966+01:00 myguest kernel: [<ffffffffa028bf3f>] ? call_transmit+0x18f/0x2b0 [sunrpc]
    2009-12-14T00:10:58.160969+01:00 myguest kernel: [<ffffffffa029437a>] ? __rpc_execute+0xaa/0x2b0 [sunrpc]
    2009-12-14T00:10:58.160973+01:00 myguest kernel: [<ffffffffa028cae1>] ? rpc_run_task+0x31/0x80 [sunrpc]
    2009-12-14T00:10:58.160980+01:00 myguest kernel: [<ffffffffa0323d1e>] ? nfs_read_rpcsetup+0x17e/0x1e0 [nfs]
    2009-12-14T00:10:58.160984+01:00 myguest kernel: [<ffffffffa03238b0>] ? readpage_async_filler+0x0/0x190 [nfs]
    2009-12-14T00:10:58.160988+01:00 myguest kernel: [<ffffffffa03238b0>] ? readpage_async_filler+0x0/0x190 [nfs]
    2009-12-14T00:10:58.160991+01:00 myguest kernel: [<ffffffffa032158a>] ? nfs_pageio_doio+0x2a/0x70 [nfs]
    2009-12-14T00:10:58.160995+01:00 myguest kernel: [<ffffffffa032161b>] ? nfs_pageio_add_request+0x4b/0xf0 [nfs]
    2009-12-14T00:10:58.161003+01:00 myguest kernel: [<ffffffffa03239aa>] ? readpage_async_filler+0xfa/0x190 [nfs]
    2009-12-14T00:10:58.161007+01:00 myguest kernel: [<ffffffffa03238b0>] ? readpage_async_filler+0x0/0x190 [nfs]
    2009-12-14T00:10:58.161010+01:00 myguest kernel: [<ffffffff810d7dc1>] ? read_cache_pages+0xa1/0x100
    2009-12-14T00:10:58.161014+01:00 myguest kernel: [<ffffffffa03234bd>] ? nfs_readpages+0x19d/0x2b0 [nfs]
    2009-12-14T00:10:58.161021+01:00 myguest kernel: [<ffffffffa0324230>] ? nfs_pagein_one+0x0/0xe0 [nfs]
    2009-12-14T00:10:58.161024+01:00 myguest kernel: [<ffffffff810d7709>] ? __do_page_cache_readahead+0x1c9/0x280
    2009-12-14T00:10:58.161028+01:00 myguest kernel: [<ffffffff810d77dc>] ? ra_submit+0x1c/0x30
    2009-12-14T00:10:58.161031+01:00 myguest kernel: [<ffffffff810d0629>] ? generic_file_aio_read+0x339/0x600
    2009-12-14T00:10:58.161035+01:00 myguest kernel: [<ffffffff8110edb2>] ? do_sync_read+0xe2/0x120
    2009-12-14T00:10:58.161042+01:00 myguest kernel: [<ffffffff81074040>] ? autoremove_wake_function+0x0/0x30
    2009-12-14T00:10:58.161045+01:00 myguest kernel: [<ffffffff81331212>] ? preempt_schedule_irq+0x42/0x70
    2009-12-14T00:10:58.161049+01:00 myguest kernel: [<ffffffff8104ad02>] ? finish_task_switch+0x42/0xc0
    2009-12-14T00:10:58.161052+01:00 myguest kernel: [<ffffffff8110fb65>] ? vfs_read+0xb5/0x1a0
    2009-12-14T00:10:58.161059+01:00 myguest kernel: [<ffffffff8110fd3e>] ? sys_read+0x4e/0x90
    2009-12-14T00:10:58.161063+01:00 myguest kernel: [<ffffffff81012e8b>] ? device_not_available+0x1b/0x20
    2009-12-14T00:10:58.161066+01:00 myguest kernel: [<ffffffff81012042>] ? system_call_fastpath+0x16/0x1b
    2009-12-14T00:10:58.161068+01:00 myguest kernel: Mem-Info:
    2009-12-14T00:10:58.161071+01:00 myguest kernel: DMA per-cpu:
    2009-12-14T00:10:58.161077+01:00 myguest kernel: CPU 0: hi: 0, btch: 1 usd: 0
    2009-12-14T00:10:58.161080+01:00 myguest kernel: DMA32 per-cpu:
    2009-12-14T00:10:58.161083+01:00 myguest kernel: CPU 0: hi: 186, btch: 31 usd: 137
    2009-12-14T00:10:58.161086+01:00 myguest kernel: active_anon:887 inactive_anon:896 isolated_anon:0
    2009-12-14T00:10:58.161089+01:00 myguest kernel: active_file:4740 inactive_file:112288 isolated_file:0
    2009-12-14T00:10:58.161092+01:00 myguest kernel: unevictable:0 dirty:8 writeback:0 unstable:0
    2009-12-14T00:10:58.161099+01:00 myguest kernel: free:728 slab_reclaimable:1589 slab_unreclaimable:1798
    2009-12-14T00:10:58.161102+01:00 myguest kernel: mapped:1605 shmem:17 pagetables:332 bounce:0
    2009-12-14T00:10:58.161111+01:00 myguest kernel: DMA free:1988kB min:84kB low:104kB high:124kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:13860kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15352kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:16kB slab_unreclaimable:56kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    2009-12-14T00:10:58.161119+01:00 myguest kernel: lowmem_reserve[]: 0 489 489 489
    2009-12-14T00:10:58.161162+01:00 myguest kernel: DMA32 free:924kB min:2784kB low:3480kB high:4176kB active_anon:3548kB inactive_anon:3584kB active_file:18960kB inactive_file:435292kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:500896kB mlocked:0kB dirty:32kB writeback:0kB mapped:6420kB shmem:68kB slab_reclaimable:6340kB slab_unreclaimable:7136kB kernel_stack:1104kB pagetables:1328kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
    2009-12-14T00:10:58.161167+01:00 myguest kernel: lowmem_reserve[]: 0 0 0 0
    2009-12-14T00:10:58.161171+01:00 myguest kernel: DMA: 1*4kB 0*8kB 0*16kB 2*32kB 2*64kB 2*128kB 2*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 1988kB
    2009-12-14T00:10:58.161179+01:00 myguest kernel: DMA32: 93*4kB 1*8kB 2*16kB 0*32kB 2*64kB 3*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 924kB
    2009-12-14T00:10:58.161182+01:00 myguest kernel: 117053 total pagecache pages
    2009-12-14T00:10:58.161184+01:00 myguest kernel: 0 pages in swap cache
    2009-12-14T00:10:58.161187+01:00 myguest kernel: Swap cache stats: add 0, delete 0, find 0/0
    2009-12-14T00:10:58.161194+01:00 myguest kernel: Free swap = 0kB
    2009-12-14T00:10:58.161196+01:00 myguest kernel: Total swap = 0kB
    2009-12-14T00:10:58.161199+01:00 myguest kernel: 131056 pages RAM
    2009-12-14T00:10:58.161201+01:00 myguest kernel: 4443 pages reserved
    2009-12-14T00:10:58.161204+01:00 myguest kernel: 8899 pages shared
    2009-12-14T00:10:58.161210+01:00 myguest kernel: 120326 pages non-shared
    Last edited by nlights (2009-12-17 22:10:20)

    Mr.Elendig wrote:Bridging is the best way todo it, so you should give us some more info on your atempt at it, so that we can help you fix it.
    Ok, I've followed the instructions from the wiki.
    One problem is that I'm on a laptop. eth0 is wireless and eth1 is wired. I chose to use eth1 since I thought it'd be easier to get working on one device before trying to make it work on both.
    1. bridge and tun modules are loaded from rc.conf
    2. In /etc/conf.d/bridges I have this:
    bridge_br0="eth1"
    BRIDGE_INTERFACES=(br0)
    3. In /etc/rc.conf I changed my networking portion to this:
    eth1="eth1 up"
    br0="dhcp"
    INTERFACES=(eth1 br0)
    4. In /etc/udev/rules.d/65-kvm.rules I have this:
    KERNEL=="tun", NAME="net/%k", GROUP="kvm", MODE="0660"
    5. My user is part of the kvm group, although I have also tried running qemu-kvm as root.
    6. In /etc/qemu-ifup I put:
    #!/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
    7. Using visudo I added this to the bottom:
    Cmnd_Alias QEMU=/sbin/ifconfig,/sbin/modprobe,/usr/sbin/brctl,/usr/bin/tunctl
    %kvm ALL=NOPASSWD: QEMU
    8. I launch qemu-kvm with the following script:
    USERID=`whoami`
    IFACE=`sudo tunctl -b -u $USERID`
    qemu-kvm -net nic -net tap,ifname="$IFACE" -vga std -m 1024 -k en-us -usbdevice tablet -localtime /dev/sda
    sudo tunctl -d $IFACE &> /dev/null
    My system starts with br0 getting the dhcp IP on boot, so that part is working.
    When I run the qemu-kvm start script I get this error (running as user or root):
    /etc/qemu-ifup: could not launch network script
    Could not initialize device 'tap'
    /etc/qemu-ifup is executable
    Last edited by shakin (2009-06-05 19:13:14)

  • QEMU/KVM bridge networking howto

    Hello all,
    I had a dialog here:  https://bbs.archlinux.org/viewtopic.php?id=145177  but I inadvertently hijacked the OP thread, for that I deeply apologize and decided to start my own thread.
    I've been struggling with getting my bridge networking working with QEMU/KVM.  I would love to get my KVM Windows 7 install working with bridge network so I can access my internal lan, but so far I am out of luck.  When I follow the Wiki's I completely hose my network settings and can't get online with my Arch host.
    I've followed the wiki's here:
    https://wiki.archlinux.org/index.php/QE … al_network
    should I be using this wiki instead:
    https://wiki.archlinux.org/index.php/KV … Networking
    I'm kinda confused on how to approach this since there are separate wikis for QEMU and KVM.
    I have a couple of confusing questions, that I hope someone can answer, or lead me in a direction to help me find a solution.  Free internet beer for helping. 
    From a vanilla install of Arch, if I would like to run Windows 7 64-bit in a VM, should I use QEMU or KVM?  I did get the windows 7 up and running, not sure how, but it's not on my internet LAN, the VM can only access the internet.
    Can someone help me out step by step or pointing me in a direction that can help get a bridge network set up between my host, which will need a static IP address, and my VM, which I would prefer to have another static IP address on my network.
    I've tried using virtualbox but the performance was slower than using QEMU/KVM.
    BTW, what's the difference between QEMU and KVM?  I'm confused by that as well.  I would even be willing to write up a "beginners guide" if I can get help getting mine set up.
    any help is greatly appreciated.
    --nixIT

    I do things manually on my system so, for two VM:
    ip tuntap add dev tap0 mode tap user djgera
    ip tuntap add dev tap1 mode tap user djgera
    brctl addbr br0
    brctl setfd br0 0.0
    brctl addif br0 eth0
    brctl addif br0 tap0
    brctl addif br0 tap1
    ip link set dev br0 up
    ip link set dev tap0 up
    ip link set dev tap1 up
    ip addr del 192.168.0.77/24 dev eth0
    ip addr add 192.168.0.77/24 broadcast + dev br0
    ip route add default via 192.168.0.1
    then each qemu-kvm instance that I lauch add:
    -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:00 -netdev type=tap,id=net0,ifname=tap0,script=no,downscript=no
    -device virtio-net-pci,netdev=net1,mac=52:54:00:12:34:01 -netdev type=tap,id=net1,ifname=tap1,script=no,downscript=no

  • [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)

  • Qemu-kvm: network access from host to guest

    I need ssh and http access from my host (Arch) to the guest (other Linux). I've failed at setting up Tap networking as described in the wiki. I don't need to have the whole LAN access the guest, so is there another way the host can access the guest? Using the guest's IP of 10.0.2.15 doesn't work, but I'm hoping there is a way to do it.
    Thanks.

    Mr.Elendig wrote:Bridging is the best way todo it, so you should give us some more info on your atempt at it, so that we can help you fix it.
    Ok, I've followed the instructions from the wiki.
    One problem is that I'm on a laptop. eth0 is wireless and eth1 is wired. I chose to use eth1 since I thought it'd be easier to get working on one device before trying to make it work on both.
    1. bridge and tun modules are loaded from rc.conf
    2. In /etc/conf.d/bridges I have this:
    bridge_br0="eth1"
    BRIDGE_INTERFACES=(br0)
    3. In /etc/rc.conf I changed my networking portion to this:
    eth1="eth1 up"
    br0="dhcp"
    INTERFACES=(eth1 br0)
    4. In /etc/udev/rules.d/65-kvm.rules I have this:
    KERNEL=="tun", NAME="net/%k", GROUP="kvm", MODE="0660"
    5. My user is part of the kvm group, although I have also tried running qemu-kvm as root.
    6. In /etc/qemu-ifup I put:
    #!/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
    7. Using visudo I added this to the bottom:
    Cmnd_Alias QEMU=/sbin/ifconfig,/sbin/modprobe,/usr/sbin/brctl,/usr/bin/tunctl
    %kvm ALL=NOPASSWD: QEMU
    8. I launch qemu-kvm with the following script:
    USERID=`whoami`
    IFACE=`sudo tunctl -b -u $USERID`
    qemu-kvm -net nic -net tap,ifname="$IFACE" -vga std -m 1024 -k en-us -usbdevice tablet -localtime /dev/sda
    sudo tunctl -d $IFACE &> /dev/null
    My system starts with br0 getting the dhcp IP on boot, so that part is working.
    When I run the qemu-kvm start script I get this error (running as user or root):
    /etc/qemu-ifup: could not launch network script
    Could not initialize device 'tap'
    /etc/qemu-ifup is executable
    Last edited by shakin (2009-06-05 19:13:14)

  • Qemu-kvm: default devices and qcow2 overlays

    I'm considering migrating a critical VM from VBox to qemu-kvm.  I've already played around with qemu a bit, but I have two questions I can't find answers to.
    The first is about the default devices that are 'created' when using a basic qemu command (such as qemu <qemu_image>).  I'd like to find out exactly what would be the commands to create those devices to help me create an optimal VM for my needs.  But I can't find any information about what's created, much less how it would be created manually.  The qemu monitor command info <subcommand> doesn't help much here, not least because I can't figure out how to page the output or send it to a file.
    Second, I have several VMs which have three or more discrete 'states' as far as the contents of the virtual HDD.  IOW, I install the OS, shutdown, and take a snapshot.  Then I install some s/w, shutdown, and take another ss.  Then I revert to the first ss, install some other s/w, shutdown, and take a third ss.  Rinse, repeat.  I'm only interested in the contents of the virtual HDD, 'differencing images' in VBox terms I think.  The hardware config does not change, and I take snapshots when shutdown, so I'm not looking to duplicate h/w config save or 'state save' features of VBox snapshots.  Are qcow2 and the associated 'overlays' the right tool for this job?
    Thanks.
    Last edited by alphaniner (2012-12-13 19:52:25)

    As I understand it, host:bus.addr is an alternative to host:vendor_id:product_id. So if I wanted to pass both of these thumb drives:
    $ lsusb
    Bus 001 Device 002: ID 1e3d:2093 Chipsbank Microelectronics Co., Ltd CBM209x Flash Drive (OEM)
    Bus 001 Device 003: ID 1e3d:2093 Chipsbank Microelectronics Co., Ltd CBM209x Flash Drive (OEM)
    I would use host:001.002 and host:001.003 . Note I said would use, because I've never tried it.
    And usb_add is a qemu monitor command. See sections 3.4 and 3.5 of the doc you linked for info on the monitor.
    All this being said, I don't use libvirt stuff so I don't know if it has the capability to specify USB devices by bus.addr or whether or not it enables the monitor.

  • [solved] Libvirt "No accelerator found!" but aqemu and qemu-kvm works.

    After the latest update to libvirt I have been getting a weird error message when I try to run or install a new VM on multiple machines.
    Unable to complete install: 'internal error process exited while connecting to monitor: char device redirected to /dev/pts/1
    Could not access KVM kernel module: Permission denied
    failed to initialize KVM: Permission denied
    No accelerator found!
    Traceback (most recent call last):
    File "/usr/share/virt-manager/virtManager/asyncjob.py", line 96, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
    File "/usr/share/virt-manager/virtManager/create.py", line 1943, in do_install
    guest.start_install(False, meter=meter)
    File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1249, in start_install
    noboot)
    File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 1317, in _create_guest
    dom = self.conn.createLinux(start_xml or final_xml, 0)
    File "/usr/lib/python2.7/site-packages/libvirt.py", line 2722, in createLinux
    if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
    I have hardware virtulization enabled in the BIOS on my machines, as well as the the required kernel modules loaded:
    > lscpu
    Architecture: x86_64
    CPU op-mode(s): 32-bit, 64-bit
    Byte Order: Little Endian
    CPU(s): 2
    On-line CPU(s) list: 0,1
    Thread(s) per core: 1
    Core(s) per socket: 2
    Socket(s): 1
    NUMA node(s): 1
    Vendor ID: AuthenticAMD
    CPU family: 16
    Model: 6
    Stepping: 3
    CPU MHz: 800.000
    BogoMIPS: 4989.39
    Virtualization: AMD-V
    L1d cache: 64K
    L1i cache: 64K
    L2 cache: 1024K
    NUMA node0 CPU(s): 0,1
    > grep -E "(vmx|svm)" /proc/cpuinfo
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate npt lbrv svm_lock nrip_save
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate npt lbrv svm_lock nrip_save
    > lsmod | ack 'kvm*'
    kvm_amd 52055 0
    kvm 384721 1 kvm_amd
    I am able to create and run VMs using qemu-kvm directly and with using aqemu-git without any issues.  I am not sure if the direct cause is with Libvirt or if I am using qemu-kvm-spice from AUR (has not caused an issue before).
    Last edited by vendion (2013-02-16 20:15:15)

    I had the same problem, however the fix did not work for me.
    Tried replacing kvm user and group with qemu (since it exists), same problem.
    Reverted and created a kvm user (which did not exist and qemu-kvm package did not create), then the problem changes to
    error: Unable to read from monitor: Connection reset by peer
    I do not know if it is relevant but when run as root I get:
    # qemu-kvm
    Could not initialize SDL(No available video device) - exiting
    However as the user of the current login a qemu-kvm starts with no problems.
    maybe it indicates a systemd/polkit qxl/SDL driver problem or cgroups problem?
    my libvirtd.conf I had set the permissions to polkit but commenting it out to get the defaults changes nothing.
    a stab in the dark would predict that since systemd/polkit only allows programmes to run on the login session/seat, it is preventing the kvm/qemu user to run a programme since that user has not logged in?
    so I changed the user and group in qemu.conf again but this time to root then the following error :
    connecting to monitor: chardev: opening backend "pty" failed
    changing it to the current session/seat login username and group:
    success
    On the other hand maybe it is as result of a messed up passwd or groups file causing polkit not to work correctly?
    UPDATE: the problem also goes away when I remove a SDL display and then use the trusty old(archaic) VNC. so as I said, my guess is the qxl framebuffer and/or SDL is not being granted permission to use the display by polkit or PAM or systemd or whatever is supposed to be granting it permission.  it can probably be fixed with a rule....
    Last edited by hawkinstw (2013-03-13 23:16:18)

  • [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.

  • [CLOSED] install windows 7 in qemu/kvm??

    Hello all,
    I've been trying to install windows 7 (tried 64 and 32 bit, same results).  My processor supports KVM, ran that check and it passed.
    I followed the guides and wiki, but it seems that my windows 7 install stalls  on the "Starting Windows Installation" screen.  I left it alone for over 12 hours and nothing changed.
    In my research, I've found posts that state you should run the virtio drivers with windows 7 or it will just crawl.  However, the guides I've seen only show how to install the virtio drivers after windows 7 is installed, I'm not sure how to get windows 7 installed.
    Can anyone help out, or point me in the right direction?  I'm at a standstill, and I hate to keep rebooting into windows just so I can VPN into work (vpn client is windows based and won't run in wine, tried it.). 
    Any and all help is appreciated.
    --nixIT
    Last edited by nixIT (2012-03-17 14:20:19)

    teekay wrote:
    You boot with both images attached. Not Sure what the kvm command is. With virt-inst you just specify --cdrom twice.
    Maybe something like this works in qemu-kvm, to?
    qemu-kvm -drive file=/images/windos.iso,index=1,media=cdrom -drive file=/images/virtiodrivers.iso,index=2,media=cdrom ...
    thanx for the line, I was glad to see it wasn't erroring out, however, the install sticks on the "Windows is loading files..." screen with the progress indicator all the way completed.
    any ideas?
    --nixIT

  • [solved]qemu-kvm, cant start all guests with latest qemu-kvm

    Hi there!
    I have a problem when I updated qemu-kvm package from 1.0.1-3 to 1.1.0-1
    Some Linux guests can get started without problems but other will die after grub tries to load the kernel.
    In my messages log i can find the following error when starting a affected guets:
    qemu-kvm[2026]: segfault at 10 ip 00007f2845549d0e sp 00007f283d024c00 error 4 in qemu-system-x86_64[7f2845419000+308000]
    After downgrading to the previous version i could start the guests again.
    Did anyone had similar problems with the current qemu?
    Kind regards
    Edit: Upgrade to 1.1.1.1 solves the issue
    Last edited by nonsens (2012-07-20 08:17:31)

    After some reading I found a workaround:
    Edit the VM configuration with
    #virsh edit <VM NAME>
    and replace 'pc-0.15' with "pc-1.1'
    <os>
    <type arch='x86_64' machine='pc-1.1'>hvm</type>
    <boot dev='hd'/>
    </os>
    The diff output of the changed /etc/libvirt/qemu/<VM_Name>.xml file with the saved one should look like:
    #diff test.xml test.xml.sav
    15c15
    < <type arch='x86_64' machine='pc-1.1'>hvm</type>
    > <type arch='x86_64' machine='pc-0.15'>hvm</type>
    Now the changed VM start successful

  • [SOLVED] Installing Archlinux under QEMU-KVM

    Hi all.
    In order to kill my 8+ years old choice, I want to give Arch Linux a try.
    As I daily use QEMU+KVM also to run pesky commercial OSes, I decided to use it also to test this very promising distro.
    I have been trying to follow the installation guide but the istallation is failing in the latest part: GRUB2.
    This in turn made my efforts useless.
    Is there any "special guide/procedure" in order to intall Arch Linunx under QEMU-KVM?
    TIA.
    Last edited by Uqbar (2014-11-11 10:38:22)

    Hi.
    I am downloading latest (2014.11.01) and wil report back with details.
    Thanks for listening.
    [UPDATE] It worked now! It looks like I did something wrong more than once in the past. Thanks anyway.
    Last edited by Uqbar (2014-11-11 10:34:27)

  • [SOLVED] qemu-kvm update breaks libvirt

    I just recently upgraded to qemu-kvm 0.12.1.2-1
    Once I did this I was unable to start my VM's I received:
    error: Failed to start domain dns
    error: internal error unable to start guest: char device redirected to /dev/pts/1
    qemu: '' invalid format
    I just rolled back the package using the packages in
    /var/cache/pacman/pkg by pacman -U qemu-kvm-0.11.0-1-x86_64.pkg.tar.gz
    Last edited by papertigers (2010-02-25 16:01:15)

    After deciding to upgrade to the new one and actually figure out what the problem was I discovered it was a simple fix.
    To fix the problem I was getting I went into virt-manager and all you have to do is remove the machines hard drive and then reattach it.
    I was then able to boot the VM's.

  • Qemu-kvm error

    Hello!
    I am trying to get KVM support working but without much success.
    At first I ran into an error with permissions which I managed to solve by changing permissions according to this thread.
    Now when I run this command
    qemu-kvm -hda imgname -m 512 -cdrom /path/to/iso -boot d -vga std
    I get this error
    kvm_create_vm: Device or resource busy
    Could not initialize KVM, will disable KVM support
    dmesg output
    kvm: enabling virtualization on CPU0 failed
    I have added my user to the group kvm and checked /etc/group afterwards, lsmod returns the required modules and I have made sure my CPU supports KVM.
    Any ideas what the problem might be?
    Last edited by eyescream (2010-06-07 19:11:02)

    Do you have Virtualization enabled in your BIOS?
    Virtualization features of the CPU are disabled in the default settings on most boards.

  • Problem with qemu-kvm and alsa

    When I use some sound program or play system sounds in qemu-kvm, the audio chocks and qemu warns with 'alsa: Unexpected state 1'  in the console. That happened after the last updates. Any idea how to fix that.
    I'm on x86_64 (amd64) emulated OS is windows xp.

    Same as you.
    I'm on x86_64(Intel64) emulated OS is windows xp & windows 2003.
    cpu load is very hight

Maybe you are looking for

  • Solaris8 and 9 (possibly 7) /dev/poll driver bug report.

    Hello, I'd like to report a bug in the solaris 8 and 9 /dev/poll driver (poll(7d)). As i do not have a support account with sun or anything like that, there seems to be no other way to do that here (which is of course a very sad thing). Bug details:

  • User Exit/BADI for AS01 ( Asset Creation )

    Hi Xperts, My requirement is during asset creation in AS01, after asset generated i want to send asset no, subno, asset creation date, int. order no to ztable. Can anyone suggest user exit/BADI which suit this requirement. I have gone through forum s

  • Weird Problem With Information For Songs

    When I look at one of my songs in iTunes, its normal. It shows the name of the song, and the name of the artist. but when i play that song on iTunes, some other information shows such as album and genre. was that information there the whole time? was

  • I can no longer look at videos at a web site. I only get a black box.

    I can no longer get videos at a web site that uses flash player. I only get a black box.

  • Rooshian junk mail filter

    in Mail, is it possible to filter out Russian/cyrillic(?) messages using language characters? Or? getting LOTS of junk I can't read (and don't want to.)