[zones-discuss] impossible to attach migrated zone to a new server
Hi, I followed the guide (http://docs.sun.com/app/docs/doc/819-2450/gcgnc?l=en&a=view) from sun to move a working zone into a new server with the same configuration. I executed those commands : tar xf myzone.tar --> to /export/zones/myzone zonecfg -z myzone create -a /export/zones/myzone all was ok when I wanted to attach, I got this message r...@ns358375:/# zoneadm -z proxiproduits attach -u pkg: No image rooted at '/export/zones/proxiproduits/root' (set by $PKG_IMAGE) Usage: Unable to get preferred publisher information for zone '%s'. usage: attach [-F] [-n ] [brand-specific args] Attach the zone to the system. The zone state must be 'configured' prior to attach; upon successful completion, the zone state will be 'installed'. The system software on the current system must be compatible with the software on the zone's original system. Specify -F to force the attach and skip software compatibility tests. The -n option can be used to specify 'no-execute' mode. When -n is used, the information needed to attach the zone is read from the specified path and the configuration is only validated. The path can be '-' to specify standard input. The -F and -n options are mutually exclusive. All other arguments are passed to the brand attach function; see brands(5) for more information. I could do a zoneadm -z myzone verify without any message zoneadm -z myzone boot and I got zone 'myzone': could not stat /export/zones/myzone/root/sbin/init: No such file or directory The /export/zones/myzone/root/sbin/init exists... Does anyone have a solution or a clue? thank you for help -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] impossible to attach migrated zone to a new server
On 05/19/10 12:47, Philippe Bürgisser wrote: Hi, I followed the guide (http://docs.sun.com/app/docs/doc/819-2450/gcgnc?l=en&a=view) from sun to move a working zone into a new server with the same configuration. I executed those commands : tar xf myzone.tar --> to /export/zones/myzone zonecfg -z myzone create -a /export/zones/myzone all was ok when I wanted to attach, I got this message r...@ns358375:/# zoneadm -z proxiproduits attach -u pkg: No image rooted at '/export/zones/proxiproduits/root' (set by $PKG_IMAGE) These two commands don't match up. When you ran: zonecfg -z myzone create -a /export/zones/myzone You created a zone named "myzone". When you ran: zoneadm -z proxiproduits attach -u You are operating on a different zone named "proxiproduits". You should run: zoneadm -z myzone attach -u Jerry ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] impossible to attach migrated zone to a new server
Hello, thank your for your answer, I updated my initial message, myzone corresponds to "proxiproduits" but I wanted to change the real name for the forum, my mistake... Anyway, after running the command zoneadm -z myzone attach -u, I get the same error message... Thanks -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] impossible to attach migrated zone to a new server
On 05/19/10 14:08, Philippe Bürgisser wrote: Hello, thank your for your answer, I updated my initial message, myzone corresponds to "proxiproduits" but I wanted to change the real name for the forum, my mistake... Anyway, after running the command zoneadm -z myzone attach -u, I get the same error message... When using OpenSolaris and moving the zone from one system to the other by hand you have to be really knowledgeable about manually creating the zfs datasets properly or else things won't work right. In order to make this work better without requiring so much work, we've added a new option to the attach subcommand. This is the -a option which allows you to pass in the path to your archive. Using this you can do something like the following: # zoneadm -z myzone attach -a {path}/myzone.tar -u This will create all of the necessary datasets, unpack the archive into the zonepath root, then update the image as needed. If you want to try this you should clean up your existing zonepath and let zoneadm just do all of the work. This still doesn't work very well when you also want to use the detached zone on the zonecfg create step, as you did. There is more work we really need to do here to make all of this seamless. If you want to manually do the steps to set up the zonepath then you need to understand how the zfs datasets are setup with one dataset on the zonepath and another on the zonepath/root. This is pretty error prone and probably not something most people will want to do, which is why we added the -a option. Jerry ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] impossible to attach migrated zone to a new server
Thank you, I tried : zonecfg -z myzone zonecfg:myzone> delete zonecfg:myzone> exit zfs destroy -r rpool/export/zones/myzone zfs create rpool/export/zones/myzone chmod go-rwx /export/zones/myzone zonecfg -z myzone zonecfg:myzone> create zonecfg:myzone> set zonepath=/export/zones/myzone zonecfg:myzone> commit zonecfg:myzone> exit zoneadm -z myzone attach -a /root/myzone.tar -u cannot open 'rpool/export/zones/myzone/ROOT': dataset does not exist Installing... tar archive pkg: No image rooted at '/export/zones/myzone/root' (set by $PKG_IMAGE) Usage: Unable to get preferred publisher information for zone '%s'. usage: attach [-F] [-n ] [brand-specific args] Attach the zone to the system. The zone state must be 'configured' prior to attach; upon successful completion, the zone state will be 'installed'. The system software on the current system must be compatible with the software on the zone's original system. Specify -F to force the attach and skip software compatibility tests. The -n option can be used to specify 'no-execute' mode. When -n is used, the information needed to attach the zone is read from the specified path and the configuration is only validated. The path can be '-' to specify standard input. The -F and -n options are mutually exclusive. All other arguments are passed to the brand attach function; see brands(5) for more information. So... same errors, snif snif -- This message posted from opensolaris.org ___ zones-discuss mailing list zones-discuss@opensolaris.org
Re: [zones-discuss] impossible to attach migrated zone to a new server
On Wed, 19 May 2010 20:47:41 +0200, Philippe Bürgisser wrote: > I followed the guide > (http://docs.sun.com/app/docs/doc/819-2450/gcgnc?l=en&a=view) from sun to > move a working zone into a new server with the same configuration. > > I executed those commands : > > tar xf myzone.tar --> to /export/zones/myzone > zonecfg -z myzone > create -a /export/zones/myzone > > all was ok > > when I wanted to attach, I got this message > r...@ns358375:/# zoneadm -z proxiproduits attach -u try these steps for v2v, thats how it worked for me when I tested this last time: source system: batsc...@suizid:~$ zoneadm list -cp 0:global:running:/::ipkg:shared -:my-zone:installed:/tank/zones/my-zone:629e41d5-7d92-4949-cd8b-ee755143fea0:ipkg:shared batsc...@suizid:~$ pfexec zoneadm -z my-zone detach batsc...@suizid:~$ zoneadm list -cp 0:global:running:/::ipkg:shared -:my-zone:configured:/tank/zones/my-zone::ipkg:shared batsc...@suizid:~$ cd /tank/zones batsc...@suizid:/tank/zones$ su Password: batsc...@suizid:/tank/zones# find my-zone -print | cpio -oP@/ | gzip > my-zone.cpio.gz 891010 blocks batsc...@suizid:/tank/zones# ls -la my-zone.cpio.gz -rw-r--r-- 1 root root 124913062 Mar 10 14:06 my-zone.cpio.gz target system: osoldev.batschul./.=> zoneadm list -cp 0:global:running:/::ipkg:shared -:my-zone:configured:/tank/zones/my-zone::ipkg:shared NB: the location of he archive here is important afai recall, ie it shall be in the zoneroots parent: osoldev.batschul./.=> pfexec zoneadm -z my-zone attach -a /tank/zones/my-zone.cpio.gz -u Log File: /tmp/my-zone.attach_log.doaGco Attaching... Global zone version: ent...@0.5.11,5.11-0.134:20100302T023003Z Non-Global zone version: ent...@0.5.11,5.11-0.134:20100302T023003Z Evaluation: Packages in my-zone are in sync with global zone. Attach complete. osoldev.batschul./.=> zoneadm list -cp 0:global:running:/::ipkg:shared -:my-zone:installed:/tank/zones/my-zone:53c18130-533f-69ab-c998-f160f0a8ebc3:ipkg:shared hth frankB ___ zones-discuss mailing list zones-discuss@opensolaris.org