Qemu-kvm for ppc emulation

hi,
   in my arch64 I have installed qemu-kvm, and it works very well
but I dont view command for emulate ppc system
is this possible?
p.s.
in qemu package, there is a command: qemu-system-ppc
thank you
Last edited by sacarde (2011-02-05 13:04:55)

Use vmware drivers:
cur_work$ cat ~/temp/vm-start
#!/bin/bash
qemu-kvm -hda $1 -net nic,model=virtio \
-net user,hostfwd=tcp:127.0.0.1:15000-:22 -vga vmware \
-usbdevice tablet -device intel-hda -device hda-duplex -m 512
But be sure that appropriate drivers are present in the guest OS.
EDIT: Off-topic: Out of curiosity, how many threads does qemu-kvm create when running with virtio_blk? For me it's ~150, which I hits my ulimit settings...
Last edited by Leonid.I (2011-10-23 22:18:20)

Similar Messages

  • Networking between host and qemu imag for telnet

    Hello.
    I want to start doing test and learning a bit about networking.
    But I only have a computer, and it doesn't have even hardware emulation, making the use of any modern distro as a virtual machine painfuly slow.
    So I downloaded a floppy distro.. and I manage to get a virtual network card working. But there is no ping between host and guest. I  can't Telnet neither, of course.
    Qemu man page and google are confusing me a lot. It speack of redirecting ports.. no solution to that
    I don t have firewall, as I don't have Internet at home.
    What can i do now? :S
    Thanks in advance

    I think I must stop drinking so much cofee on the afternoon, lol
    Thank you very much for adding my reply!
    bernarcher wrote:
    vladimir_1922, the moderators receiveived this report message from you:
    Yes, I checked that too... No result.
    Maybe it is an issue with /etc/rc.conf. Some months ago it changed on the format who manages the network. May it be outdated?
    Obviously, you did inadvertently use the "Report" button to submit this.
    But don't worry, this happens quite often.
    I tough a bit about the problem, and followed the steps on the Gentoo Wiki for sharing a conection between two guests, and I found the same problem, but with the vbe module being unabaible. After a bit of rage, I realized two possible workarounds:
    First thing, is that I compile my kernel. As I don't have KVM or Hardware emulation, I just don't compile any virtual machine module, to save memory. BUT, I do have the /dev/net/tun device who qemu can't recognice (yes, I tried to run qemu as root), so It seems that it is compiled after all
    The second thing, is that I also stripped the daemons and services at bootup, as I don't have Internet, or othercomputers, I don't need most of them. Between the services I don't start at bootup is the netwprk daemon... but if i try to start it, all it does is delay the bootup for almost 2 minutes looking for a network :S
    So, I'll just copy my /etc/rc.conf, where I just did the changes of the wiki. Maybe I did something wrong, maybe I lack something.
    Any help will be must appreciated
    # /etc/rc.conf - Main Configuration for Arch Linux
    # See 'man 5 rc.conf' for more details
    # LOCALIZATION
    HARDWARECLOCK=
    TIMEZONE="Europe/London"
    KEYMAP="es"
    #CONSOLEFONT="Lat2-Terminus16"
    CONSOLEMAP=
    LOCALE=
    DAEMON_LOCALE="yes"
    USECOLOR="yes"
    # HARDWARE
    MODULES=(snd_pcm_oss snd_mixer_oss snd_seq_oss bridge tun)
    USEDMRAID="no"
    USEBTRFS="no"
    USELVM="no"
    # NETWORKING
    HOSTNAME="arch.laptop"
    interface=eth0
    address=
    netmask=
    broadcast=
    gateway=
    NETWORK_PERSIST="no"
    eth0="eth0 0.0.0.0"
    br0="br0 192.168.0.3 netmask 255.255.255.0 broadcast 192.168.0.255"
    INTERFACES=(eth0 br0)
    gateway="default gw 192.168.0.1"
    ROUTES=(gateway)
    # DAEMONS
    DAEMONS=(syslog-ng !network crond)

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

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

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

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

  • 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

  • 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

  • [SOLVED] QEMU-KVM fails to boot if passed q35 machine type

    As I understand it, qemu still uses the PII3X as the default machine type.  I had been using -machine type=q35,accel=kvm for a few weeks to learn more about qemu and KVM.  With this code I could boot a win7 VM and I confirmed the ICH9 chipset appeared in the device manager.
    After a system update I am no longer able to pass that command.  I am using the linux-0.2 image located here.
    If I enter this code, the system boots normally:
    qemu-system-x86_64 -enable-kvm -boot order=c linux-0.2.img
    This however does not work and the bios complains that there is no bootable media found (after waiting for pxe):
    qemu-system-x86_64 -enable-kvm -boot order=c -M q35 linux-0.2.img
    qemu is 1.7.0-2 (built 02/19/14 but this is the only package in pacman's cache)
    seabios is 1.7.3.1-2 (built 09/21/13)
    I actually tried this on two different machines with the same result.  What can I do next to troubleshoot?  Thanks.
    Last edited by gizzard (2014-04-13 15:55:25)

    R00KIE wrote:
    The iso should boot, yes. I did try using -M q35 with a WinXP image I have here and it started to boot (I get blue screens and automatic reboots since lots of things change with -M q35).
    One different thing I have however is the specification of the interface type for disks. Try using "-drive file=/path/to/image,if=scsi" or "-drive file=/path/to/image,if=virtio", that seems to make it work for me, it still might make Win7 complain though.
    I think I'm getting closer thanks to your help.  Adding the if variable allows the debian image to boot using the q35 machine type.  Here are results of some trials (command and result):
    1. qemu-system-x86_64 -enable-kvm -cpu host -m 1024 debian-live-7.4-amd64-standard.iso
    - boots fine
    user@debian:~$ lspci | grep ACPI
    00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
    2. qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -machine type=q35,accel=kvm debian-live-7.4-amd64-standard.iso
    - fails to boot
    3. qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -machine type=q35,accel=kvm -drive file=debian-live-7.4-amd64-standard.iso,if=ide
    - fails to boot
    4. qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -machine type=q35,accel=kvm -drive file=debian-live-7.4-amd64-standard.iso,if=scsi
    - boots fine
    user@debian:~$ lspci | grep AHCI
    00:1f.2 SATA controller: Intel Corporation 82901IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
    user@debian:~$ lspci | grep SCSI
    00:03.0 SCSI storage controller: LSI Logic / Symbios Logic 53c895a
    4. qemu-system-x86_64 -enable-kvm -cpu host -m 1024 -machine type=q35,accel=kvm -drive file=debian-live-7.4-amd64-standard.iso,if=virtio
    - boots fine
    user@debian:~$ lspci | grep AHCI
    00:1f.2 SATA controller: Intel Corporation 82901IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (rev 02)
    user@debian:~$ lspci | grep SCSI
    00:03.0 SCSI storage controller: Red Hat, Inc Virtio block device
    I will try these options with the win7 VM and report back.  I may need to recreate it from scratch, so it might take a little while.

  • [SOLVED] qemu-kvm high cpu usage when using pulseaudio alsa-plugin

    My Arch system is configured to use pulseaudio. When an application connects to the sound server it will use either a native pulseaudio driver, or the pulseaudio alsa-plugin if it using a alsa driver.
    qemu-kvm in 'extra' is not compiled with native pulseaudio support. When running guests with sound hardware support, qemu-kvm connects to the sound server using the pulseaudio alsa-plugin.
    The problem I'm seeing is high cpu usage on the Arch host even though cpu usage on the guest is low. Also, the guest is often unresponsive for a period of time when opening sound applications like the mixer or playing audio.
    My solution is to recompile qemu-kvm with native pulseaudio support. This eliminates the use of the pulseaudio alsa-plugin on the Arch host and fixes the above problems.
    An easy was to do this is run:
    yaourt -S qemu-kvm --build
    And edit the PKGBUILD changing the line:
    --audio-drv-list=alsa,sdl,oss,esd \
    To:
    --audio-drv-list=pa,alsa,sdl,oss,esd \
    Finish building and install. Don't forget to add yourself to the kvm group.
    Last edited by bytesize (2010-08-16 02:34:08)

    Problem disappeared.
    I'm not sure, but i think installing xf86-video-modesetting helped to fix this issue.
    I had an error messages in /var/log/Xorg.0.log like this:
    (EE) Failed to load module "modesetting" (module does not exist, 0)

Maybe you are looking for

  • Don't know where to put this, but cannot go back to windows 8. Help please?

    Hello, Please forgive me, I do not know what forum to ask this question in. I downloaded the free windows 8.1 update a while back, and have decided that I do not like it. So I tried "Refresh your PC settings without afflicting your files". It restart

  • How do I access my Mac hard drive from my Windows OS?

    I recently bought a MacBook Pro and had it partitioned into two hard drives, 65 gig of mac and 35 gig of windows, which will mostly be for games. However, when I am running OS X, i can explore the windows hard drive, but when I run XP, I can't explor

  • Integrating Webdynpro Application process into UWL

    Hello Everyone, Can anyone help me to create an application that gives an option for the managers to enter "Reason for Rejection" when they click on "Reject Purchase Order" in the UWL of the portal. I hope you can understand my requirement. Please le

  • Stutter Problem - Some Observations

    Ok, this stutter thing is driving me crazy and Apple's lack of response is drving me crazier. Here are some observations I have made while researching this bug. The stutter I am experiencing only happens between songs using crossfade. Turning crossfa

  • What's user variable name using Smart View POV function (ex:HypGetActiveMember)?

    Hi, We want to use Smart View POV function (ex:HypGetActiveMember) to get the active member of user variables from HFM forms selected into Excel, but we don't know the user variable name in the following paragraph of Smart View developer guide: "To u