What is the proper procedure for copying a zone from one machine to another?

I have several zones that I've set up on one machine.  I'd like to copy them to 
another machine, change the networking, and use them.

So, I took one of these zones.  I halted it, detached it, tar'ed it up, and 
copied it to the other machine.

I realize I could probably have used "zfs send" to do that, but I figured that 
I probably would have to have somehow mounted the dataset on the target 
machine, or exported it somehow, and I didn't know how to do any of that.  I'd 
like to know, though, but that's not the main question.

So, I have this tar'd up zone on the target machine.  I've untared it.  I 
thought that, theoretically, I should be able to attach the zone, and then 
clone it so cloning process will set it in a state that I can zonecfg to change 
the network card (set physical=newcard.vnic), and when I boot it, that it will 
make me reconfigure the networking.

I'm running into a problem attaching the zone, though.  

I try (fake names because I'm writing this from a different machine):

zonecfg - myzone
create -a /zones/myzone
info                                   -- shows everything fine.
exit


zoneadm -z myzone attach     -- fails, saying it has to be a mounted dataset.  
No matter what I try, I can't get it to attach.


I was halfway thinking of just creating a zone with the same name, installing 
it, booting it, configuring it, halting it, and then copying the original zone 
on top of it, and seeing if that would allow me to clone it -- but I'd really 
like to know the *right* way to do this.  

If somebody would give me another hand with this, I'd really appreciate it.  
I'm so close to being able to bring this whole project to a close...  But this 
would really be quite helpful.





_______________________________________________
OpenIndiana-discuss mailing list
OpenIndiana-discuss@openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to