Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-12 Thread Michael Tokarev
Gary Dale wrote:
> OK, I think I've got it now. I found
> http://blog.cynapses.org/2007/07/12/qemu-kvm-internal-network-setup/
> which provided some additional settings for the -net options.
> 
> Using a made-up mac address and -net tap,ifname=tap0,script=no gave me
> an IP address from my local network and allowed Windows Update to locate
> 8 updates. However, I still couldn't browse the Internet, which was
> confusing. Moreover, network operations seemed slow.

If windows is able to locate updates it means everything
on the IP (internet protocol) side works as expected.

> Including model=rtl8139 seems to be important. Once I did that, I could
> get out onto the Internet.

Note that rtl8139 is the default model of the  virtual NIC, so this
parameter -- "model=rtl8139" -- does nothing for you.

> The kvm networking page doesn't mention these essential command line
> settings. Perhaps you could ask the page maintainer to include them?

No, because for different cases the setup is different, and none of
them are essential.  For all others default setup (without -net
parameters at all, which gives you user-mode networking) works
just fine (but it is slow).

I repeat: what you describe is impossible to get "using" a bug in
kvm.  Saying that kvm guest can't connect to internet is like
saying that firefox is unable to display pages - it is solely
your local setup, firefox works for millions of people worldwide.

And the whole thing is really a support/help request, which is
not a good thing for BTS.

> I'd do it myself but I'm still having a network issue - br0 doesn't come
> up when I boot - I have to start in single-user mode, run dhclient br0,
> then resume the boot. I don't feel comfortable offering people network
> advice when I'm having a basic problem like that.  :)

>From what I see, your network setup (/etc/network/interfaces you
provided before) is correct, at least I don't see any obvious
issues.  Maybe it's your bad karma? :)

/mjt




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-12 Thread Gary Dale

OK, I think I've got it now. I found
http://blog.cynapses.org/2007/07/12/qemu-kvm-internal-network-setup/
which provided some additional settings for the -net options.

Using a made-up mac address and -net tap,ifname=tap0,script=no gave me
an IP address from my local network and allowed Windows Update to locate
8 updates. However, I still couldn't browse the Internet, which was 
confusing. Moreover, network operations seemed slow.


Including model=rtl8139 seems to be important. Once I did that, I could
get out onto the Internet.

The kvm networking page doesn't mention these essential command line 
settings. Perhaps you could ask the page maintainer to include them?


I'd do it myself but I'm still having a network issue - br0 doesn't come 
up when I boot - I have to start in single-user mode, run dhclient br0, 
then resume the boot. I don't feel comfortable offering people network 
advice when I'm having a basic problem like that.  :)


Thanks for your help!



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-12 Thread Gary Dale

Michael Tokarev wrote:

Gary Dale wrote:
  

Michael Tokarev wrote:


Gary Dale wrote:
 
  

Package: qemu-kvm
Followup-For: Bug #572784

Networking starts only on the first time that I start an XP virtual
machine after a reboot of the actual machine. If I subsequently restart
the virtual machine, or the XP instance within it, the network only
comes up enough for me to connect to my Samba server. I can't get
out to the Internet or ping some machines on my network.


Gary, can you please describe why do you think your problem is
the same as #572784?
  

[]
  

My problem looked similar based on the subject line.

My qemu-kvm command line is
 kvm -cpu phenom -enable-kvm -vga std -localtime -hda
~/.virt/windowsxp/windows.qcow -m 1G



Aha.  So it is user-mode networking.

Gary, that's.. difficult.  The thing is, there is no way
I can think of the situation you describe.  With user-mode
networking, kvm is just a normal user-space process, like
your web browser etc.  You restart it, and it acts the same
way as before -- unless something else started on your host
which prevents it from working correctly.
  
Which unfortunately it doesn't. To make matters worse, it sometimes 
doesn't start even after a reboot of my physical machine - which is also 
what the original bug report contained. However so far as  I have 
observed, it never survives a reboot of my virtual OS.


  

My virtual machine is running Windows XP/Pro with SP3 and all the later
patches. I have very little else on it other than Pinnacle Studio 9.

My main board is a Gigabyte GA-MA790GP-UD4H with a Realtek 8111C NIC
onboard. I'm connecting to a Linksys WRT610N router which provides dhcp
services while my Samba server is running Debian/Lenny.



This is all not really relevant.  Note that with user-mode net
in kvm, the dhcp server used is built-in to kvm, not any your
local one.  It provides fixed ip address - 10.2.2.2 if memory
serves me right.  See http://www.linux-kvm.org/page/Networking
for additional networking options.
  
Yes, the address 10.0.2.15 is given by KVM on my setup, with 10.0.2.2 as 
the default gateway.


I've read the kvm networking page but it is not a model of clarity. I 
can't even always tell where one subsection ends and another begins. The 
different use cases simply confuse things. From my reading there are 
simply two options - to use the user networking or to use a bridge. 
There are then some options for setting up and configuring a bridge.


  

My /etc/network/interfaces file is:

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

mapping eth1
   script grep
   map eth1

iface eth0 inet manual

auto br0
iface br0 inet dhcp
  pre-up /usr/sbin/tunctl -u garydale -t tap0
  pre-up ifconfig tap0 up
  bridge_ports all tap0
  post-down ifconfig tap0 down
  post-down tunctl -d tap0



Note that you almost completed bridged networking setup
for kvm for non-root user, only the kvm command line is
missing.

Please check your networking setup, and if you still
has the issue please file a new bug.  Thanks.

/mjt
  
Since it sometimes works, I'm not sure what is missing. The kvm 
networking page doesn't mention any special options for the kvm command 
line using a public bridge with option 1. I've tried adding the options 
-net tap alone and in combination with -net nic,macaddr= using the tap0 
mac address and also a made-up mac address.  Neither worked. -net tap by 
itself even prevents the virtual machine from starting.




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-12 Thread Michael Tokarev
Gary Dale wrote:
> Michael Tokarev wrote:
>> Gary Dale wrote:
>>  
>>> Package: qemu-kvm
>>> Followup-For: Bug #572784
>>>
>>> Networking starts only on the first time that I start an XP virtual
>>> machine after a reboot of the actual machine. If I subsequently restart
>>> the virtual machine, or the XP instance within it, the network only
>>> comes up enough for me to connect to my Samba server. I can't get
>>> out to the Internet or ping some machines on my network.
>>
>> Gary, can you please describe why do you think your problem is
>> the same as #572784?
[]
> My problem looked similar based on the subject line.
> 
> My qemu-kvm command line is
>  kvm -cpu phenom -enable-kvm -vga std -localtime -hda
> ~/.virt/windowsxp/windows.qcow -m 1G

Aha.  So it is user-mode networking.

Gary, that's.. difficult.  The thing is, there is no way
I can think of the situation you describe.  With user-mode
networking, kvm is just a normal user-space process, like
your web browser etc.  You restart it, and it acts the same
way as before -- unless something else started on your host
which prevents it from working correctly.

> My virtual machine is running Windows XP/Pro with SP3 and all the later
> patches. I have very little else on it other than Pinnacle Studio 9.
> 
> My main board is a Gigabyte GA-MA790GP-UD4H with a Realtek 8111C NIC
> onboard. I'm connecting to a Linksys WRT610N router which provides dhcp
> services while my Samba server is running Debian/Lenny.

This is all not really relevant.  Note that with user-mode net
in kvm, the dhcp server used is built-in to kvm, not any your
local one.  It provides fixed ip address - 10.2.2.2 if memory
serves me right.  See http://www.linux-kvm.org/page/Networking
for additional networking options.


> My /etc/network/interfaces file is:
> 
> auto lo
> iface lo inet loopback
> address 127.0.0.1
> netmask 255.0.0.0
> 
> mapping eth1
>script grep
>map eth1
> 
> iface eth0 inet manual
> 
> auto br0
> iface br0 inet dhcp
>   pre-up /usr/sbin/tunctl -u garydale -t tap0
>   pre-up ifconfig tap0 up
>   bridge_ports all tap0
>   post-down ifconfig tap0 down
>   post-down tunctl -d tap0

Note that you almost completed bridged networking setup
for kvm for non-root user, only the kvm command line is
missing.

Please check your networking setup, and if you still
has the issue please file a new bug.  Thanks.

/mjt




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-11 Thread Gary Dale

Michael Tokarev wrote:

Gary Dale wrote:
  

Package: qemu-kvm
Followup-For: Bug #572784

Networking starts only on the first time that I start an XP virtual
machine after a reboot of the actual machine. If I subsequently restart
the virtual machine, or the XP instance within it, the network only
comes up enough for me to connect to my Samba server. I can't get
out to the Internet or ping some machines on my network.



Gary, can you please describe why do you think your problem is
the same as #572784?

As far as I'm concerned, #572784 is, like, "fixed not a bug".

For the issue you describes, I guess it is entirely different
thing and is either configuration error on your part or some
"integration" package (like vde or virt-manager) doing something
wrong.  But since you provided no details, and since I know
it works for many people including me, it is very difficult to
even guess correctly what might be wrong here.

/mjt

  

My problem looked similar based on the subject line.

My qemu-kvm command line is
 kvm -cpu phenom -enable-kvm -vga std -localtime -hda 
~/.virt/windowsxp/windows.qcow -m 1G


My virtual machine is running Windows XP/Pro with SP3 and all the later 
patches. I have very little else on it other than Pinnacle Studio 9.


My main board is a Gigabyte GA-MA790GP-UD4H with a Realtek 8111C NIC 
onboard. I'm connecting to a Linksys WRT610N router which provides dhcp 
services while my Samba server is running Debian/Lenny.


My /etc/network/interfaces file is:

auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

mapping eth1
   script grep
   map eth1

iface eth0 inet manual

auto br0
iface br0 inet dhcp
  pre-up /usr/sbin/tunctl -u garydale -t tap0
  pre-up ifconfig tap0 up
  bridge_ports all tap0
  post-down ifconfig tap0 down
  post-down tunctl -d tap0





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-11 Thread Michael Tokarev
Gary Dale wrote:
> Package: qemu-kvm
> Followup-For: Bug #572784
> 
> Networking starts only on the first time that I start an XP virtual
> machine after a reboot of the actual machine. If I subsequently restart
> the virtual machine, or the XP instance within it, the network only
> comes up enough for me to connect to my Samba server. I can't get
> out to the Internet or ping some machines on my network.

Gary, can you please describe why do you think your problem is
the same as #572784?

As far as I'm concerned, #572784 is, like, "fixed not a bug".

For the issue you describes, I guess it is entirely different
thing and is either configuration error on your part or some
"integration" package (like vde or virt-manager) doing something
wrong.  But since you provided no details, and since I know
it works for many people including me, it is very difficult to
even guess correctly what might be wrong here.

/mjt



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#572784: qemu-kvm: networking only comes up on initial start of kvm.

2010-03-11 Thread Gary Dale

Package: qemu-kvm
Followup-For: Bug #572784

Networking starts only on the first time that I start an XP virtual 
machine after a
reboot of the actual machine. If I subsequently restart the virtual 
machine, or
the XP instance within it, the network only comes up enough for me to 
connect to my
Samba server. I can't get out to the Internet or ping some machines on 
my network.



-- Package-specific info:


selected information from lshal(1):



/proc/cpuinfo:

processor: 0
vendor_id: AuthenticAMD
cpu family: 16
model: 4
model name: AMD Phenom(tm) II X4 940 Processor
stepping: 2
cpu MHz: 800.000
cache size: 512 KB
physical id: 0
siblings: 4
core id: 0
cpu cores: 4
apicid: 0
initial apicid: 0
fpu: yes
fpu_exception: yes
cpuid level: 5
wp: yes
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 nonstop_tsc 
extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic 
cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

bogomips: 6027.62
TLB size: 1024 4K pages
clflush size: 64
cache_alignment: 64
address sizes: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor: 1
vendor_id: AuthenticAMD
cpu family: 16
model: 4
model name: AMD Phenom(tm) II X4 940 Processor
stepping: 2
cpu MHz: 800.000
cache size: 512 KB
physical id: 0
siblings: 4
core id: 1
cpu cores: 4
apicid: 1
initial apicid: 1
fpu: yes
fpu_exception: yes
cpuid level: 5
wp: yes
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 nonstop_tsc 
extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic 
cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

bogomips: 6027.48
TLB size: 1024 4K pages
clflush size: 64
cache_alignment: 64
address sizes: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor: 2
vendor_id: AuthenticAMD
cpu family: 16
model: 4
model name: AMD Phenom(tm) II X4 940 Processor
stepping: 2
cpu MHz: 800.000
cache size: 512 KB
physical id: 0
siblings: 4
core id: 3
cpu cores: 4
apicid: 2
initial apicid: 3
fpu: yes
fpu_exception: yes
cpuid level: 5
wp: yes
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 nonstop_tsc 
extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic 
cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

bogomips: 6027.48
TLB size: 1024 4K pages
clflush size: 64
cache_alignment: 64
address sizes: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate

processor: 3
vendor_id: AuthenticAMD
cpu family: 16
model: 4
model name: AMD Phenom(tm) II X4 940 Processor
stepping: 2
cpu MHz: 800.000
cache size: 512 KB
physical id: 0
siblings: 4
core id: 2
cpu cores: 4
apicid: 3
initial apicid: 2
fpu: yes
fpu_exception: yes
cpuid level: 5
wp: yes
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 nonstop_tsc 
extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic 
cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt

bogomips: 6027.48
TLB size: 1024 4K pages
clflush size: 64
cache_alignment: 64
address sizes: 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate




-- System Information:
Debian Release: squeeze/sid
 APT prefers testing
 APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages qemu-kvm depends on:
ii  adduser 3.112add and remove users and groups
ii  bridge-utils1.4-5Utilities for configuring 
the Linu
ii  iproute 20091226-1   networking and traffic 
control too
ii  libasound2  1.0.21a-1shared library for ALSA 
applicatio
ii  libbluetooth3   4.60-1   Library to use the BlueZ 
Linux Blu
ii  libbrlapi0.54.1-4braille display access vi