Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: higher graphics resolution with KVM ?

  1. #11
    Join Date
    Oct 2004
    Location
    Alaska, USA
    Beans
    122

    Re: higher graphics resolution with KVM ?

    Quote Originally Posted by bodhi.zazen View Post
    Do you already have a tap1 ?

    What are the permissions of /dev/net/tun ?
    Yes, tap1 was automagically set up when I started boot-winXP3.sh (really just a command line using kvm-bridge) and was also deleted when I shutdown winXP. As I mentioned above tapX is incremented everytime I start/stop my winXP guest. Actually it is incremented everytime I TRY to start my winXP guest -- in my post above you will see that the first failed attempt as a user shows tap0 and the next successful attempt using sudo creates tap1. I am now up to tap4 because I started/stopped winXP guest several times.

    the permissions
    Code:
    # ll /dev/net/
    total 0
    crw-rw-rw- 1 root root 10, 200 2009-05-04 14:59 tun
    Last edited by Tomy; June 26th, 2009 at 10:45 PM.

  2. #12
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: higher graphics resolution with KVM ?

    You can remove old tap with

    Code:
    sudo tunctl -d tap{0,1,2,3,4,5,6}
    It also appears your kvm-ifdown script is not running, is it executable ?

    did you make a group kvm ?

    Can you post boot-winXP3.sh ?
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  3. #13
    Join Date
    Oct 2004
    Location
    Alaska, USA
    Beans
    122

    Re: higher graphics resolution with KVM ?

    It also appears your kvm-ifdown script is not running, is it executable ?
    Code:
    # ll /etc/kvm*
    -rwxr-xr-x 1 root root  158 2009-06-26 07:19 /etc/kvm-ifdown
    -rwxr-xr-x 1 root root  272 2009-06-26 12:46 /etc/kvm-ifup
    
    /etc/kvm:
    total 8
    -rwxr-xr-x 1 root root  174 2009-04-17 11:10 kvm-ifup
    drwxr-xr-x 2 root root 4096 2009-04-21 19:26 utils
    Although I get the error message about kvm-ifdown it apparently is running because if I delete it tapX will not get removed.

    did you make a group kvm ?
    Code:
    # cat group | grep kvm
    kvm:x:124:tomy,root
    Can you post boot-winXP3.sh ?
    Code:
    # cat boot-winXP3.sh
    #!/bin/sh
    kvm-bridge  -soundhw all -vga std \
    -hda /winXP/winXP3.img \
    -boot c \
    -m 512

  4. #14
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: higher graphics resolution with KVM ?

    post kvm-bridge also please
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  5. #15
    Join Date
    Oct 2004
    Location
    Alaska, USA
    Beans
    122

    Re: higher graphics resolution with KVM ?

    Quote Originally Posted by bodhi.zazen View Post
    post kvm-bridge also please
    This was copied from your blog howto. I changed the NIC model.
    Code:
    # cat /bin/kvm-bridge
    #!/usr/bin/env bash
    # tap interface automagic allocation
    # for linux kernels >= 2.6.18
    
    # modified by bodhi.zazen from :
    # http://calamari.reverse-dns.net:980/cgi-bin/moin.cgi/FrequentlyAskedQuestions
    
    # set up a tap interface for qemu/kvm
    # USERID – uid qemu is being run under.
    USERID=`whoami`
    
    # generate a random mac address for use the virtual nic
    # With thanks to pheldens @ qemu forum
    
    ranmac=$(echo -n DE:AD:BE:EF ; for i in `seq 1 2` ; \
    do echo -n `echo ":$RANDOM$RANDOM" | cut -n -c -3` ;done)
    
    # specify which NIC to use – see man qemu
    model=rtl8139
    
    # The iface variable is automatically set to the next available tap
    # Numbering starts with tap0
    iface=`sudo tunctl -b -u $USERID`
    
    # start kvm with our parameters
    # $@ allows us to add additional command like parameters
    # such as -hda $HOME/ubuntu.qcow2
    echo “Bringing up interface $iface with mac address $ranmac”
    # For Fedora 11 change “kvm” to “qemu-kvm”
    kvm -net nic,vlan=0,macaddr=$ranmac,model=$model -net tap,vlan=0,ifname=$iface -usb -usbdevice tablet $@
    #

  6. #16
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: higher graphics resolution with KVM ?

    I am not seeing anything obvious.

    You can try removing -g kvm from your kvm-ifup script and / or running again as root to see where the problem may be.
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  7. #17
    Join Date
    Oct 2004
    Location
    Alaska, USA
    Beans
    122

    Re: higher graphics resolution with KVM ?

    Quote Originally Posted by bodhi.zazen View Post
    I am not seeing anything obvious.

    You can try removing -g kvm from your kvm-ifup script and / or running again as root to see where the problem may be.
    Okay, thanks very much for the follow-up.

    In spite of the error message things work pretty well. I am using gksu to run my script from a menu entry -- so I have to enter my admin password. Not a big deal.

    And did I say it works and thank you

    Have a great day
    Tomy

  8. #18
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: higher graphics resolution with KVM ?

    you are welcome. If it runs when running as root the problem is most likely with the

    -g kvm

    you can test this by changing your primary group (this will be temporary)

    Code:
    newgrp kvm
    That command will start a new shell and your primary group will be kvm.

    If that works, either remove the -g kvm or change your primary group to kvm.

    Code:
    sudo usermod -g kvm user
    you need to log off and back on or start a new log in shell for those changes to take effect

    Code:
    su - user
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  9. #19
    Join Date
    Oct 2004
    Location
    Alaska, USA
    Beans
    122

    Re: higher graphics resolution with KVM ?

    Didn't seem to help -- the output looks the same.

    Code:
    $ newgrp kvm
    $ kvm-bridge -hda winXP3.img -boot c -m 512
    “Bringing up interface tap2 with mac address DE:AD:BE:EF:34:21”
    warning: could not open /dev/net/tun: no virtual network emulation
    Could not initialize device 'tap'
    $ 
    $ sudo kvm-bridge -hda winXP3.img -boot c -m 512
    [sudo] password for tomy: 
    “Bringing up interface tap3 with mac address DE:AD:BE:EF:19:46”
    + [ -n tap3 ]
    + /usr/bin/sudo /usr/sbin/tunctl -u tomy -g kvm -t tap3
    TUNSETIFF: Device or resource busy
    + /usr/bin/sudo /sbin/ip link set tap3 up
    + sleep 0.5s
    + /usr/bin/sudo /usr/sbin/brctl addif br0 tap3
    + exit 0
    TUNSETIFF: Device or resource busy
    /etc/kvm-ifdown: could not launch network script
    $
    sudo kvm-bridge [options] works fine in spite of the "resource busy" and "could not launch" messages.

    ________________________________________________
    Update: By adding kvm-bridge to /etc/sudoers (using visudo) I no longer have to enter my password. My addition to /etc/sudoers is now:

    Code:
    # Allow members of the kvm group to configure a bridged virtual network interface
    %kvm ALL=(ALL) NOPASSWD: /sbin/ifconfig, /usr/sbin/brctl, /usr/sbin/tunctl, /bin/kvm-bridge
    Last edited by Tomy; July 12th, 2009 at 11:04 AM. Reason: no longer have to enter sudo password

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •