Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Witam
Ostatnio zacząłem się bawić xen-em.
Przy odpalaniu virutalnej maszynki dostaje kernel panic:
xm create -c /etc/xen/virtualka Using config file "/etc/xen/virtualka". Started domain vm02 Linux version 2.6.18-6-xen-686 (Debian 2.6.18.dfsg.1-18etch5) (dannf@debian.org) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP Sat May 24 14:16:03 UTC 2008 BIOS-provided physical RAM map: Xen: 0000000000000000 - 0000000008800000 (usable) 0MB HIGHMEM available. 136MB LOWMEM available. ACPI in unprivileged domain disabled Built 1 zonelists. Total pages: 34816 Kernel command line: ip=192.168.0.102:1.2.3.4:192.168.1.1:255.255.255.0:vm02:eth0:off root=/dev/sda1 ro 4 Enabling fast FPU save and restore... done. Enabling unmasked SIMD FPU exception support... done. Initializing CPU#0 PID hash table entries: 1024 (order: 10, 4096 bytes) Xen reported: 2683.866 MHz processor. Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) Software IO TLB disabled vmalloc area: c9000000-f51fe000, maxmem 2d7fe000 Memory: 126488k/139264k available (1580k kernel code, 4440k reserved, 588k data, 148k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok. Calibrating delay using timer specific routine.. 6720.83 BogoMIPS (lpj=13441670) Security Framework v1.0.0 initialized SELinux: Disabled at boot. Capability LSM initialized Mount-cache hash table entries: 512 CPU: Trace cache: 12K uops, L1 D cache: 16K CPU: L2 cache: 256K Checking 'hlt' instruction... OK. SMP alternatives: switching to UP code Freeing SMP alternatives: 12k freed Brought up 1 CPUs migration_cost=0 Grant table initialized NET: Registered protocol family 16 Brought up 1 CPUs PCI: setting up Xen PCI frontend stub ACPI: Interpreter disabled. Linux Plug and Play Support v0.97 (c) Adam Belay pnp: PnP ACPI: disabled xen_mem: Initialising balloon driver. PCI: System does not support PCI PCI: System does not support PCI NET: Registered protocol family 2 IP route cache hash table entries: 2048 (order: 1, 8192 bytes) TCP established hash table entries: 8192 (order: 4, 65536 bytes) TCP bind hash table entries: 4096 (order: 3, 32768 bytes) TCP: Hash tables configured (established 8192 bind 4096) TCP reno registered audit: initializing netlink socket (disabled) audit(1213104928.479:1): initialized VFS: Disk quotas dquot_6.5.1 Dquot-cache hash table entries: 1024 (order 0, 4096 bytes) Initializing Cryptographic API io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize Xen virtual console successfully installed as tty1 Event-channel device installed. netfront: Initialising virtual ethernet driver. PNP: No PS/2 controller found. Probing ports directly. i8042.c: No controller found. mice: PS/2 mouse device common for all mice TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 NET: Registered protocol family 8 NET: Registered protocol family 20 Using IPI No-Shortcut mode Registering block device major 8 netfront: device eth0 has flipping receive path. No filesystem could mount root, tried: cramfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,1)
Plik konfiguracyjny wyglada tak:
cat /etc/xen/virtualka name="vm02" kernel="/boot/vmlinuz-2.6.18-6-xen-686" initrd="/boot/initrd.img-2.6.18-6-xen-686" root="/dev/sda1 ro" memory=128 disk=['file:/home3/xens/burkesys/xen_debian.img,sda1,w','file:/home3/xens/burkesys/xen_debian_swap.img,sda2,w'] # network vif=[ 'ip=192.168.0.102' ] dhcp="off" ip="192.168.0.102" netmask="255.255.255.0" gateway="192.168.1.1" hostname="vm02" extra="4"
fstab w virtualce :
cat /mnt/xen/etc/fstab # UNCONFIGURED FSTAB FOR BASE SYSTEM /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 /dev/sda2 none swap sw 0 0 /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0
Jak sobie poradzić z tym błędem.
Będę wdzięczny za wszelkie sugestie.
Pozdrawiam
Ostatnio edytowany przez adam05 (2008-06-10 15:38:21)
Offline
popatrz moze w logach xend cos jest odnosnie problemow z dyskiem dla uruchamianej wirtualki
Offline
bercik napisał(-a):
popatrz moze w logach xend cos jest odnosnie problemow z dyskiem dla uruchamianej wirtualki
oto logi:
[2008-06-10 19:40:27 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.construct: None [2008-06-10 19:40:27 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.initDomain: 23 1.0 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) Balloon: 6616 KiB free; 125084 to scrub; need 131072; retries: 20. [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) Balloon: waiting on scrubbing [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) Balloon: 131704 KiB free; need 131072; done. [2008-06-10 19:40:27 xend 2988] INFO (__init__:1072) buildDomain os=linux dom=23 vcpus=1 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) dom = 23 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) image = /boot/vmlinuz-2.6.18-6-xen-686 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) store_evtchn = 1 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) console_evtchn = 2 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) cmdline = ip=192.168.0.102:1.2.3.4:192.168.1.1:255.255.255.0:vm02:eth0:off root=/dev/sda1 ro 4 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) ramdisk = [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) vcpus = 1 [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) features = [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) DevController: writing {'backend-id': '0', 'mac': '00:16:3e:17:37:82', 'handle': '0', 'state': '1', 'backend': '/local/domain/0/backend/vif/23/0'} to /local/domain/23/device/vif/0. [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) DevController: writing {'domain': 'vm02', 'handle': '0', 'script': '/etc/xen/scripts/vif-bridge', 'ip': '192.168.0.102', 'state': '1', 'frontend': '/local/domain/23/device/vif/0', 'mac': '00:16:3e:17:37:82', 'online': '1', 'frontend-id': '23'} to /local/domain/0/backend/vif/23/0. [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) exception looking up device number for sda1: [Errno 2] No such file or directory: '/dev/sda1' [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) DevController: writing {'backend-id': '0', 'virtual-device': '2049', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/23/2049'} to /local/domain/23/device/vbd/2049. [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) DevController: writing {'domain': 'vm02', 'frontend': '/local/domain/23/device/vbd/2049', 'dev': 'sda1', 'state': '1', 'params': '/home3/xens/burkesys/xen_debian.img', 'mode': 'w', 'online': '1', 'frontend-id': '23', 'type': 'file'} to /local/domain/0/backend/vbd/23/2049. [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) exception looking up device number for sda2: [Errno 2] No such file or directory: '/dev/sda2' [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) DevController: writing {'backend-id': '0', 'virtual-device': '2050', 'device-type': 'disk', 'state': '1', 'backend': '/local/domain/0/backend/vbd/23/2050'} to /local/domain/23/device/vbd/2050. [2008-06-10 19:40:27 xend 2988] DEBUG (__init__:1072) DevController: writing {'domain': 'vm02', 'frontend': '/local/domain/23/device/vbd/2050', 'dev': 'sda2', 'state': '1', 'params': '/home3/xens/burkesys/xen_debian_swap.img', 'mode': 'w', 'online': '1', 'frontend-id': '23', 'type': 'file'} to /local/domain/0/backend/vbd/23/2050. [2008-06-10 19:40:28 xend.XendDomainInfo 2988] DEBUG (__init__:1072) Storing VM details: {'shadow_memory': '0', 'uuid': '2b753095-c39b-1caa-0d0e-e3c4f3b06d39', 'on_reboot': 'restart', 'start_time': '1213119628.0', 'on_poweroff': 'destroy', 'name': 'vm02', 'vcpus': '1', 'vcpu_avail': '1', 'memory': '128', 'on_crash': 'restart', 'image': "(linux (kernel /boot/vmlinuz-2.6.18-6-xen-686) (ip 192.168.0.102:1.2.3.4:192.168.1.1:255.255.255.0:vm02:eth0:off) (root '/dev/sda1 ro') (args 4))", 'maxmem': '128'} [2008-06-10 19:40:28 xend.XendDomainInfo 2988] DEBUG (__init__:1072) Storing domain details: {'console/ring-ref': '94244', 'console/port': '2', 'name': 'vm02', 'console/limit': '1048576', 'vm': '/vm/2b753095-c39b-1caa-0d0e-e3c4f3b06d39', 'domid': '23', 'cpu/0/availability': 'online', 'memory/target': '131072', 'store/ring-ref': '94245', 'store/port': '1'} [2008-06-10 19:40:28 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.handleShutdownWatch [2008-06-10 19:40:28 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.handleShutdownWatch [2008-06-10 19:40:28 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.handleShutdownWatch [2008-06-10 19:40:32 xend.XendDomainInfo 2988] WARNING (__init__:1072) Domain has crashed: name=vm02 id=23. [2008-06-10 19:40:32 xend.XendDomainInfo 2988] ERROR (__init__:1072) VM vm02 restarting too fast (5.583829 seconds since the last restart). Refusing to restart to avoid loops. [2008-06-10 19:40:32 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.destroy: domid=23 [2008-06-10 19:40:32 xend.XendDomainInfo 2988] DEBUG (__init__:1072) XendDomainInfo.destroyDomain(23)
w zasadzie duzo mi to nie mowi oprocz tego:
exception looking up device number for sda1: [Errno 2] No such file or directory: '/dev/sda1'
Jak utworzyc urzadzenie /dev/sda1, oraz sda2 w pliku.img?
Offline
Bawisz się kernelem w wersji 2.6.18-6-xen-686. Może zmień nazwę dysku na /dev/hda.
Offline
hmmm....
No dobra... Temat mnie zaczyna denerwować. Nie zostawię tego tak poprostu, chce mieć virtualną maszynkę na Xenie!!! :]
Pytanie kieruję do osób , które miały już doświadczenie z Xenem.
W jaki sposób wy go instalowaliście?
Czy kernelek xen-owy z paczki czy sami kompilowaliście.
Czy jest może pod Debiana jakiś wizard , podobny do tego co jest w RH enterprise?
Jeżeli ma ktoś jakiś (sprawdzony) przepis to bardzo bym prosił o udostępnienie go w tym temacie :)
Z góry bardzo dziękuję
Pozdrawiam
adam05
Offline
ja sie zajmowalem xenem ... ale tak bardziej "profesjonalnie" czyli nie jakies plikopartycje tylko normalne partycje na dyskach
1. instalujemy sobie dom0 + xen-hypervisor (jadro dostosowane dla dom0 - linux-image-xen-686)
2. robimy sobie partycje rozszerzona lub na lvm i cp -ax / /mnt/nowa_partycja
3. dla domU jadro z paczki przeznaczone dla domU (paczka nazwyala sie xen-image-2.6....), obecnie po dwlaczniu kodu domU do glownej galezi CHYBA jest to zwykla paczka jadra
wlasnie jak teraz patrze na Twoj konfig to widze ze dla domU uzywasz chyba tegosamego jadra co dla dom0 ... na ogol tak dzialac nie bedzie ...
plikopartycji uzywala plyta bootowalna demonstrujaca xen'a ... mozesz poszukac obrazu i zobaczyc jak to tam bylo ...
Offline
Witam ponownie
Udało mi się w końcu odpalić virtualną maszynkę. Faktycznie był problem z kernelem z paczki.
Teraz ładnie śmiga ale mam problem z komunikacją pomiędzy kompem(dom0) , a virtualką(domU), nie działa ping, w ogóle się nie widzą :/
oto ifconfig z kompa (dom0)
eth0 Link encap:Ethernet HWaddr 00:E0:4C:EE:77:0F inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4cff:feee:770f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:24372 errors:0 dropped:0 overruns:0 frame:0 TX packets:23507 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2497118 (2.3 MiB) TX bytes:9989391 (9.5 MiB) Interrupt:19 Base address:0xb800 eth1 Link encap:Ethernet HWaddr 00:13:8F:9E:63:FD inet addr:217.172.232.11 Bcast:217.172.239.255 Mask:255.255.248.0 inet6 addr: fe80::213:8fff:fe9e:63fd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:17335 errors:0 dropped:0 overruns:0 frame:0 TX packets:11061 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8985182 (8.5 MiB) TX bytes:1322316 (1.2 MiB) 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:389 errors:0 dropped:0 overruns:0 frame:0 TX packets:389 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:36840 (35.9 KiB) TX bytes:36840 (35.9 KiB) peth1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:16958 errors:0 dropped:0 overruns:0 frame:0 TX packets:11143 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8961963 (8.5 MiB) TX bytes:1331810 (1.2 MiB) Interrupt:18 Base address:0xd400 vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:11061 errors:0 dropped:0 overruns:0 frame:0 TX packets:17335 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1322316 (1.2 MiB) TX bytes:8985182 (8.5 MiB) xenbr1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:1785 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:550020 (537.1 KiB) TX bytes:0 (0.0 b)
config virtualki:
cat /etc/xen/virtualka name="virtualka" kernel='/boot/vmlinuz-2.6.18-6-xen-686' ramdisk = '/boot/initrd.img-2.6.18-6-xen-686' memory=128 root="/dev/hda1 ro" disk=['file:/home2/xen/debian_root.img,hda1,w','file:/home2/xen/debian_swap.img,hda2,w'] # network vif = [ 'mac=aa:00:00:00:00:d2, bridge=xenbr1' ] #vif = [ '' ] #dhcp="off" #ip="192.168.1.2" #netmask="255.255.255.0" #gateway="192.168.1.1" #hostname="virtualka" #extra = "4"
Przy takich ustawieniach na virtualce ustawiam sobie ip 192.168.1.25 netmask 255.255.255.0 oraz gateway 192.168.1.1. Niestety bramy nie moge spingowac. :( ... No i także nie mogę spingować virtualnej maszyny z kompa.
Any ideas?
Pozdrawiam
Offline
brctl show bridge name bridge id STP enabled interfaces xenbr1 8000.feffffffffff no vif0.1 peth1 vif11.0
Good?
Edit: Dodam jeszcze że przed chwilką odpaliłem pod X-ami xenman-a i tam w informacjach dla dom0 oraz domU znalazlem cos takiego:
Network: N/A
:/
Jak to włączyć?
Pozdrawiam
Ostatnio edytowany przez adam05 (2008-06-19 10:29:28)
Offline
xenman'a nie znam ...
wynik brctl wyglada podejrzanie:
- w bridge jest interfejs ktorego nie pokazuje ifconfig ... czyzby byl w stanie down (nie powinien)
- bridgujesz eth1 z dom0 (adres publiczny) z eth0 z domU (adres praywatny)
zobacz ustawienia bridgea / sieci w /etc/xen/xend-config.sxp
ogolnie te vifX.Y odczytujemy ze jest to "drugi koniec" ethY w domU numer X ... w dom0 dostepne sa tez fizyczne karty - nazywane sa ethY (gdy sa udostepniane tylko w dom0 - nie wchodza w sklad bridgea) lub pethY gdy utworzono odpowiedni ethY i vif0.Y wchodzacy w sklad bridgea
czyli eth1 w dom0 jest podpiete do vif0.1 natomiast fizyczna karta sieciowa (w nie-xenowym systemie eth1) nazwana jest peth1 i aby byla ona dostepna przez eth1 bridgujemy peth1 z vif0.1
Offline
Dobra zaraz kurwicy z tym dostane :(
Czyli żeby wszystko śmigało jak powinienem to ustawić :(
w tej chwili /etc/xen/xend-config.sxp wyglada tak:
# -*- sh -*- # # Xend configuration file. # # This example configuration is appropriate for an installation that # utilizes a bridged network configuration. Access to xend via http # is disabled. # Commented out entries show the default for that entry, unless otherwise # specified. #(logfile /var/log/xen/xend.log) #(loglevel DEBUG) #(xend-http-server no) (xend-unix-server yes) #(xend-tcp-xmlrpc-server no) #(xend-unix-xmlrpc-server yes) #(xend-relocation-server no) #(xend-unix-path /var/lib/xend/xend-socket) # Port xend should use for the HTTP interface, if xend-http-server is set. #(xend-port 8000) # Port xend should use for the relocation interface, if xend-relocation-server # is set. #(xend-relocation-port 8002) # Address xend should listen on for HTTP connections, if xend-http-server is # set. # Specifying 'localhost' prevents remote connections. # Specifying the empty string '' (the default) allows all connections. #(xend-address '') #(xend-address localhost) # Address xend should listen on for relocation-socket connections, if # xend-relocation-server is set. # Meaning and default as for xend-address above. #(xend-relocation-address '') # The hosts allowed to talk to the relocation port. If this is empty (the # default), then all connections are allowed (assuming that the connection # arrives on a port and interface on which we are listening; see # xend-relocation-port and xend-relocation-address above). Otherwise, this # should be a space-separated sequence of regular expressions. Any host with # a fully-qualified domain name or an IP address that matches one of these # regular expressions will be accepted. # # For example: # (xend-relocation-hosts-allow '^localhost$ ^.*\.example\.org$') # #(xend-relocation-hosts-allow '') # The limit (in kilobytes) on the size of the console buffer #(console-limit 1024) ## # To bridge network traffic, like this: # # dom0: fake eth0 -> vif0.0 -+ # | # bridge -> real eth0 -> the network # | # domU: fake eth0 -> vifN.0 -+ # # use # #(network-script network-bridge) # # Your default ethernet device is used as the outgoing interface, by default. # To use a different one (e.g. eth1) use # (network-script 'network-bridge netdev=eth0') # # The bridge is named xenbr0, by default. To rename the bridge, use # (network-script 'network-bridge bridge=<xenbr1>') # # It is possible to use the network-bridge script in more complicated # scenarios, such as having two outgoing interfaces, with two bridges, and # two fake interfaces per guest domain. To do things like this, write # yourself a wrapper script, and call network-bridge from it, as appropriate. # #(network-script network-dummy) # The script used to control virtual interfaces. This can be overridden on a # per-vif basis when creating a domain or a configuring a new vif. The # vif-bridge script is designed for use with the network-bridge script, or # similar configurations. # # If you have overridden the bridge name using # (network-script 'network-bridge bridge=<name>') then you may wish to do the # same here. The bridge name can also be set when creating a domain or # configuring a new vif, but a value specified here would act as a default. # # If you are using only one bridge, the vif-bridge script will discover that, # so there is no need to specify it explicitly. # (vif-script vif-bridge) ## Use the following if network traffic is routed, as an alternative to the # settings for bridged networking given above. (network-script network-route) (vif-script vif-route) ## Use the following if network traffic is routed with NAT, as an alternative # to the settings for bridged networking given above. #(network-script network-nat) #(vif-script vif-nat) # Dom0 will balloon out when needed to free memory for domU. # dom0-min-mem is the lowest memory level (in MB) dom0 will get down to. # If dom0-min-mem=0, dom0 will never balloon out. (dom0-min-mem 196) # In SMP system, dom0 will use dom0-cpus # of CPUS # If dom0-cpus = 0, dom0 will take all cpus available (dom0-cpus 0) # Whether to enable core-dumps when domains crash. #(enable-dump no) # The tool used for initiating virtual TPM migration #(external-migration-tool '') # The interface for VNC servers to listen on. Defaults # to 127.0.0.1 To restore old 'listen everywhere' behaviour # set this to 0.0.0.0 #(vnc-listen '127.0.0.1') #
brctl show:
brctl show bridge name bridge id STP enabled interfaces xenbr1 8000.feffffffffff no vif0.1 peth1 vif22.0
za każdym razem jak restartuje xena i odpalam virtualke to się tworzy vif(x+1).0 :(((
cat /etc/xen/virtualka name="virtualka" kernel='/boot/vmlinuz-2.6.18-6-xen-686' ramdisk = '/boot/initrd.img-2.6.18-6-xen-686' memory=128 root="/dev/hda1 ro" disk=['file:/home2/xen/debian_root.img,hda1,w','file:/home2/xen/debian_swap.img,hda2,w'] # network vif = [ 'ip=192.168.0.101, mac=aa:00:00:00:00:d2, bridge=xenbr1' ]
ifconfig na dom0:
ifconfig eth0 Link encap:Ethernet HWaddr 00:E0:4C:EE:77:0F inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4cff:feee:770f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:220191 errors:0 dropped:0 overruns:0 frame:0 TX packets:298447 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:22075386 (21.0 MiB) TX bytes:356853342 (340.3 MiB) Interrupt:19 Base address:0xb800 eth1 Link encap:Ethernet HWaddr 00:13:8F:9E:63:FD inet addr:217.172.232.11 Bcast:217.172.239.255 Mask:255.255.248.0 inet6 addr: fe80::213:8fff:fe9e:63fd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:409164 errors:0 dropped:0 overruns:0 frame:0 TX packets:253911 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:380018562 (362.4 MiB) TX bytes:61946887 (59.0 MiB) 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:1904 errors:0 dropped:0 overruns:0 frame:0 TX packets:1904 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:819830 (800.6 KiB) TX bytes:819830 (800.6 KiB) peth1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:408599 errors:0 dropped:0 overruns:0 frame:0 TX packets:269733 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:380123612 (362.5 MiB) TX bytes:62806689 (59.8 MiB) Interrupt:18 Base address:0xd400 vif0.1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:253911 errors:0 dropped:0 overruns:0 frame:0 TX packets:409164 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:61946887 (59.0 MiB) TX bytes:380018562 (362.4 MiB) vif22.0 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::fcff:ffff:feff:ffff/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:163 errors:0 dropped:4 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1252 (1.2 KiB) TX bytes:53563 (52.3 KiB) xenbr1 Link encap:Ethernet HWaddr FE:FF:FF:FF:FF:FF inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:42281 errors:0 dropped:0 overruns:0 frame:0 TX packets:92 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:13908872 (13.2 MiB) TX bytes:12686 (12.3 KiB
oraz ifconfig na domU
virtualka:~# ifconfig eth0 Link encap:Ethernet HWaddr AA:00:00:00:00:D2 inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::a800:ff:fe00:d2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:178 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:58485 (57.1 KiB) TX bytes:1574 (1.5 KiB) 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:11 errors:0 dropped:0 overruns:0 frame:0 TX packets:11 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1120 (1.0 KiB) TX bytes:1120 (1.0 KiB)
Bardzo proszę o pomoc , gdyż nie chcę osiwieć w tym wieku :(((
Pozdrawiam
Offline
1. wzrost numerow domU w vif po kazdym odpaleniu wirtualki jest czyms normalnym
2. na moj gust w bridge powinno byc peth0 i vif0.0 a nie peth1 i vif0.1
3. konfig xend wyglada bardzo dziwnie - nie powinno tam byc po kilka razy ustawien vif-script i network-script ... ustaw:
(network-script network-bridge vifnum=0 bridge=xenbr0 netdev=eth0) (vif-script vif-bridge)
a reszte tych ustawien wykomentuj ... zmien takze oznaczenie bridgea w /etc/xen/virtualka ... po zmianach zrestartuj dom0
4. wczesniej pisales ze domU ma adres 192.168.1.25/24 a teraz ifconfig pokazuje 192.168.0.103/24 ... co powoduje ze dom0 i domU maja adresy w innych sieciach wiec (bez dodatkowo zdefiniowanego routingu) nie bedzie komunikacji - ustaw ip na domU z podsieci uzywanej na dom0 (ustawiaj w systemie domU ... ustawienie w /etc/xen/virtualka jest niepotrzebne)
Ostatnio edytowany przez bercik (2008-06-20 01:49:22)
Offline
ok
Z tego co widze Dom0 automatycznie tworzy xenbr1 oraz peth1 i nic nie moge na to poradzic.
Moge recznie dodac, korzystajac z brctl xenbr0, ale jak mam dodac peth0?
ifconfig peth0 peth0: error fetching interface information: Device not found
Pozdrawiam
Edit: Ok zapomniałem o tym że jak stawiałem serwerek to postawiłem go kretyńsko :/, czyli w /etc/network/interfaces miałem zdefiniowany tylko eth1, a eth0 się włączało ze skryptu uruchamianego z rc.local. Już poprawiłem, ale teraz dla odmiany tworzy się xenbr0, lecz nie tworzy się nadal peth0, tylko peth1 :( nie mogę tego zrozumieć. I jeszcze taki pytanie. Czy za każdym razem jak coś zmienie w xen-configu.sxp to muszę restartować kompa??
Pozdrawiam
Ostatnio edytowany przez adam05 (2008-06-21 12:45:38)
Offline
no ok :)
Udało mi się utworzyć wszystko , tak jak pisałeś wyżej.
Teraz mam problem innej natury :(
Bridge wygląda tak:
bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no vif0.0 peth0 vif3.0
Z dom0 mam internet. Mogę pingować wszystkie hosty w mojej sieci wewnętrznej, także virtualkę.
Tyle tylko że nie mogę pingować z kompów wewnątrz sieci, oraz virtualki :/ (czyli w drugą stronę)
a w syslogu dostaje komunikat:
Performing cross-bridge DNAT requires IP forwarding to be enabled
mój iptables wygląda tak:
iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination DROP 0 -- abf183.neoplus.adsl.tpnet.pl anywhere DROP 0 -- 210.17.213.57 anywhere DROP 0 -- 91.194.85.17 anywhere DROP 0 -- host-89-238-17-33.smgr.pl anywhere DROP 0 -- gqw10.internetdsl.tpnet.pl anywhere ACCEPT 0 -- anywhere anywhere ACCEPT 0 -- anywhere anywhere state NEW,RELATED,ESTABLISHED Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT 0 -- anywhere anywhere MAC 08:00:27:81:D0:BC ACCEPT 0 -- anywhere anywhere MAC 00:1A:4D:52:D3:F0 ACCEPT 0 -- anywhere anywhere MAC 00:00:86:62:B9:ED ACCEPT 0 -- anywhere anywhere MAC 00:50:FC:80:FC:82 ACCEPT 0 -- anywhere anywhere MAC 00:50:04:68:1A:F0 ACCEPT 0 -- anywhere anywhere MAC 00:04:76:27:91:E8 ACCEPT 0 -- anywhere anywhere MAC 00:1B:FC:9A:18:4A ACCEPT 0 -- anywhere anywhere MAC 00:90:96:06:79:76 ACCEPT 0 -- anywhere anywhere MAC 00:0A:E4:C1:62:5B ACCEPT 0 -- anywhere anywhere MAC AA:00:00:00:00:D2 Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT 0 -- anywhere anywhere
forwardowanie włączone mam :(
cat /proc/sys/net/ipv4/ip_forward 1
Może ktoś pomóc :)
Pozdrawiam
Offline
1. z kad nie mozesz pingowac "kompów wewnątrz sieci, oraz virtualki"?
2. jak wyglada adresacja IP virtualki i sieci prywatnej (pokaz ifconfig eth0 z dom) i wirtualki)?
3. pokaz
grep -v '^[ \t]*#' /etc/xen/xend-config.sxp | grep -v '^[ \t]*$'
oraz konfig wirtualki
4.masz robiony NAT, jezeli tak to na jakich interfejsach?
Offline
Odgrzebuję stary topic :)
Może ktoś mi wyjaśnić jak udostępnić net w domU?
Na wstępie zaznaczę, że sieć lokalna widzi virtualke, a virtualka widzi , oraz może pingować otoczenie sieciowe. Nie mogę jedynie nic spingować z domU, czyli żadnego zewnętrznego hosta.
srvVM1:~# ping google.pl PING google.pl (72.14.221.104) 56(84) bytes of data. --- google.pl ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2010ms srvVM1:~# traceroute google.pl traceroute: Warning: google.pl has multiple addresses; using 216.239.59.104 traceroute to google.pl (216.239.59.104), 30 hops max, 40 byte packets 1 10.0.0.1 (10.0.0.1) 0.609 ms 0.975 ms 0.953 ms 2 * * * 3 * * *
Trzeba widać wklepać jakąś magiczną regułke iptables .... w dom0 tylko jaką? :)
Z góry dziękuję za wszelkie uwagi / sugestie.
Pozdrawiam
Ostatnio edytowany przez adam05 (2008-11-12 02:11:35)
Offline
To może jeszcze inaczej :)
Jak zrobić aby eth2 widział świat :) jeżeli eth1 widzi :) bo chyba tutaj właśnie leży mój problem.
ping -I eth2 google.pl PING google.pl (72.14.221.104) from 10.0.0.1 eth2: 56(84) bytes of data. --- google.pl ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2005ms ping -I eth1 google.pl PING google.pl (216.239.59.104) from 217.172.232.114 eth1: 56(84) bytes of data. 64 bytes from 216.239.59.104: icmp_seq=1 ttl=239 time=56.9 ms 64 bytes from 216.239.59.104: icmp_seq=2 ttl=239 time=56.8 ms
EDIT: Już mi się udało to rozwiązać , ale jednak nie tu leży problem :(
Czekam na inne propozycję.
Pozdrawiam
Ostatnio edytowany przez adam05 (2008-11-12 02:10:14)
Offline
1. pokaz wynik brctl show, iptables -L, iptables -t nat -L i ifconfig ethX z dom0 (gdzie ethX to skonfigurowana i podpieta do LANu sieciowka)
2. podaj wersje Xen'a bo rozwiazania sieciowe troche sie roznia pomiedzy 3.1 a 3.2
3. podaj wynik polecenia route i ifconfig z domU
4. napisz jak konfigurowana siec dla domU - bridge, routing, czy NAT?
Ostatnio edytowany przez bercik (2008-11-12 23:48:59)
Offline
bercik napisał(-a):
1. pokaz wynik brctl show, iptables -L, iptables -t nat -L i ifconfig ethX z dom0 (gdzie ethX to skonfigurowana i podpieta do LANu sieciowka)
2. podaj wersje Xen'a bo rozwiazania sieciowe troche sie roznia pomiedzy 3.1 a 3.2
3. podaj wynik polecenia route i ifconfig z domU
4. napisz jak konfigurowana siec dla domU - bridge, routing, czy NAT?
1:
brctl show bridge name bridge id STP enabled interfaces xenbr0 8000.feffffffffff no vif0.0 peth2 vif3.0
iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination DROP 0 -- 123.234.40.66 anywhere DROP 0 -- public-gprs99250.centertel.pl anywhere DROP 0 -- net-93-149-246-183.t2.dsl.vodafone.it anywhere DROP 0 -- ns.ge-bt.com anywhere DROP 0 -- hosted-by.leaseweb.com anywhere DROP 0 -- 88.191.51.13 anywhere DROP 0 -- static-24-214-232-162.knology.net anywhere DROP 0 -- 87.204.89.26 anywhere DROP 0 -- abf183.neoplus.adsl.tpnet.pl anywhere DROP 0 -- 210.17.213.57 anywhere DROP 0 -- 91.194.85.17 anywhere DROP 0 -- host-89-238-17-33.smgr.pl anywhere DROP 0 -- gqw10.internetdsl.tpnet.pl anywhere ACCEPT 0 -- anywhere anywhere ACCEPT 0 -- anywhere anywhere state NEW,RELATED,ESTABLISHED Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT 0 -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT 0 -- anywhere anywhere MAC 08:00:27:81:D0:BC ACCEPT 0 -- anywhere anywhere MAC 00:1A:4D:52:D3:F0 ACCEPT 0 -- anywhere anywhere MAC 00:00:86:62:B9:ED ACCEPT 0 -- anywhere anywhere MAC 00:50:FC:80:FC:82 ACCEPT 0 -- anywhere anywhere MAC 00:50:04:68:1A:F0 ACCEPT 0 -- anywhere anywhere MAC 00:04:76:27:91:E8 ACCEPT 0 -- anywhere anywhere MAC 00:1B:FC:9A:18:4A ACCEPT 0 -- anywhere anywhere MAC 00:90:96:06:79:76 ACCEPT 0 -- anywhere anywhere MAC 00:0A:E4:C1:62:5B ACCEPT 0 -- anywhere anywhere MAC AA:00:00:00:00:D2 ACCEPT 0 -- anywhere anywhere MAC 00:21:27:C6:67:56 Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT 0 -- anywhere anywhere
iptables -t nat -L Chain PREROUTING (policy ACCEPT) target prot opt source destination DNAT tcp -- anywhere host-217-172-232-114.gdynia.mm.pl tcp dpt:10051 to:192.168.1.16:10051 Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE 0 -- 192.168.1.8 anywhere MASQUERADE 0 -- Windows anywhere MASQUERADE 0 -- 192.168.1.7 anywhere MASQUERADE 0 -- 192.168.1.4 anywhere MASQUERADE 0 -- 192.168.1.5 anywhere MASQUERADE 0 -- 192.168.1.2 anywhere MASQUERADE 0 -- 192.168.1.10 anywhere MASQUERADE 0 -- notebook anywhere MASQUERADE 0 -- 192.168.1.18 anywhere MASQUERADE 0 -- virtualka anywhere MASQUERADE 0 -- 10.0.0.1 anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination
eth0 Link encap:Ethernet HWaddr 00:E0:4C:EE:77:0F inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::2e0:4cff:feee:770f/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5327 errors:0 dropped:0 overruns:0 frame:0 TX packets:599 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:364375 (355.8 KiB) TX bytes:97631 (95.3 KiB) Interrupt:20 Base address:0xb800 eth1 Link encap:Ethernet HWaddr 00:13:8F:9E:63:FD inet addr:217.172.232.114 Bcast:217.172.239.255 Mask:255.255.248.0 inet6 addr: fe80::213:8fff:fe9e:63fd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:21536 errors:0 dropped:0 overruns:0 frame:0 TX packets:2081 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7748758 (7.3 MiB) TX bytes:387503 (378.4 KiB) Interrupt:18 Base address:0xd400 eth2 Link encap:Ethernet HWaddr 00:21:27:C6:67:56 inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::221:27ff:fec6:6756/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:81 errors:0 dropped:0 overruns:0 frame:0 TX packets:163 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:28973 (28.2 KiB) TX bytes:17766 (17.3 KiB)
wersja xena 3.2
Route i ifconfig z domU
srvVM1:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.0 * 255.0.0.0 U 0 0 0 eth0 default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0 srvVM1:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3E:0E:BB:F0 inet addr:10.0.0.5 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::216:3eff:fe0e:bbf0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:258 errors:0 dropped:0 overruns:0 frame:0 TX packets:144 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:33168 (32.3 KiB) TX bytes:37085 (36.2 KiB) 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:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:160 (160.0 b) TX bytes:160 (160.0 b)
4. Bridge
Offline
1. troche dziwnie wyglad ten bridge (w 3.2 powinien sie on raczej nazywac po prostu eth2 ... taki konfig to byl w 3.1)
2. ale mimo wszystko problemu bym szukal w iptables na dom0 ... kiedys jak robilem nat pomiedzy dwiema kartami (kazda stanowiaca port dwuch roznych bridgeow udostepnionych DomU) to w zaden sposob nie chcialo to ruszyc - przyczyna bylo inne zachowanie iptablesa niz standardowe spowodowane uzywaniem peth oraz dosc koszmarny model bridgowania w xen 3.1 (taki jak u Ciebie)
moszesz sprobowac posledzic jak wedruja pakiety z virtualki przez Twoje iptables wpisujac sobie regulke wyrzucajaca log przejscia pakietu (w nat PEROUTING , POSTROUTING i FORWARD)
Offline