Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
netzwerk kvm
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Tue Oct 04, 2011 12:36 pm    Post subject: Reply with quote

pieter_parker wrote:
schon, aber das muss doch auch alles ohne gehen


auch diesmal hat die Google Suche geholfen: http://www.linux-kvm.org/page/FAQ#.22rect_too_big.22_Message_when_using_VNC_Display und als zusätzliche Information: der faule Admin schreibt nicht jedes Mal den ganzen Befehl hin zum starten eine VM, sondern bedient sich "Tools" die das für ihn machen, deswegen libvirt und virt-manager.

pieter_parker wrote:
wie verbinde ich mich in eine vm wo eine graifsche oberflaeche laeuft?
auch ueber vnc oder gab es da vom xserver aus nicht eine funktion fuer?


Was denkst du denn wie sonst?

MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Wed Oct 05, 2011 7:27 am    Post subject: Reply with quote

ok, aber wie soll das mit libvirt und virt-manager funktionieren
libvirtd laeuft
im virt-manager sehe ich nur stehen "localhost (QEMU)"
ich habe vorher 2 vm von der konsole aus gesatartet
warum werdne diese nicht angezeigt im virt-manager


mache ich
virsh --connect qemu:///system
hab ich eine konsole
mache ich dort list
sehe ich die vm nicht die ich vorher mit
kvm -net nic,macaddr=00:00:00:00:01:02 -net tap,ifname=tap1,script=no,downscript=no -hda hda1.img -cdrom install-x86-minimal-20110927.iso -boot d -vnc password -vnc 19268.0.1:0
gestartet habe
Back to top
View user's profile Send private message
yuhu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2006
Posts: 86

PostPosted: Wed Oct 05, 2011 8:41 am    Post subject: Reply with quote

libvirtd bzw virt-manager erkennt nicht, ob du eine VM per Hand in der Konsole gestartet hast.

Du musst diese VMs schon über virt-manager anlegen oder du schreibst die Konfiguration.

Das ganze liegt dann im Unterverzeichnis /etc/libvirtd/qemu

Das ganze sieht dann so aus
Code:
server ~ # tree /etc/libvirt/
/etc/libvirt/
|-- libvirtd.conf
|-- lxc.conf
|-- nwfilter
|   |-- allow-arp.xml
|   |-- allow-dhcp-server.xml
|   |-- allow-dhcp.xml
|   |-- allow-incoming-ipv4.xml
|   |-- allow-ipv4.xml
|   |-- clean-traffic.xml
|   |-- no-arp-spoofing.xml
|   |-- no-ip-multicast.xml
|   |-- no-ip-spoofing.xml
|   |-- no-mac-broadcast.xml
|   |-- no-mac-spoofing.xml
|   |-- no-other-l2-traffic.xml
|   |-- no-other-rarp-traffic.xml
|   |-- qemu-announce-self-rarp.xml
|   `-- qemu-announce-self.xml
|-- qemu
|   |-- autostart
|   |   `-- ipfire.xml -> /etc/libvirt/qemu/ipfire.xml
|   |-- ipfire.xml
|   |-- networks
|   |   |-- autostart
|   |   |   `-- default.xml -> ../default.xml
|   |   |-- vnet_iso.xml
|   |   |-- vnet_nat.xml
|   |   `-- vnet_route.xml
|   |-- vdr.xml
|   `-- work.xml
|-- qemu.conf
`-- storage
    |-- autostart
    |   |-- default.xml -> /etc/libvirt/storage/default.xml
    |   `-- virt.xml -> /etc/libvirt/storage/virt.xml
    |-- default.xml
    `-- virt.xml


Die Konfiguration einer VM liegt im xml Format vor und kannst mit virsh oder eben virt-manager bearbeiten.

Code:
server ~ # cat /etc/libvirt/qemu/work.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
  virsh edit work
or other application using the libvirt API.
-->

<domain type='kvm'>
  <name>work</name>
  <uuid>8a880810-a591-56d5-531e-3a6b1aded7b3</uuid>
  <memory>1048576</memory>
  <currentMemory>1048576</currentMemory>
  <vcpu>1</vcpu>
  <os>
    <type arch='x86_64' machine='pc-0.13'>hvm</type>
    <boot dev='network'/>
    <bootmenu enable='no'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu match='exact'>
    <model>Westmere</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='rdtscp'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='x2apic'/>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-kvm</emulator>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:fc:a8:85'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>


Wenn die VM dann via virsh oder virt-manager gestartet wurde, sieht das in etwa so aus.

Code:
server ~ # ps -ef | grep work | grep kvm
root      3396     1  0 Oct02 ?        00:24:13 /usr/bin/qemu-system-x86_64 --enable-kvm -S -M pc-0.13 -cpu core2duo,+lahf_lm,+rdtscp,+aes,+popcnt,+x2apic,+sse4.2,+sse4.1,+xtpr,+cx16,+tm2,+est,+vmx,+ds_cpl,+pbe,+tm,+ht,+ss,+acpi,+ds -enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -name work -uuid 8a880810-a591-56d5-531e-3a6b1aded7b3 -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/work.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot order=n,menu=off -netdev tap,fd=18,id=hostnet0,vhost=on,vhostfd=19 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:fc:a8:85,bus=pci.0,multifunction=on,addr=0x3.0x0 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -usb -vnc 0.0.0.0:1 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,multifunction=on,addr=0x5.0x0


cu
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Wed Oct 05, 2011 11:04 am    Post subject: Reply with quote

Und wenn du eine laufende Version von libvirtd hast, dann werden sich deinen Netzwerkprobleme etc in Luft auflösen und der Rechner braucht dann "theoretisch" nicht mal eine GUI, weil du alles von Remote machen kannst.

MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Thu Oct 06, 2011 8:35 am    Post subject: Reply with quote

beim anlegen einer vm ueber virt-manager kommt hier kurz vor dem abschluss

Nicht erfasster Fehler bei Validierung von
Installationsparametern: Must pass VirtualDevice instance
Code:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1241, in validate
    return self.validate_final_page()
  File "/usr/share/virt-manager/virtManager/create.py", line 1501, in validate_final_page
    self.guest.add_device(self.nic)
  File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 666, in add_device
    raise ValueError(_("Must pass a VirtualDevice instance."))
ValueError: Must pass a VirtualDevice instance.


--

unabhaengig davon was tue ich gegen das problem mit vnc und der nicht syncrnen maus wie in ein paar beitraegen zuvor beschrieben?
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Thu Oct 06, 2011 9:38 am    Post subject: Reply with quote

pieter_parker wrote:
beim anlegen einer vm ueber virt-manager kommt hier kurz vor dem abschluss

Nicht erfasster Fehler bei Validierung von
Installationsparametern: Must pass VirtualDevice instance
Code:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/create.py", line 1241, in validate
    return self.validate_final_page()
  File "/usr/share/virt-manager/virtManager/create.py", line 1501, in validate_final_page
    self.guest.add_device(self.nic)
  File "/usr/lib/python2.7/site-packages/virtinst/Guest.py", line 666, in add_device
    raise ValueError(_("Must pass a VirtualDevice instance."))
ValueError: Must pass a VirtualDevice instance.





https://forums.gentoo.org/viewtopic-t-884912-view-previous.html?sid=0b4f73a6b9c4352b93127b8cc8527297

pieter_parker wrote:

--

unabhaengig davon was tue ich gegen das problem mit vnc und der nicht syncrnen maus wie in ein paar beitraegen zuvor beschrieben?


google hilft dir dabei!
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
yuhu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2006
Posts: 86

PostPosted: Thu Oct 06, 2011 4:07 pm    Post subject: Reply with quote

Wenn ich mich richtig erinnere hatte ich das gleiche Problem.

Als Abhilfe habe ich die erste VM von einer Vorlage (xml) kopiert.
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Sat Oct 08, 2011 7:51 am    Post subject: Reply with quote

ich finde im internet nichts dazu warum die maus vom kde mit der maus im kvm-vnc nicht syncron ist

ich finde im netz auch nichts dazu wo ich im virt-manager sagen kann das ich tap1 an der netwerkkarte haben will
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Sat Oct 08, 2011 1:36 pm    Post subject: Reply with quote

Weil das mit der Maus nichts mit der VM zu tun, das ist ein VNC Problem, VNC ist einfach ein besch... Protokoll.

Ich hatte weiter oben ein Buch verlinkt, da ist auch Kapitel zu libvirt drin, dass du nichts findest glaube ich dir nicht.

Py
Back to top
View user's profile Send private message
yuhu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2006
Posts: 86

PostPosted: Sat Oct 08, 2011 3:42 pm    Post subject: Reply with quote

Quote:
ich finde im netz auch nichts dazu wo ich im virt-manager sagen kann das ich tap1 an der netwerkkarte haben will


Bei den VM Optionen solltest du eine NIC Device finde.

Dort wählst Du als Quellgerät "Specify shared device name" und schreibst unter Brücken-Name "tap1" hinein.
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Mon Oct 10, 2011 8:08 am    Post subject: Reply with quote

tap1 ist gestartet

ich fuege in der vm eine netzwerkkarte hinzu
host-gerät: specify shared device name
brücken-name: tap1
mac-adresse: 52:54:00:46:b7:c7
gerätemodell: hypervisor-standart
sage dann abschliessen und will die vm starten
ein fenster mit folgendem hinhalt erscheint dann
Error starting domain: Interner Fehler Failed to add tap interface to bridge. tap1 is not a bridge device
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 44, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 65, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/domain.py", line 1050, in startup
self._backend.create()
File "/usr/lib/python2.7/site-packages/libvirt.py", line 457, in create
if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirtError: Interner Fehler Failed to add tap interface to bridge. tap1 is not a bridge device
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Mon Oct 10, 2011 9:40 am    Post subject: Reply with quote

Ist tap1 eine Brücke?

ich tippe mal auf nein.

Benutze mal den grafischen virt-manager, mit dem kannst die Netze nach Bedarf zusammenklicken.

Py
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Mon Oct 10, 2011 9:54 am    Post subject: Reply with quote

ich starte den virt-manager ueber virt-manager
wo soll ich dort was zusammenclicken koennen mit den netzwerk einstellungen?
ich clicke auf meine vm
dann clicke ich auf anzeigen > details
dort kann ich einstellungen betreffend der vm vornehmen
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Wed Oct 12, 2011 3:44 pm    Post subject: Reply with quote

Mal ganz blöd gefragt, aber als welcher User versuchst du das alles?

MfG Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Wed Oct 12, 2011 4:01 pm    Post subject: Reply with quote

als root kommt:
Code:
virt-manager
g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.
Beendet


es funktioniert nur als user, werde aber beim programmstart nach dem root pw gefragt, gebe es ein und bin im virt-manager
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Sun Oct 16, 2011 8:04 am    Post subject: Reply with quote

als welcher user muss ich es denn starten?
Back to top
View user's profile Send private message
yuhu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2006
Posts: 86

PostPosted: Sun Oct 16, 2011 11:06 am    Post subject: Reply with quote

Bei mir läuft der der virt-manager als normaler Benutzer. Da habe ich nichts spezielles eingestellt.
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Sun Oct 16, 2011 3:11 pm    Post subject: Reply with quote

gut

aber woran kanns liegen das ich bei mir kein tap1 dev hinzufuegen kann

?
Back to top
View user's profile Send private message
yuhu
Tux's lil' helper
Tux's lil' helper


Joined: 17 Oct 2006
Posts: 86

PostPosted: Sun Oct 16, 2011 4:50 pm    Post subject: Reply with quote

Läuft bei Dir noch immer nichts mit virt-manager?

Oder scheitert es nur noch an der richtigen Netzwerkkonfiguration?
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Sun Oct 16, 2011 9:00 pm    Post subject: Reply with quote

beides richtig

bei mir laeuft immer noch nichts mit virt-manager weil es mit der netzwerkconfiguration ueberhaupt nicht funktionieren will

ohne laeuft es

ich kann vom virt-manager nicht auf tap1 zugreifen

was muss ich tun
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Mon Oct 17, 2011 12:20 pm    Post subject: Reply with quote

Wieso zum Geier reitest du immer auf TAP1 rum? Ist dieses Device etwa schon angelegt? Jede VM braucht mit/ohne Bridging ein eigenes Interface fürs Netzwerk. Also ein eigenes TAP/TUN Interface. Weiterhin kannst du auch nur Befehle wie brctl oder die usermode-utils ausführen, wenn du root-Rechte hast. Das kann man aber mit Gruppen modifizieren. Schau auch mal als welcher User dein libvirtd läuft. Da musst du nämlich auch an der Konfiguration arbeiten, sonst wird das mit dem virt-manager überhaupt nichts.

Um eventuell zu verstehen was du dort machen willst, solltest du auf jeden Fall erstmal verstehen wie Netzwerk mit KVM/XEN etc funktioniert. Nur die Befehle blind einhacken hilft nämlich nicht zu lernen...

MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Wed Oct 19, 2011 10:35 am    Post subject: Reply with quote

tap1 ist fuer die erste vm
tap2 fuer die zweite
usw

libvirtd laeuft als root

an welcher configuration muss ich arbeiten?

liegt das problem darin das der user der virt-manager startet nicht auf die tap-devs zugreifen kann?
wenn es daran liegt, wie loese ich das?

als root kann ich ueber die konsole die vm mit einem tap der tap dev starten und es funktioniert
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1844
Location: Oranienburg/Germany

PostPosted: Wed Oct 19, 2011 11:08 am    Post subject: Reply with quote

So, als aller erstes solltest du mal hier schaun:

http://en.gentoo-wiki.com/wiki/KVM und insbesondere hiermit: http://en.gentoo-wiki.com/wiki/KVM#Packages und hiermit: http://en.gentoo-wiki.com/wiki/KVM#Networking_2

Damit du die Netzwerkkonfiguration sauber vorbereiten kannst!

Und dann beschäftigst du dich bitte mit libvirtd. Im besonderen Fall hinsichtlich den Berechtigungen:

http://libvirt.org/auth.html

Und ganz zum Schluss, wenn du nicht bridged über ethX arbeitest, dann solltest du dir mal die netfilter-Howtos zu Gemüte ziehen.

Und dann schauen wir nochmal, wenn es garnicht geht.

MfG. Stefan
_________________
Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Tue Oct 25, 2011 8:02 pm    Post subject: Reply with quote

danke fuer die hilfe ... aber das mit den rechten beim libvirt verstehe ich noch nicht ganz
gibt es der verstaendnis halber so ein howto auf deutsch, oder kann mir jemmand bitte sagen was ich genau nun machen muss damit das mit dem virt-manager und dem netzwerk funktioniert
verzweifel bald
Back to top
View user's profile Send private message
pieter_parker
Veteran
Veteran


Joined: 07 Aug 2006
Posts: 1488
Location: 127.0.0.1

PostPosted: Tue Nov 01, 2011 7:55 am    Post subject: Reply with quote

wie muss ich vorgehen?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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