Ubuntu Suomen keskustelualueet
Ubuntun käyttö => Ohjelmointi, palvelimet ja muu edistyneempi käyttö => Aiheen aloitti: Asmo Koskinen - 09.10.08 - klo:21.56
-
Nyt loppuu tiedot ja taidot.
https://help.ubuntu.com/community/KVM
Olen saanut Jeos-levyn asennettua KVM:ään. Sekä host-kone (Ubuntu 8.04.1) että client-kone (Jeos 8.04.1) pääsevät nettiin ja pingaavat saman router-ip-numeron. Client hakee dhcp:llä ip-numeronsa.
Pitääkö ip olla sama 192.168.1.101 joka paikassa? Pitääkö jossain olla vielä joku NAT?
Host - interfaces.
asmok@ubuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.101
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
# The virtual network interface
auto br0
iface br0 inet static
address 192.168.1.110
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
asmok@ubuntu:~$
Host - ifconfig.
asmok@ubuntu:~$ ifconfig
br0 Link encap:Ethernet HWaddr 00:19:d1:e1:38:2a
inet addr:192.168.1.110 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:d1ff:fee1:382a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8700 errors:0 dropped:0 overruns:0 frame:0
TX packets:5598 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8742574 (8.3 MB) TX bytes:736114 (718.8 KB)
eth0 Link encap:Ethernet HWaddr 00:19:d1:e1:38:2a
inet6 addr: fe80::219:d1ff:fee1:382a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10624 errors:0 dropped:0 overruns:0 frame:0
TX packets:6580 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:9584807 (9.1 MB) TX bytes:960226 (937.7 KB)
Base address:0x30c0 Memory:90300000-90320000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12703 errors:0 dropped:0 overruns:0 frame:0
TX packets:12703 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5711233 (5.4 MB) TX bytes:5711233 (5.4 MB)
vnet0 Link encap:Ethernet HWaddr 00:ff:3e:97:e9:11
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::70d6:45ff:fefe:63c8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2859 errors:0 dropped:0 overruns:0 frame:0
TX packets:4724 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:189802 (185.3 KB) TX bytes:6920524 (6.5 MB)
vnet1 Link encap:Ethernet HWaddr 00:ff:3e:97:e9:11
inet6 addr: fe80::2ff:3eff:fe97:e911/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2861 errors:0 dropped:0 overruns:0 frame:0
TX packets:6648 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:230512 (225.1 KB) TX bytes:7017225 (6.6 MB)
asmok@ubuntu:~$
Client - interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
Client - ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:3e:7b:31:a2
inet addr:192.168.122.123 Bcast:192.168.122.255 Mask:255.255.255.0
inet6 addr: fe80::216:3eff:fe7b:31a2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7149 errors:0 dropped:0 overruns:0 frame:0
TX packets:2882 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6943151 (6.6 MB) TX bytes:265314 (259.0 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Ystävällisin terveisin Asmo Koskinen.
-
Sekä host-kone (Ubuntu 8.04.1) että client-kone (Jeos 8.04.1) pääsevät nettiin ja pingaavat saman router-ip-numeron.
Jeos toimii ihan hyvin ulospäin.
1: 192.168.122.123 (192.168.122.123) 0.082ms pmtu 1500
1: 192.168.122.1 (192.168.122.1) 0.437ms
1: 192.168.122.1 (192.168.122.1) 0.428ms
2: DD-WRT (192.168.1.1) 1.782ms
3: TeleWell.gateway (192.168.0.254) 8.418ms
4: adsl-85-157-204-1.regionline.fi (85.157.204.1) 34.589ms
5: cs9.netikka.fi (81.209.4.9) 36.493ms asymm 6
6: vaa1-tr1.dnaip.fi (217.78.199.37) 36.770ms asymm 7
7: pri1-tr1.dnaip.fi (62.78.107.10) 46.859ms asymm 16
8: rma1-tr1.dnaip.fi (62.78.107.8) 45.738ms asymm 15
9: tur1-tr1.dnaip.fi (62.78.107.24) 46.304ms asymm 14
10: hel1-tr1.dnaip.fi (217.78.198.145) 45.078ms
11: esp1-tr1.dnaip.fi (217.78.198.210) 44.660ms asymm 12
12: csc.ficix1-ge.ficix.fi (193.110.226.14) 47.642ms asymm 13
13: helsinki0-x4100-csc0.funet.fi (193.166.255.154) 42.557ms asymm 11
14: csc4-g3100-helsinki0.funet.fi (193.166.187.181) 43.812ms asymm 11
15: ftp.funet.fi (193.166.3.2) 43.727ms reached
Resume: pmtu 1500 hops 15 back 245
Ystävällisin terveisin Asmo Koskinen.
-
Jeos toimii ihan hyvin ulospäin.
Nyt se toimii - host <> client.
asmok@ubuntu:~$ ssh jeos@192.168.122.123
jeos@192.168.122.123's password:
Linux ubuntu-jeos 2.6.24-19-virtual #1 SMP Wed Jun 18 15:52:10 UTC 2008 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Thu Oct 9 23:01:00 2008 from 192.168.122.1
jeos@ubuntu-jeos:~$
jeos@ubuntu-jeos:~$ ssh asmok@192.168.1.101
asmok@192.168.1.101's password:
Linux ubuntu 2.6.24-19-rt #1 SMP PREEMPT RT Thu Aug 21 02:08:03 UTC 2008 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Thu Oct 9 23:08:44 2008 from 192.168.122.123
asmok@ubuntu:~$
Ystävällisin terveisin Asmo Koskinen.
-
https://help.ubuntu.com/community/KVM
Täytyy jatkaa tällä huomenna.
https://wiki.edubuntu.org/KvmWithBridge
Ystävällisin terveisin Asmo Koskinen.
-
Nyt host-koneen interfaces-tiedosto näyttää tältä. Kaikki toimii edelleen (yhteydet Internettiin ja ssh-yhteydet host <> client). Vielä kun selvitän suoran yhteyden luomisen client-koneeseen, niin tästä tulee mielenkiintoista.
asmok@ubuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto br0
iface br0 inet static
address 192.168.1.101
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
bridge_ports eth0
bridge_fd 9
bridge_hello 2
bridge_maxage 12
bridge_stp off
asmok@ubuntu:~$
Ystävällisin terveisin Asmo Koskinen.
-
https://help.ubuntu.com/community/KVM
https://wiki.edubuntu.org/KvmWithBridge
https://help.ubuntu.com/8.04/serverguide/C/virtualization.html
Siinäpä tavattavaa näin Kiven päivän kunniaksi.
"Kaksi päivää on mennyt. Lukkarin väkituvassa pöydän ympärillä istuvat veljet, jämäten aapistoa niinkuin sanelee heille milloin lukkari itse ja milloin hänen pieni kahdeksanvuotias tyttärensä. Niin he, aapiskirjat avattuina kourissa, harjoittelevat lukua hartaasti, hikisillä otsilla."
http://www.pori.fi/kirjasto/e-kirja/7veljesta.htm#Luku2
Ystävällisin terveisin Asmo Koskinen.
-
Ok. Nyt toimii kiinteä ip client-koneella. Siihen saa vnc/vinagre-yhteyden myös. Ruutukaappaus ohessa.
Ystävällisin terveisin Asmo Koskinen.
[ylläpito on poistanut liitteen]
-
Nyt loppuu tiedot ja taidot.
Ratkaistu!
1) dhcpd ja/tai dhcdbd sammutetaan/poistetaan host-koneesta.
2) virt-install client-asennus vivulla " --network bridge:br0".
asmok@ubuntu:/media/vm$ \
virt-install -n jeos -r 512 -f jeos.img -s 4 \
-c /home/asmok/Bin/ISO/jeos-8.04.1-jeos-i386.iso \
--network bridge:br0 --accelerate --connect=qemu:///system --vnc --noautoconsole
3) VM-koneen asennukseen ja käyttöön ei tarvita root/sudo oikeuksia.
4) Asus Eee - 192.168.105 | host - 192.168.1.101 | client - 192.168.1.110
asmok@ubuntu-eee:~$ sudo ping 192.168.1.101
PING 192.168.1.101 (192.168.1.101) 56(84) bytes of data.
64 bytes from 192.168.1.101: icmp_seq=1 ttl=64 time=0.689 ms
64 bytes from 192.168.1.101: icmp_seq=2 ttl=64 time=0.667 ms
--- 192.168.1.101 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.667/0.678/0.689/0.011 ms
asmok@ubuntu-eee:~$ sudo ping 192.168.1.110
PING 192.168.1.110 (192.168.1.110) 56(84) bytes of data.
64 bytes from 192.168.1.110: icmp_seq=1 ttl=64 time=0.717 ms
64 bytes from 192.168.1.110: icmp_seq=2 ttl=64 time=0.665 ms
--- 192.168.1.110 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.665/0.691/0.717/0.026 ms
asmok@ubuntu-eee:~$
5) Turvallinen etäyhteys client-koneeseen Asus EEe-koneelta. Edellinen ssh-yhteys on ollut host-koneelta.
asmok@ubuntu-eee:~$ ssh jeos@192.168.1.110
The authenticity of host '192.168.1.110 (192.168.1.110)' can't be established.
RSA key fingerprint is f3:fe:09:5c:1b:e4:b9:b1:74:75:c3:c0:c6:98:3b:c3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.110' (RSA) to the list of known hosts.
jeos@192.168.1.110's password:
Linux ubuntu-jeos 2.6.24-19-virtual #1 SMP Thu Aug 21 00:52:59 UTC 2008 i686
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/
Last login: Sun Oct 12 02:09:36 2008 from 192.168.1.101
jeos@ubuntu-jeos:~$
6) Wikissä ei ole vielä tästä ohjetta, kirjoitan kunhan perehdyn hieman tähän KVM-maailmaan. Nyt Wikissä on vain tämä: http://wiki.ubuntu-fi.org/VirtualBox
7) Muutama ruutukaappaus Jeos-vm-koneen käynnistymisestä.
http://www.arkki.info/howto/KVM/
Hyvää yötä, Asmo Koskinen.
-
Hyvää yötä, Asmo Koskinen.
Syysloman iloja...
Olen tyrmistynyt. LTSP5 toimii heittämällä VM-koneessa KVM:n alaisuudessa. Olin varma, että se ei voi toimia. Kun tekee Hardy 8.04.1 LTSP5-asennuksen VM-koneeksi, niin asennuksen jälkeen ei esimerkiksi äänet toimi, koska virtuaalikoneessa ei ole äänikorttia. Grafiikkapiirikin on aika surkea.
Tämä lspci-tuloste virtuaalikoneesta.
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.2 USB Controller: Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II] (rev 01)
00:02.0 VGA compatible controller: Cirrus Logic GD 5446
00:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 20)
Mutta LTSP5:lle on ihan sama, mitä palvelimella on, koska LTSP5 on tarpeeksi älykäs käyttämään päätteen rautaa. Joten päätteessä toimi heittämällä USB-tikku, äänet ja kaikki!
En minäkään uskoisi, ellen näkisi ja kuulisi päätettä tuossa vieressä:
http://www.arkki.info/howto/KVM/KVM_04.png
Päätteen IP-numero kertoo, että olemme virtuaalikoneessa - 192.168.1.120.
----
Mitä voi sanoa - ilmaisia, vapaasti saatavilla olevia ja vakaita ratkaisuja - Linux Rocks!!! Huh, huh.
Ystävällisin terveisin Asmo Koskinen.
-
6) Wikissä ei ole vielä tästä ohjetta, kirjoitan kunhan perehdyn hieman tähän KVM-maailmaan. Nyt Wikissä on vain tämä: http://wiki.ubuntu-fi.org/VirtualBox
Mitä sitä perehtymään, käyttämään vain 8)
Teen illalla ohjeen ruutukaappauksin (Jeos, Minimal Ubuntu Server ja Ubuntu 8.04.1 Alternate/LTSP5).
PS. Taidan tietää jo, mitä teemme Valamossa tammikuussa 8)
Ystävällisin terveisin Asmo Koskinen.
-
http://www.arkki.info/howto/KVM/KVM_04.png
KVM-teknologia (varmasti muutkin vastaavat) on mahtavaa. Voin päivittää chrootin atl2-ajurilla ja näin saada Asus Eee:n toimimaan tässä virtuaalisessa ympäristössä. Hämmästyttävintä on todellakin verkkokortin täysin läpinäkyvä (silta)käyttö. Eikä tämä teknologia ole kuin 1,5 vuotta vanhaa.
http://kernelnewbies.org/Linux_2_6_20#head-bca4fe7ffe454321118a470387c2be543ee51754
Ei mikään ihme, että RedHat osti innovaation... http://www.redhat.com/promo/qumranet/
Asus Eee virtuaalikoneessa:
http://www.arkki.info/howto/KVM/KVM_TC_02.png
Ystävällisin terveisin Asmo Koskinen.
-
Wiki-ohje:
http://wiki.ubuntu-fi.org/KVM
Keskustelu tässä ketjussa:
http://forum.ubuntu-fi.org/index.php?topic=22057.0
Ystävällisin terveisin Asmo Koskinen.