Hi folks, Debian Etch Xen On cloning disk.img I suppose it also copies the MAC address of the original image to the new image resulting in "ping hostname" unable to find the new hostname. Following is my test; # dd if=/vserver/domains/xen5.satimis.com/disk.img of=/vserver/domains/xen6.satimis.com/disk.img bs=4k # dd if=/vserver/domains/xen5.satimis.com/swap.img of=/vserver/domains/xen6.satimis.com/swap.img bs=4k # xm list --long xen5.satimis.com (domain (domid 3) (on_crash restart) (uuid e1074e82-9bbc-8fcd-2e74-e6ab66a3017d) (bootloader_args ) (vcpus 1) (name xen5.satimis.com) (on_poweroff destroy) (on_reboot restart) (bootloader ) (maxmem 32) (memory 32) (shadow_memory 0) (cpu_weight 256) (cpu_cap 0) (features ) (on_xend_start ignore) (on_xend_stop ignore) (start_time 1221791564.86) (cpu_time 3.132796221) (online_vcpus 1) (image (linux (kernel /boot/vmlinuz-2.6.18-xen) (args ''root=/dev/hda1 ro '') (rtc_timeoffset 0) (notes (HV_START_LOW 4227858432) (FEATURES ''writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'' ) (VIRT_BASE 3221225472) (GUEST_VERSION 2.6) (PADDR_OFFSET 3221225472) (GUEST_OS linux) (HYPERCALL_PAGE 3222278144) (LOADER generic) (SUSPEND_CANCEL 1) (PAE_MODE no) (ENTRY 3222274048) (XEN_VERSION xen-3.0) ) ) ) (status 2) (state -b----) (store_mfn 899538) (console_mfn 899537) (device (vif (uuid 18904eab-6d22-da74-79f0-c86198a01e4a) (script vif-bridge) (ip 192.168.0.115) (mac 00:16:3e:32:ab:e7) (type netfront) (backend 0) ) ) (device (vbd (uname file:/vserver/domains/xen5.satimis.com/disk.img) (uuid 505962e1-ddc4-7987-e731-eeda038c8ba1) (mode w) (dev hda1:disk) (backend 0) (bootable 1) ) ) (device (vbd (uname file:/vserver/domains/xen5.satimis.com/swap.img) (uuid c7e5ed00-fa70-3683-d66f-fba6feff5a69) (mode w) (dev hda2:disk) (backend 0) (bootable 0) ) ) (device (console (protocol vt100) (location 2) (uuid ca9ca5fb-9cee-6571-d064-83e2d8ddd894) ) ) ) * end * # xm list --long xen6.satimis.com (domain (domid 2) (on_crash restart) (uuid 07a8b42b-acfd-ec79-ce19-83f843564db1) (bootloader_args ) (vcpus 1) (name xen6.satimis.com) (on_poweroff destroy) (on_reboot restart) (bootloader ) (maxmem 32) (memory 32) (shadow_memory 0) (cpu_weight 256) (cpu_cap 0) (features ) (on_xend_start ignore) (on_xend_stop ignore) (start_time 1221791309.54) (cpu_time 3.313863599) (online_vcpus 1) (image (linux (kernel /boot/vmlinuz-2.6.18-xen) (args ''root=/dev/hda1 ro '') (rtc_timeoffset 0) (notes (HV_START_LOW 4227858432) (FEATURES ''writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'' ) (VIRT_BASE 3221225472) (GUEST_VERSION 2.6) (PADDR_OFFSET 3221225472) (GUEST_OS linux) (HYPERCALL_PAGE 3222278144) (LOADER generic) (SUSPEND_CANCEL 1) (PAE_MODE no) (ENTRY 3222274048) (XEN_VERSION xen-3.0) ) ) ) (status 2) (state -b----) (store_mfn 888274) (console_mfn 888273) (device (vif (uuid bbc3e77d-e001-90f2-73f6-1d2a042c6e2b) (script vif-bridge) (ip 192.168.0.116) (mac 00:16:3e:0a:c0:fb) (type netfront) (backend 0) ) ) (device (vbd (uname file:/vserver/domains/xen6.satimis.com/disk.img) (uuid 8ea4ccb1-212e-8fea-0b17-dc056ae7f75d) (mode w) (dev hda1:disk) (backend 0) (bootable 1) ) ) (device (vbd (uname file:/vserver/domains/xen6.satimis.com/swap.img) (uuid 182adee0-bc90-69f2-a7e5-19fc3656e1ac) (mode w) (dev hda2:disk) (backend 0) (bootable 0) ) ) (device (console (protocol vt100) (location 2) (uuid dca93d80-8087-ed35-587d-dded9e45684f) ) ) ) * end * MAC Address xen5.satimis.com :- (mac 00:16:3e:32:ab:e7) xen6.satimis.com (mac 00:16:3e:0a:c0:fb) # nano /etc/network/interfaces making following change iface eth0 inet static address 192.168.0.116 = mac 00:16:3e:0a:c0:fb gateway 192.168.0.1 netmask 255.255.255.0 Remark:- Also tried; address 192.168.0.116 = MAC of mac 00:16:3e:0a:c0:fb address 192.168.0.116 = 00:16:3e:0a:c0:fb address 192.168.0.116 = MAC of 00:16:3e:0a:c0:fb None of them worked. # /etc/init.d/networking restart Reconfiguring network interfaces...=: Host name lookup failure ifconfig: `--help'' gives usage information. Failed to bring up eth0. done. # ifconfig eth0 Link encap:Ethernet HWaddr 00:16:3E:0A:C0:FB inet addr:192.168.0.116 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::216:3eff:fe0a:c0fb/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:37 errors:0 dropped:0 overruns:0 frame:0 TX packets:31 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3154 (3.0 KiB) TX bytes:3138 (3.0 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: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) Please advise how to fix the problem. TIA B.R. Stephen Liu Send instant messages to your online friends http://uk.messenger.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi! Sorry, i don''t know anything about debian, but a mac address in /etc/network/interfaces is strange for me. It''s possibly for the domU to change the mac address of any virtual interface by the command "ip link set ethX address XX:XX:XX:XX:XX:XX", or similar. Xen will not notice the change. The mac address provided by xen is like a default mac address of a real card, and can be changed (until the next reboot of the domU). Maybe some script in you domU system do this change during boot? Anyway, the udev system may persistently link mac addresses and device names (i.e. eth0, eth1). Take a look at /etc/udev/rules.d/70-persistent-net.rules or something like this. Bye, Tamas 2008. 09. 19, péntek keltezéssel 13.34-kor Stephen Liu ezt írta:> Hi folks, > > > Debian Etch > Xen > > > On cloning disk.img I suppose it also copies the MAC address of the > original image to the new image resulting in "ping hostname" unable to > find the new hostname. > > > Following is my test; > > # dd if=/vserver/domains/xen5.satimis.com/disk.img > of=/vserver/domains/xen6.satimis.com/disk.img bs=4k > > # dd if=/vserver/domains/xen5.satimis.com/swap.img > of=/vserver/domains/xen6.satimis.com/swap.img bs=4k > > > # xm list --long xen5.satimis.com > (domain > (domid 3) > (on_crash restart) > (uuid e1074e82-9bbc-8fcd-2e74-e6ab66a3017d) > (bootloader_args ) > (vcpus 1) > (name xen5.satimis.com) > (on_poweroff destroy) > (on_reboot restart) > (bootloader ) > (maxmem 32) > (memory 32) > (shadow_memory 0) > (cpu_weight 256) > (cpu_cap 0) > (features ) > (on_xend_start ignore) > (on_xend_stop ignore) > (start_time 1221791564.86) > (cpu_time 3.132796221) > (online_vcpus 1) > (image > (linux > (kernel /boot/vmlinuz-2.6.18-xen) > (args ''root=/dev/hda1 ro '') > (rtc_timeoffset 0) > (notes > (HV_START_LOW 4227858432) > (FEATURES > > ''writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'' > ) > (VIRT_BASE 3221225472) > (GUEST_VERSION 2.6) > (PADDR_OFFSET 3221225472) > (GUEST_OS linux) > (HYPERCALL_PAGE 3222278144) > (LOADER generic) > (SUSPEND_CANCEL 1) > (PAE_MODE no) > (ENTRY 3222274048) > (XEN_VERSION xen-3.0) > ) > ) > ) > (status 2) > (state -b----) > (store_mfn 899538) > (console_mfn 899537) > (device > (vif > (uuid 18904eab-6d22-da74-79f0-c86198a01e4a) > (script vif-bridge) > (ip 192.168.0.115) > (mac 00:16:3e:32:ab:e7) > (type netfront) > (backend 0) > ) > ) > (device > (vbd > (uname file:/vserver/domains/xen5.satimis.com/disk.img) > (uuid 505962e1-ddc4-7987-e731-eeda038c8ba1) > (mode w) > (dev hda1:disk) > (backend 0) > (bootable 1) > ) > ) > (device > (vbd > (uname file:/vserver/domains/xen5.satimis.com/swap.img) > (uuid c7e5ed00-fa70-3683-d66f-fba6feff5a69) > (mode w) > (dev hda2:disk) > (backend 0) > (bootable 0) > ) > ) > (device > (console > (protocol vt100) > (location 2) > (uuid ca9ca5fb-9cee-6571-d064-83e2d8ddd894) > ) > ) > ) > * end * > > > > # xm list --long xen6.satimis.com > (domain > (domid 2) > (on_crash restart) > (uuid 07a8b42b-acfd-ec79-ce19-83f843564db1) > (bootloader_args ) > (vcpus 1) > (name xen6.satimis.com) > (on_poweroff destroy) > (on_reboot restart) > (bootloader ) > (maxmem 32) > (memory 32) > (shadow_memory 0) > (cpu_weight 256) > (cpu_cap 0) > (features ) > (on_xend_start ignore) > (on_xend_stop ignore) > (start_time 1221791309.54) > (cpu_time 3.313863599) > (online_vcpus 1) > (image > (linux > (kernel /boot/vmlinuz-2.6.18-xen) > (args ''root=/dev/hda1 ro '') > (rtc_timeoffset 0) > (notes > (HV_START_LOW 4227858432) > (FEATURES > > ''writable_page_tables|writable_descriptor_tables|auto_translated_physmap|pae_pgdir_above_4gb|supervisor_mode_kernel'' > ) > (VIRT_BASE 3221225472) > (GUEST_VERSION 2.6) > (PADDR_OFFSET 3221225472) > (GUEST_OS linux) > (HYPERCALL_PAGE 3222278144) > (LOADER generic) > (SUSPEND_CANCEL 1) > (PAE_MODE no) > (ENTRY 3222274048) > (XEN_VERSION xen-3.0) > ) > ) > ) > (status 2) > (state -b----) > (store_mfn 888274) > (console_mfn 888273) > (device > (vif > (uuid bbc3e77d-e001-90f2-73f6-1d2a042c6e2b) > (script vif-bridge) > (ip 192.168.0.116) > (mac 00:16:3e:0a:c0:fb) > (type netfront) > (backend 0) > ) > ) > (device > (vbd > (uname file:/vserver/domains/xen6.satimis.com/disk.img) > (uuid 8ea4ccb1-212e-8fea-0b17-dc056ae7f75d) > (mode w) > (dev hda1:disk) > (backend 0) > (bootable 1) > ) > ) > (device > (vbd > (uname file:/vserver/domains/xen6.satimis.com/swap.img) > (uuid 182adee0-bc90-69f2-a7e5-19fc3656e1ac) > (mode w) > (dev hda2:disk) > (backend 0) > (bootable 0) > ) > ) > (device > (console > (protocol vt100) > (location 2) > (uuid dca93d80-8087-ed35-587d-dded9e45684f) > ) > ) > ) > * end * > > > MAC Address > > xen5.satimis.com :- > (mac 00:16:3e:32:ab:e7) > > > xen6.satimis.com > (mac 00:16:3e:0a:c0:fb) > > > # nano /etc/network/interfaces > making following change > > iface eth0 inet static > address 192.168.0.116 = mac 00:16:3e:0a:c0:fb > gateway 192.168.0.1 > netmask 255.255.255.0 > > > Remark:- > > Also tried; > address 192.168.0.116 = MAC of mac 00:16:3e:0a:c0:fb > address 192.168.0.116 = 00:16:3e:0a:c0:fb > address 192.168.0.116 = MAC of 00:16:3e:0a:c0:fb > > > None of them worked. > > > # /etc/init.d/networking restart > Reconfiguring network interfaces...=: Host name lookup failure > ifconfig: `--help'' gives usage information. > Failed to bring up eth0. > done. > > > # ifconfig > eth0 Link encap:Ethernet HWaddr 00:16:3E:0A:C0:FB > inet addr:192.168.0.116 Bcast:192.168.0.255 > Mask:255.255.255.0 > inet6 addr: fe80::216:3eff:fe0a:c0fb/64 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:37 errors:0 dropped:0 overruns:0 frame:0 > TX packets:31 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:1000 > RX bytes:3154 (3.0 KiB) TX bytes:3138 (3.0 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: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) > > > Please advise how to fix the problem. TIA > > > B.R. > Stephen Liu > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
--- "Nemeth, Tamas" <nice@titanic.nyme.hu> wrote:> Hi! > > Sorry, i don''t know anything about debian, but a mac address > in /etc/network/interfaces is strange for me. > > It''s possibly for the domU to change the mac address of any virtual > interface by the command "ip link set ethX address > XX:XX:XX:XX:XX:XX", > or similar. Xen will not notice the change. The mac address provided > by > xen is like a default mac address of a real card, and can be changed > (until the next reboot of the domU). Maybe some script in you domU > system do this change during boot? > > Anyway, the udev system may persistently link mac addresses and > device > names (i.e. eth0, eth1). Take a look > at /etc/udev/rules.d/70-persistent-net.rules or something like this.Hi Tamas, I don''t have "70-persistent-net.rules" here. # ls /etc/udev/rules.d/ 020_permissions.rules z25_persistent-net.rules 025_libgphoto2.rules z45_persistent-net-generator.rules 025_libsane.rules z50_run.rules udev.rules z55_hotplug.rules xen-backend.rules z60_alsa-utils.rules z20_persistent-input.rules z60_xserver-xorg-input-wacom.rules z20_persistent.rules z75_cd-aliases-generator.rules z25_persistent-cd.rules z99_hal.rules * end * # cat /etc/udev/rules.d/z25_persistent-net.rules .... # PCI device 0x10de:0x0373 (forcedeth) SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:0e:a6:f9:a3:5b", NAME="eth0" * end * There is only ONE NIC here. $ cat /etc/udev/rules.d/z45_persistent-net-generator.rules # These rules generate rules to keep network interface names unchanged # across reboots write them to /etc/udev/rules.d/z25_persistent-net.rules. # # The default name for this file is z45_persistent-net-generator.rules. ACTION!="add", GOTO="persistent_net_generator_end" SUBSYSTEM!="net", GOTO="persistent_net_generator_end" # ignore the interface if a name has already been set NAME=="?*", GOTO="persistent_net_generator_end" # ignore "secondary" raw interfaces of the madwifi driver KERNEL=="ath*", ATTRS{type}=="802", GOTO="persistent_net_generator_end" # provide nice comments for the generated rules SUBSYSTEMS=="pci", \ ENV{COMMENT}="PCI device $attr{vendor}:$attr{device}" SUBSYSTEMS=="usb", \ ENV{COMMENT}="USB device $attr{idVendor}:$attr{idProduct}" SUBSYSTEMS=="ieee1394", \ ENV{COMMENT}="Firewire device $attr{host_id}" SUBSYSTEMS=="xen", \ ENV{COMMENT}="Xen virtual device" ENV{COMMENT}=="", \ ENV{COMMENT}="Unknown $env{SUBSYSTEM} device ($env{DEVPATH})" ATTRS{driver}=="?*", \ ENV{COMMENT}="$env{COMMENT} ($attr{driver})" # ignore interfaces without a driver link like bridges and VLANs KERNEL=="eth*|ath*|wlan*|ra*|sta*", DRIVERS=="?*",\ IMPORT{program}="write_net_rules $attr{address}" ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}" LABEL="persistent_net_generator_end" * end * B.R. Stephen Send instant messages to your online friends http://uk.messenger.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users