Hi all, i created some virtual machines on SLES 10 with Xen. Now i would like to use Xen on SLES 11. My harddisks from all vm are lvm. Is it possible to clone my existing vm to my new server which runs with SLES 11? If it''s possible how do i do that? best regards Benjamin Knoth -- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Benjamin Knoth wrote:>i created some virtual machines on SLES 10 with Xen. >Now i would like to use Xen on SLES 11. >My harddisks from all vm are lvm. >Is it possible to clone my existing vm to my new server which runs with >SLES 11?Short answer - copy the LVs and guest config from one server to the other. Longer answer : Create each LV on the new server, copy the contents across from the old one. If the LV is identical in size then you can probably just do a bytewise copy of the LV. Alternatively, you can mount the LV on the DomU and copy all the files across using your favourite tool. My personal preference is : mount LV on /mnt on each Dom0 rsync -avH --numeric-ids /mnt/ root@the_new_server.yourdomain:/mnt/ scp /etc/xen/guest_cofig_file root@the_new_server.yourdomain:/etc/xen unmount /mnt on each machine repeat above for each LV startup guest on new server Obviously you can take this opportunity to resize volumes, and even re-arrange then (eg you can split a single LV on the old server and make it separate / and /var on the new one - don''t forget to alter both the guest config and the guest''s /etc/fstab. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Log on to source server and fire a: dd if=/dev/[vg name]/[lv name] | ssh user@DestinationServer dd of=/dev/[vg name]/[lv name] Emerson -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Benjamin Knoth Sent: Wednesday, August 18, 2010 12:31 PM To: xen-users@lists.xensource.com Subject: [Xen-users] Cloning VM from Xen Hi all, i created some virtual machines on SLES 10 with Xen. Now i would like to use Xen on SLES 11. My harddisks from all vm are lvm. Is it possible to clone my existing vm to my new server which runs with SLES 11? If it''s possible how do i do that? best regards Benjamin Knoth -- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ 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
Hi Emerson and all, i test it again with rsync and dd but on both solutions i got some errors on boot of my vm. I modified the config succesfully and edit /etc/fstab and /etc/hosts I can log in in the vm and can start Yast. But on boot sles write that he can''t find the network device and if i log in i didn''t find a network device on ifconfig. The Hostname of the VM isn''t the new name which i changed in the config, it''s the old hostname. How can i cycle the problem? I saw that all vm''s on SLES 10 has a bridge (xenbr0) and on SLES 11 (br0). Can i easy rename the bridge on the config or does it need a modification of Dom-0? Or does it need also a modification in a file in the new vm? Best regards Benjamin Knoth Am 18.08.2010 19:31, schrieb Ribeiro Emerson Gomes:> Log on to source server and fire a: > dd if=/dev/[vg name]/[lv name] | ssh user@DestinationServer dd > of=/dev/[vg name]/[lv name] > > Emerson > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Benjamin > Knoth > Sent: Wednesday, August 18, 2010 12:31 PM > To: xen-users@lists.xensource.com > Subject: [Xen-users] Cloning VM from Xen > > Hi all, > i created some virtual machines on SLES 10 with Xen. > Now i would like to use Xen on SLES 11. > My harddisks from all vm are lvm. > Is it possible to clone my existing vm to my new server which runs with > SLES 11? > If it''s possible how do i do that? > > best regards > > Benjamin Knoth > >-- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hey Emerson and all, same problem on boot. If i start Yast i only find the old network device in the list with old mac-adress, which i changed in the config. And the network device isn''t available. If i change the network device on the config to br0, i get the follow error to start the vm with xm create Error: Device 1 (vif) could not be connected. Could not find bridge device br0 But on a other vm the device br0 run. If i change it to bridge=eth0,model=rtl8139 it starts, but i find only a loop-back device on ifconfig and in Yast i find only the old network device with old ip-adess and mac-adress. I get this errors on boot. -------- modprobe: FATAL: Could not load /lib/modules/2.6.27.45-0.1-xen/modules.dep: No such file or directory modprobe: FATAL: Could not load /lib/modules/2.6.27.45-0.1-xen/modules.dep: No such file or directory Setting up the hardware clockCannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. failed Setting up loopback interface Interface is not available failed getcfg[899]: segfault at 38 ip 00007fa879d90930 sp 00007fff16e9ae88 error 4 in libsysfs.so.1.0.3[7fa879d87000+c000] getcfg[907]: segfault at 38 ip 00007f60ff13f930 sp 00007fff057f2b38 error 4 in libsysfs.so.1.0.3[7f60ff136000+c000] getcfg[916]: segfault at 38 ip 00007fb4dbf2a930 sp 00007ffff8243bd8 error 4 in libsysfs.so.1.0.3[7fb4dbf21000+c000] Setting up network interfaces: Interface is not available failed Interface is not available failed Waiting for mandatory devices: eth-id-00:16:3e:00:00:12 __NSC__ 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 eth-id-00:16:3e:00:00:12 No interface found failed Setting up service network . . . . . . . . . . . . . . failed Checking/updating CPU microcode FATAL: Could not load /lib/modules/2.6.27.45-0.1-xen/modules.dep: No such file or directory FATAL: Could not load /lib/modules/2.6.27.45-0.1-xen/modules.dep: No such file or directory failed Try to get initial date and time via NTP from ntps1.gwdg.de ntps2.gwdg.de ntps3.gwdg.deError : Temporary failure in name resolution Error : Temporary failure in name resolution Error : Temporary failure in name resolution failed Starting network time protocol daemon (NTPD) failed Failed services in runlevel 3: network microcode ntp Skipped services in runlevel 3: acpid irq_balancer xend xendomains ------- Best regards Benjamin Am 19.08.2010 14:27, schrieb Ribeiro Emerson Gomes:> Hey Benjamin, > > Just modify the cloned VM conf file so it will use the new network > schema. > Something like "vif = [ "bridge=br0" ] > > You can rename the name of the bridge, but don''t go there... > > Emerson > > -----Original Message----- > From: Benjamin Knoth [mailto:knoth@mpdl.mpg.de] > Sent: Thursday, August 19, 2010 6:40 AM > To: Ribeiro Emerson Gomes > Subject: Re: [Xen-users] Cloning VM from Xen > > Hi Emerson and all, > i test it again with rsync and dd but on both solutions i got some > errors on boot of my vm. > I modified the config succesfully and edit /etc/fstab and /etc/hosts > I can log in in the vm and can start Yast. > But on boot sles write that he can''t find the network device and if i > log in i didn''t find a network device on ifconfig. > The Hostname of the VM isn''t the new name which i changed in the config, > it''s the old hostname. > > How can i cycle the problem? > > I saw that all vm''s on SLES 10 has a bridge (xenbr0) and on SLES 11 > (br0). > Can i easy rename the bridge on the config or does it need a > modification of Dom-0? Or does it need also a modification in a file in > the new vm? > > Best regards > > Benjamin Knoth > > Am 18.08.2010 19:31, schrieb Ribeiro Emerson Gomes: > >> Log on to source server and fire a: >> dd if=/dev/[vg name]/[lv name] | ssh user@DestinationServer dd >> of=/dev/[vg name]/[lv name] >> >> Emerson >> >> -----Original Message----- >> From: xen-users-bounces@lists.xensource.com >> [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Benjamin >> Knoth >> Sent: Wednesday, August 18, 2010 12:31 PM >> To: xen-users@lists.xensource.com >> Subject: [Xen-users] Cloning VM from Xen >> >> Hi all, >> i created some virtual machines on SLES 10 with Xen. >> Now i would like to use Xen on SLES 11. >> My harddisks from all vm are lvm. >> Is it possible to clone my existing vm to my new server which runs >> > with > >> SLES 11? >> If it''s possible how do i do that? >> >> best regards >> >> Benjamin Knoth >> >> >> >-- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Thu, Aug 19, 2010 at 9:13 PM, Benjamin Knoth <knoth@mpdl.mpg.de> wrote:> Hey Emerson and all, > same problem on boot. > If i start Yast i only find the old network device in the list with old > mac-adress, which i changed in the config. And the network device isn''t > available.Since you''re using SLES, have you contacted Novell support? Not all people on this list familiar with SLES or Yast.> If i change the network device on the config to br0, i get the follow > error to start the vm with xm create > Error: Device 1 (vif) could not be connected. Could not find bridge > device br0 > > But on a other vm the device br0 run.Here''s the basics: - to be able to easily move domU across different dom0s (or different versions of dom0), you''d need the domU storage, xen config file, and (possibly) the kernel used to boot the original domU - dom0 kernel can be used to boot domU as well. However this might cause some problem when you change dom0''s distro or version. Therefore I highly recommend that you use kernel inside domU, and boot with pygrub/pv-grub (which is the default behavior if you use RHEL/Centos). - domU doesn''t really care about the name of dom0''s bridge, as long as it''s the same network. It does care about MAC address change. - you should specifiy a static MAC address for each domU, which is unique (i.e. not used by other domUs). - it''d be easier to troubleshoot if you know where domU''s config files are. It could be on /etc/xen, or managed by xend (in which case you should be able to see it on /var/lib/xend/domains) - you need to know whether your domU is PV or HVM> > If i change it to bridge=eth0,model=rtl8139 it starts,model is only valid for HVM. Are you using PV or HVM? What is the bridge name on both your old and new dom0? Try running "brctl show". Blindly changing bridge names by guessing without really knowing what the real bridge name is might not work as expected. Here''s an example syntax to specify a static MAC address, bridge name, and vif name: vif = [''mac=00:16:3E:63:2E:90, bridge=br6, vifname=u-test-eth0'']> but i find only a > loop-back device on ifconfig and in Yast i find only the old network > device with old ip-adess and mac-adress.Not familiar with yast. Sorry.> I get this errors on boot. > > -------- > > modprobe: FATAL: Could not load > /lib/modules/2.6.27.45-0.1-xen/modules.dep: No such file or directoryStart by finding domU''s config file, and pasting it''s content. Is this kernel located on domU or dom0? Does that directory exist on domU (i.e. what do you have on domU''s /lib/modules/)? At first glance it looks like you''re using dom0''s kernel to boot domU, but since you use a different version of dom0, the kernel booted and the modules inside domU does not match. If that''s the case, then the quick fix would be to get the original kernel and initrd and copy it to the new dom0, and use it to boot domU. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Am 19.08.2010 23:40, schrieb Fajar A. Nugraha:> On Thu, Aug 19, 2010 at 9:13 PM, Benjamin Knoth <knoth@mpdl.mpg.de> wrote: >> Hey Emerson and all, >> same problem on boot. >> If i start Yast i only find the old network device in the list with old >> mac-adress, which i changed in the config. And the network device isn''t >> available. > Since you''re using SLES, have you contacted Novell support? Not all > people on this list familiar with SLES or Yast. >I contacted novell but i didn''t get an useful aswer to this time.>> If i change the network device on the config to br0, i get the follow >> error to start the vm with xm create >> Error: Device 1 (vif) could not be connected. Could not find bridge >> device br0 >> >> But on a other vm the device br0 run. > Here''s the basics: > - to be able to easily move domU across different dom0s (or different > versions of dom0), you''d need the domU storage, xen config file, and > (possibly) the kernel used to boot the original domU > - dom0 kernel can be used to boot domU as well. However this might > cause some problem when you change dom0''s distro or version. Therefore > I highly recommend that you use kernel inside domU, and boot with > pygrub/pv-grub (which is the default behavior if you use RHEL/Centos). > - domU doesn''t really care about the name of dom0''s bridge, as long as > it''s the same network. It does care about MAC address change. > - you should specifiy a static MAC address for each domU, which is > unique (i.e. not used by other domUs). > - it''d be easier to troubleshoot if you know where domU''s config files > are. It could be on /etc/xen, or managed by xend (in which case you > should be able to see it on /var/lib/xend/domains) > - you need to know whether your domU is PV or HVMThe old vm is a PV. My config follows.>> If i change it to bridge=eth0,model=rtl8139 it starts, > model is only valid for HVM. Are you using PV or HVM? > What is the bridge name on both your old and new dom0? Try running > "brctl show". Blindly changing bridge names by guessing without really > knowing what the real bridge name is might not work as expected. > > Here''s an example syntax to specify a static MAC address, bridge name, > and vif name: > vif = [''mac=00:16:3E:63:2E:90, bridge=br6, vifname=u-test-eth0''] >If i start brctl show i get on both server this with other interface numbers. bridge name bridge id STP enabled interfaces eth0 8000.001d096deb32 no peth0 vif56.0 vif8.0 vif4.0>> but i find only a >> loop-back device on ifconfig and in Yast i find only the old network >> device with old ip-adess and mac-adress. > Not familiar with yast. Sorry. > >> I get this errors on boot. >> >> -------- >> >> modprobe: FATAL: Could not load >> /lib/modules/2.6.27.45-0.1-xen/modules.dep: No such file or directory > Start by finding domU''s config file, and pasting it''s content. Is this > kernel located on domU or dom0? Does that directory exist on domU > (i.e. what do you have on domU''s /lib/modules/)? > > At first glance it looks like you''re using dom0''s kernel to boot domU, > but since you use a different version of dom0, the kernel booted and > the modules inside domU does not match. If that''s the case, then the > quick fix would be to get the original kernel and initrd and copy it > to the new dom0, and use it to boot domU. >I test the standard Kernel and initrd from a new created vm and copied the old Xen Kernel from SLES 10 SP2 on SLES 11 and start the vm with this Kernel. Here are my both config files for the old and cloned VM. *VM on SLES 11* xm_vars.check() #kernel = "/boot/vmlinuz-xen" kernel = "/boot/vmlinuz-2.6.16.60-0.34-xen" ramdisk = "/boot/initrd-2.6.16.60-0.34-xen" #ramdisk = "/boot/initrd-xen" builder=''linux'' memory = 4096 name = "vm35" uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b2" vcpus = 1 # make your domain a 4-way vif = [ ''mac=00:16:3e:00:00:d5, bridge=br0'', ] disk = [ ''phy:d/vm35sda1,hda1,w'', ''phy:d/vm35sda3,hda3,w'', ''phy:d/vm35swap,hda2,w''] netmask="255.255.255.0" # Set default gateway. gateway="134.76.28.254" hostname="vm35" root = "/dev/hda1" extra = "3 console=xvc0" * VM on SLES10 SP2* xm_vars.check() kernel = "/boot/vmlinuz-xen" ramdisk = "/boot/initrd-xen" builder=''linux'' memory = 4096 name = "vm02" uuid = "06ed00fe-1162-4fc4-b5d8-11993ee4a8b2" vcpus = 1 # make your domain a 4-way vif = [ ''mac=00:16:3e:00:00:12, bridge=xenbr0'' ] disk = [ ''phy:l1/vm2sda1,hda1,w'', ''phy:l2/vm2sda2,hda3,w'', ''phy:l1/vm2swap,hda2,w''] netmask="255.255.255.0" gateway="134.76.28.254" hostname="vm02" root = "/dev/hda1" extra = "3 console=xvc0" I hope it helps. Best regards Benjamin -- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Aug 20, 2010 at 3:33 PM, Benjamin Knoth <knoth@mpdl.mpg.de> wrote:> If i start brctl show i get on both server this with other interface > numbers. > > bridge name bridge id STP enabled interfaces > eth0 8000.001d096deb32 no peth0 > vif56.0 > vif8.0 > vif4.0So your dom0 bridge name is eth0. Remember that.> VM on SLES 11 > > > xm_vars.check() > > > #kernel = "/boot/vmlinuz-xen" > kernel = "/boot/vmlinuz-2.6.16.60-0.34-xen" > ramdisk = "/boot/initrd-2.6.16.60-0.34-xen" > #ramdisk = "/boot/initrd-xen"You need to copy original vmlinuz-xen and initrd-xen from old server, and use that. Do you still have module loading issue with kernel and initrd from the old server?> vif = [ ''mac=00:16:3e:00:00:d5, bridge=br0'', ]change the bridge to eth0. That''s what "brctl show" says.> netmask="255.255.255.0" > # Set default gateway. > gateway="134.76.28.254" > hostname="vm35"irrelevant, as domU sets its own hostname and networking parameters. Might as well delete those lines. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Am 20.08.2010 13:20, schrieb Fajar A. Nugraha:> On Fri, Aug 20, 2010 at 3:33 PM, Benjamin Knoth <knoth@mpdl.mpg.de> wrote: >> If i start brctl show i get on both server this with other interface >> numbers. >> >> bridge name bridge id STP enabled interfaces >> eth0 8000.001d096deb32 no peth0 >> vif56.0 >> vif8.0 >> vif4.0 > So your dom0 bridge name is eth0. Remember that. > >> VM on SLES 11 >> >> >> xm_vars.check() >> >> >> #kernel = "/boot/vmlinuz-xen" >> kernel = "/boot/vmlinuz-2.6.16.60-0.34-xen" >> ramdisk = "/boot/initrd-2.6.16.60-0.34-xen" >> #ramdisk = "/boot/initrd-xen" > You need to copy original vmlinuz-xen and initrd-xen from old server, > and use that. > Do you still have module loading issue with kernel and initrd from the > old server?On the old server i haven''t issues with kernel or initrd. I copied the the old kernel and initrd to sles 11 changed the entry in the config to kernel = "/boot/vmlinuz-2.6.16.60-0.23-xen" ramdisk = "/boot/initrd-2.6.16.60-0.23-xen" and changed the bridge to eth0.>> vif = [ ''mac=00:16:3e:00:00:d5, bridge=br0'', ] > change the bridge to eth0. That''s what "brctl show" says. > >> netmask="255.255.255.0" >> # Set default gateway. >> gateway="134.76.28.254" >> hostname="vm35" > irrelevant, as domU sets its own hostname and networking parameters. > Might as well delete those lines. >But if i boot with the modified config, old kernel and initrd i find some failed on boot log */ Setting up the hardware clockCannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. Cannot access the Hardware Clock via any known method. Use the --debug option to see the details of our search for an access method. failed Setting up network interfaces: lo lo IP address: 127.0.0.1/8 Checking for network time protocol daemon (NTPD): unused NET: Registered protocol family 10 lo: Disabled Privacy Extensions IPv6 over IPv4 tunneling driver done eth1 No configuration found for eth1 unused Waiting for mandatory devices: eth-id-00:16:3e:00:00:12 __NSC__ 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 eth-id-00:16:3e:00:00:12 No interface found failed Setting up service network . . . . . . . . . . . . . . failed/* On my config the entry is vif = [ ''mac=00:16:3e:00:00:d5, bridge=eth0'', ]. On boot i see */eth-id-00:16:3e:00:00:12 /*which is the mac of the old network device. In YaST i get the same device with mac. best regards Benjamin -- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Aug 20, 2010 at 7:02 PM, Benjamin Knoth <knoth@mpdl.mpg.de> wrote:> But if i boot with the modified config, old kernel and initrd i find some > failed on boot log > > Setting up the hardware clockCannot access the Hardware Clock via any known > method. > Use the --debug option to see the details of our search for an access > method. > Cannot access the Hardware Clock via any known method. > Use the --debug option to see the details of our search for an access > method.Ignore it. Or you try looking for whicever service runs the command "hwclock", and disable it.> eth1 > No configuration found for eth1 unusedsince you change the MAC address, it''s now recognized as a new ethernet device.> Waiting for mandatory devices: eth-id-00:16:3e:00:00:12 __NSC__ > 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 > eth-id-00:16:3e:00:00:12 No interface found failed > Setting up service network . . . . . . . . . . . . . . failed... while it still keeps track of the old device. This situation also happens if you manually replace the NIC on a real server. I''m not familiar enough with SLES to help you here. Perhaps there''s a menu in yast to delete a network configuration and setup a new one? For this particular issue you should contact Novell (or at least fellow SLES/opensuse user) and ask them how to (re)configure network when you replace an exisiting NIC with a new one. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha wrote:> > eth1 >> No configuration found for eth1 unused > >since you change the MAC address, it''s now recognized as a new >ethernet device. > >> Waiting for mandatory devices: eth-id-00:16:3e:00:00:12 __NSC__ >> 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 >> eth-id-00:16:3e:00:00:12 No interface found failed >> Setting up service network . . . . . . . . . . . . . . failed > >... while it still keeps track of the old device. > >This situation also happens if you manually replace the NIC on a real >server. I''m not familiar enough with SLES to help you here. Perhaps >there''s a menu in yast to delete a network configuration and setup a >new one? For this particular issue you should contact Novell (or at >least fellow SLES/opensuse user) and ask them how to (re)configure >network when you replace an exisiting NIC with a new one.I''d assume that SLES (like most modern Linux distros) uses udev - in which case look somewhere like /etc/udev/rules.d. In Debian, the network config (MAC <-> I/F mapping) is in a file called <something>persistent-net.rules in that directory. Just edit this and put the new mac in the line that defines the old eth1, and delete the ''new'' NIC. There''s probably some means of reloading stuff after this, but rebooting does it for me. Worst case, try ''grep -ri 00:16:3e:00:00:00 /etc'' - putting your old mac address in place of all the zeros.! -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi, Am 20.08.2010 15:36, schrieb Simon Hobson:> Fajar A. Nugraha wrote: > >> > eth1 >>> No configuration found for >>> eth1 unused >> >> since you change the MAC address, it''s now recognized as a new >> ethernet device. >> >>> Waiting for mandatory devices: eth-id-00:16:3e:00:00:12 __NSC__ >>> 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 >>> eth-id-00:16:3e:00:00:12 No interface >>> found failed >>> Setting up service network . . . . . . . . . . . . . >>> . failed >> >> ... while it still keeps track of the old device. >> >> This situation also happens if you manually replace the NIC on a real >> server. I''m not familiar enough with SLES to help you here. Perhaps >> there''s a menu in yast to delete a network configuration and setup a >> new one? For this particular issue you should contact Novell (or at >> least fellow SLES/opensuse user) and ask them how to (re)configure >> network when you replace an exisiting NIC with a new one. > > I''d assume that SLES (like most modern Linux distros) uses udev - in > which case look somewhere like /etc/udev/rules.d. In Debian, the > network config (MAC <-> I/F mapping) is in a file called > <something>persistent-net.rules in that directory. >I found it in /etc/udev/rules.d/30-persistent-net.rules This file include the following lines SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:3e:00:00:12", IMPORT="/l ib/udev/rename_netiface %k eth0" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:3e:00:00:d5", IMPORT="/l ib/udev/rename_netiface %k eth1" Eth0 is the old network interface which i find also in Yast. I think eth1 was automatically added by xen from the config file but i find it in Yast and (see on the top) the os also find it. Should i changed something in this file?> Just edit this and put the new mac in the line that defines the old > eth1, and delete the ''new'' NIC. There''s probably some means of > reloading stuff after this, but rebooting does it for me. > > Worst case, try ''grep -ri 00:16:3e:00:00:00 /etc'' - putting your old > mac address in place of all the zeros.! >best regards Benjamin -- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Benjamin Knoth wrote:>I found it in /etc/udev/rules.d/30-persistent-net.rules >This file include the following lines > >SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:3e:00:00:12", >IMPORT="/l >ib/udev/rename_netiface %k eth0" >SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:3e:00:00:d5", >IMPORT="/l >ib/udev/rename_netiface %k eth1" > >Eth0 is the old network interface which i find also in Yast. >I think eth1 was automatically added by xen from the config file but i >find it in Yast and (see on the top) the os also find it. >Should i changed something in this file? > >> Just edit this and put the new mac in the line that defines the old >> eth1, and delete the ''new'' NIC. There''s probably some means of > > reloading stuff after this, but rebooting does it for me.As I wrote, just edit this file to match your current interfaces. The easiest way to do it is just delete the line that ends with eth0, and change eth1 to eth0. When you reboot, the interface with mac 00:16:3e:00:00:d5 will then appear at eth0. All this file does is store persistently the mappings generated when udev finds a new device - a big improvement from the days when the interfaces could change names/order under different OSs, or even randomly at boot time :( The downside is that you may need to go and manually delete/edit mappings when changing ''hardware''. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Simon, good news network is running. After i delete the old network device on /etc/udev/rules.d/30-persistent-net.rules and /etc/sysconfig/network/ and add the new network device in this directory manually, the network is now running. Thanx a lot for your help. best regards Benjamin Am 23.08.2010 09:45, schrieb Simon Hobson:> Benjamin Knoth wrote: > >> I found it in /etc/udev/rules.d/30-persistent-net.rules >> This file include the following lines >> >> SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:3e:00:00:12", >> IMPORT="/l >> ib/udev/rename_netiface %k eth0" >> SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:16:3e:00:00:d5", >> IMPORT="/l >> ib/udev/rename_netiface %k eth1" >> >> Eth0 is the old network interface which i find also in Yast. >> I think eth1 was automatically added by xen from the config file but i >> find it in Yast and (see on the top) the os also find it. >> Should i changed something in this file? >> >>> Just edit this and put the new mac in the line that defines the old >>> eth1, and delete the ''new'' NIC. There''s probably some means of >> > reloading stuff after this, but rebooting does it for me. > > As I wrote, just edit this file to match your current interfaces. The > easiest way to do it is just delete the line that ends with eth0, and > change eth1 to eth0. When you reboot, the interface with mac > 00:16:3e:00:00:d5 will then appear at eth0. > > All this file does is store persistently the mappings generated when > udev finds a new device - a big improvement from the days when the > interfaces could change names/order under different OSs, or even > randomly at boot time :( The downside is that you may need to go and > manually delete/edit mappings when changing ''hardware''. >-- Benjamin Knoth Max Planck Digital Library (MPDL) Systemadministration Amalienstrasse 33 80799 Munich, Germany http://www.mpdl.mpg.de Mail: knoth@mpdl.mpg.de Phone: +49 89 38602 202 Fax: +49-89-38602-280 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users