Overview
In this practice, you create a nonglobal zone called zclient on the s11-client system. This zone needs to be plumbed on the net1 interface and assigned a static IP address,
192.168.10.11. All client requests to the resources on s11-server, s11-host01, and s11- host02 systems will be initiated from the zclient zone.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Host: Oracle Solaris 10
Virtual Box s11-client 192.168.0.111 s11-server 192.168.0.100 IPS Repository s11-host01 192.168.0.112 s11-host02 192.168.0.113 zclient 192.168.10.11 Tasks:
In this practice, you will configure virtual network for the zclient zone. Task 1/1
1. Configure virtual network for the zclient zone.
Because this is a new zone, you will first configure the zclient zone and then configure the virtual network for the zone.
a. Open the s11-client VM terminal and rename the terminal title as zclient.
b. List zone information by using the zoneadm command. root@s11-client:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
There is no nonglobal zone configured at this stage.
c. Create the zclient zone by using the zonecfg command.
root@s11-client:~# zonecfg -z zclient
Use 'create' to begin configuring a new zone. zonecfg:zclient> create
create: Using system default template 'SYSdefault' zonecfg:zclient> set zonepath=/zones/zclient
zonecfg:zclient> add net
zonecfg:zclient:net> set physical=net1 zonecfg:zclient:net> end
zonecfg:zclient> exit
The net1 interface will be used for configuring the 192.168.10.11 IP address.
d. Remove the net0 interface from the zone configuration.
root@s11-client:~# zonecfg -z zclient ‘remove anet linkname=net0’
By default, the net0 interface is a nonpersistent interface assigned to every zone from the SYSdefault template. You can verify this by reading the
/etc/zones/zclient.xml file. Because you do not require this interface, for now you will remove it.
e. Confirm that the zclient zone is configured and listed. root@s11-client:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zclient configured /zones/zclient solaris excl
f. Verify that the s11-client VM can contact the IPS server, before installing the zclient
zone.
root@s11-client:~# pkg publisher PUBLISHER TYPE STATUS P LOCATION
solaris origin online F http://s11-server.mydomain.com/
g. Install the zclient zone by using the zoneadm install command.
root@s11-client:~# zoneadm -z zclient install
The following ZFS file system(s) have been created: rpool/zones
rpool/zones/zclient Progress being logged to
/var/log/zones/zoneadm.20141008T025441Z.zclient.install Image: Preparing at /zones/zclient/root.
Install Log: /system/volatile/install.5849/install_log AI Manifest: /tmp/manifest.xml.5taOzl
SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml Zonename: zclient
Installation: Starting ...
Creating IPS image Startup linked: 1/1 done
Installing packages from: solaris origin: http://s11-server.mydomain.com/ DOWNLOAD PKGS FILES XFER (MB) SPEED Completed 282/282 53274/53274 351.9/351.9 5.2M/s PHASE ITEMS Installing new actions 71043/71043 Updating package state database Done Updating package cache 0/0 Updating image state Done Creating fast lookup database Done Updating package cache 1/1 Installation: Succeeded
Note: Man pages can be obtained by installing pkg:/system/manual
done.
Done: Installation completed in 188.624 seconds.
Next Steps: Boot the zone, then log into the zone console (zlogin -C)
to complete the configuration process.
Log saved in non-global zone as
/zones/zclient/root/var/log/zones/zoneadm.20141008T025441Z.zclie nt.install
The installation process may take several minutes depending on the network speed. h. Now check the status of the zclient zone.
root@s11-client:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zclient installed /zones/zclient solaris excl
i. Boot the zclient zone and check its status again. root@s11-client:~# zoneadm -z zclient boot root@s11-client:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zclient running /zones/zclient solaris excl
j. Log in to the zclient zone console by using the zlogin –C command.
root@s11-client:~# zlogin -C zclient
Note: If it takes considerable amount of time for the console to appear, press the Enter key. When prompted, provide the following information to set up the zclient zone and use the F2 key to move to the next option.
Item Value
Computer name zclient
Networking Manually
Manual network configuration net1
IP Address 192.168.10.11
DNS Do not configure DNS
Alternate name service None
Time zone Choose appropriately
Time zone locations Choose appropriately
Root password oracle1
Username oracle
Unser password oracle1
k. When done, press F2 to allow the zclient zone to restart.
[Connected to zone 'zclient' console]
SC profile successfully generated as:
/etc/svc/profile/sysconfig/sysconfig-20141008- 030406/sc_profile.xml
Exiting System Configuration Tool. Log is available at: /system/volatile/sysconfig/sysconfig.log.9913
Hostname: zclient zclient console login:
l. Log in to the zclient zone as user oracle and oracle1 as password.
zclient console login: oracle Password: oracle1
Oracle Corporation SunOS 5.11 11.2 June 2014
oracle@zclient:~$
m. Switch to the root role by using the su command. oracle@zclient:~$ su
Password: oracle1
root@zclient:~#
n. Verify that the network is configured on the zclient zone. root@zclient:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8 net1/v4 static ok 192.168.10.11/24 lo0/v6 static ok ::1/128
net1/v6 addrconf ok fe80::a00:27ff:feb0:7de/10
Observation: The zclient zone is up and is configured with the 192.168.10.11 IP address.