Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[KVM / Réseau] Virtio, Interface non dectectée
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
KageBunshinNoGentoo
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2006
Posts: 125

PostPosted: Tue Sep 29, 2009 7:39 am    Post subject: [KVM / Réseau] Virtio, Interface non dectectée Reply with quote

Bonjour,

Je reviens vers vous car j'essaie d'optimiser les performances des VM en utilisant VIRTIO.
J'ai suivi les instructions du site officiel http://www.linux-kvm.org.

Tout fonctionne correctement, sauf l'attribution d'une adresse par le DHCP.

Commande utilisée :
Code:
kvm -name "mamachine" -localtime -drive file=/path/to/debian.raw,if=virtio,boot=on -boot c -m 512 -net nic,macaddr=52:54:00:12:34:50,model=virtio -net tap,ifname=qtap0,script=no,downscript=no -daemonize -vga std


Logs récupérés sur la machine virtuelle
Code:

ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:50 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:42 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000
          RX bytes:4132 (4.0 KiB)  TX bytes:5480 (5.3 KiB)

lo        Link encap:Boucle locale 
          inet adr:127.0.0.1  Masque:255.0.0.0
          adr inet6: ::1/128 Scope:Hôte
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:0
          RX bytes:560 (560.0 B)  TX bytes:560 (560.0 B)


fichier /etc/network/interfaces
Quote:
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp


Code:
mii-tool
SIOCGMIIPHY on 'eth0' failed: Operation not supported
no MII interfaces found


Code:
lspci -v
00:03.0 Ethernet controller: Qumranet, Inc. Device 1000
   Subsystem: Qumranet, Inc. Device 0001
   Flags: fast devsel, IRQ 11
   I/O ports at c020 [size=32]
   Memory at f0000000 (32-bit, non-prefetchable) [size=4K]
   Capabilities: [40] MSI-X: Enable- Mask- TabSize=3
   Kernel driver in use: virtio-pci
   Kernel modules: virtio_pci



Lorsque je configure l'interface eth0 en fixe cela fonctionne.
Par ailleurs, auriez vous une documentation décrivant le fonctionnement (et l'intérêt) du vde et comment le mettre en oeuvre?

Merci d'avance;


Last edited by KageBunshinNoGentoo on Tue Sep 29, 2009 5:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
KageBunshinNoGentoo
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2006
Posts: 125

PostPosted: Tue Sep 29, 2009 1:15 pm    Post subject: Reply with quote

Bon j'ai un peu avancé sur le sujet, vais continuer les recherhes.

En regardant les logs, je m'aperçois du message suivant :

Quote:
Starting...
Sep 29 17:05:49 mamachine NetworkManager: <info> eth0: Driver 'virtio_net' does not support carrier detection.#012#011You must switch to it manually.
Sep 29 17:05:49 mamachine NetworkManager: <info> nm_device_init(): waiting for device's worker thread to start
Sep 29 17:05:49 mamachine NetworkManager: <info> nm_device_init(): device's worker thread started, continuing.
Sep 29 17:05:49 mamachine NetworkManager: <info> Now managing wired Ethernet (802.3) device 'eth0'.
Sep 29 17:05:49 mamachine NetworkManager: <info> Deactivating device eth0


Je suis obligé d'activer l'interface manuellement.
Vais googliser :)
Back to top
View user's profile Send private message
man in the hill
Veteran
Veteran


Joined: 15 Dec 2005
Posts: 1552
Location: Madinina

PostPosted: Tue Sep 29, 2009 2:43 pm    Post subject: Reply with quote

Salut,

As-tu crées un pont sur l'Hôte sinon regarde ICI
_________________
Get Up and Go !
Back to top
View user's profile Send private message
KageBunshinNoGentoo
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2006
Posts: 125

PostPosted: Tue Sep 29, 2009 5:35 pm    Post subject: Reply with quote

Salut man,

Oui oui, j'ai bien configuré un pont qui fonctionne parfaitement lorsque je n'utilise pas le mode virtio.

Avec virtio, lorsque je démarre la VM, l'interface n'est pas détectée par l'OS, il faut que je l'active manuellement.
Back to top
View user's profile Send private message
ppg
Apprentice
Apprentice


Joined: 05 Oct 2008
Posts: 178
Location: Toulouse

PostPosted: Tue Sep 29, 2009 7:25 pm    Post subject: Reply with quote

KageBunshinNoGentoo wrote:
Bon j'ai un peu avancé sur le sujet, vais continuer les recherhes.

En regardant les logs, je m'aperçois du message suivant :

Quote:
Starting...
Sep 29 17:05:49 mamachine NetworkManager: <info> eth0: Driver 'virtio_net' does not support carrier detection.#012#011You must switch to it manually.
Sep 29 17:05:49 mamachine NetworkManager: <info> nm_device_init(): waiting for device's worker thread to start
Sep 29 17:05:49 mamachine NetworkManager: <info> nm_device_init(): device's worker thread started, continuing.
Sep 29 17:05:49 mamachine NetworkManager: <info> Now managing wired Ethernet (802.3) device 'eth0'.
Sep 29 17:05:49 mamachine NetworkManager: <info> Deactivating device eth0


Je suis obligé d'activer l'interface manuellement.
Vais googliser :)


Il me semblait avoir lu que network manager ne supporte pas les bridge réseau donc je sais pas si tu vas pouvoir utiliser nm_applet et le bridge.
Je me suis aidé de la doc de libvirt pour configurer mon réseau :
http://wiki.libvirt.org/page/Networking

Il y a des exemples pour debian/ubuntu et fedora/RedHat, mais ça devrait pouvoir s'adapter facilement à gentoo.
À titre d'exemple voici ce que j'ai pour un "invité" ubuntu :
/etc/network/interfaces
Code:

auto lo
iface lo inet loopback


J'utilise virt-manager pour gérer mes vms.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum