0 Replies Latest reply: Mar 21, 2012 4:24 AM by 910327 RSS

    unable to clone zone on solaris11 (MAC address is already in use )

    910327
      I have an x86 box running solaris11_FCS which I want to use for cloning zones. I have a 'gold' zone with my exact setup (mysql/tomcat + java application) and I want to be able to clone this so that I can preserve the 'gold' zone and mess around with the clones knowing I can recreate them at will

      I created 2 vnics (one for my gold zone and one for a new clone)
      root>dladm create-vnic -l net0 vnic1
      root>dladm create-vnic -l net0 vnic2
      root>dladm show-vnic
      LINK OVER SPEED MACADDRESS MACADDRTYPE VID
      vnic1 net0 1000 2:8:20:78:4f:ba random 0
      vnic2 net0 1000 2:8:20:6f:87:53 random 0


      // Here is the configuration of my gold zone (created and up&running)
      root>zonecfg -z gold-z1 export
      create -b
      set zonepath=/zones/gold-z1
      set brand=solaris
      set autoboot=true
      set ip-type=exclusive
      add anet
      set linkname=net0
      set lower-link=auto
      set configure-allowed-address=false
      set link-protection=mac-nospoof
      set mac-address=2:8:20:18:e1:98
      end


      //I have created the clone as follows :-

      root>zonecfg -z gold-z1 export -f /zones/new-z2-profile

      // I have edited 'new-z2-profile' to make approp adjustments
      // here is the configuration of the clone
      root>zonecfg -z new-z2 export
      create -b
      set zonepath=/zones/new-z2
      set brand=solaris
      set autoboot=true
      set ip-type=exclusive
      add anet
      set linkname=net0
      set lower-link=auto
      set configure-allowed-address=false
      set link-protection=mac-nospoof
      set mac-address=2:8:20:6f:87:53
      end
      root>

      // I created "/zones/new-z2-template.xml" using "sysconfig create-profile" command on gold-z1
      root>zonecfg -z new-z2 -f /zones/new-z2-profile
      root>zoneadm -z new-z2 clone -c /zones/new-z2-template.xml gold-z1

      /// when I try and boot the clone, I get an error
      root>zoneadm -z new-z2 boot
      zone 'new-z2': failed to create vnic for vnic1: MAC address is already in use
      zoneadm: zone 'new-z2': call to zoneadmd failed
      root>

      what does this error mean? The 2 vnics have different MAC addresses (see output from dladm above) ??

      Also - how can I take the image from my 'gold' zone and install a zone on a separate machine from that image?