views:

169

answers:

3

For these part :

zonecfg:[zone name]:net> set address= zonecfg:[zone name]:net> set physical=

How do i know what kind of values i should set?

I am using a vmware machine open solaris and current setting up a zone.

I want to be able to putty in to that zone.

Thanks

A: 

What kind of values you set depends entirely on what you are trying to do...

What network do you want, what drive do you want to connect, etc...

Spend some time reading the bigadmin articles on solaris containers

Matthew Watson
+1  A: 

This is actually pretty easy, The Zones FAQ has most of the questions, but the basics are

  • create a zone using zonecfg(1)
    • details of zone configuration data is here but in general the defaults are useful
    • you probably want a shared-IP configuration unless ou done something creative with vmware
  • log into the zone as root
  • make sure the ssh service is running

You should then be set. Reading the BigAdmin articles on Zones and the Sysadmin guide section wouldn't hurt either.

Charlie Martin
+1  A: 

Since you want to SSH into the zone from outside, it needs to have it's own IP address on the same network as the global zone. So either find a free address in the same network, or ask your network administrator to allocate one - whichever you usually do.

For the 'physical' setting; here (I think) is the simplest case: If you've allocated a single virtual network interface to your VM, then use that interface for the 'physical' setting

So, in the global zone, do

/usr/sbin/ifconfig -a

to list your interfaces. It should say something like

 lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000 
 bge0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet 123.45.123.45 netmask ffffff00 broadcast 123.45.123.255

Here the interface name is bge0. (lo0 is the loopback interface; you don't want that) Yours will likely be called something different - maybe e1000g0, depending on what kind of a network interface VMWare presents.

Note that since you're using the same network interface in the global zone and the child zone, you must choose an IP address for the child on the same subnet as the global zone's. In the example above the netmask for bge0 is 255.255.255.0, which means your child zone IP needs to be between 123.45.123.0 and 123.45.123.254

Chris May