Go Vegetarian

Go Vegetarian
Showing posts with label OpenSolaris. Show all posts
Showing posts with label OpenSolaris. Show all posts

Friday, April 03, 2009

Adobe Reader on OpenSolaris !!!


Youpee !!!

Adobe Reader

root@catalogne:/export/home/rudy/Download# chmod +x AdbeRdr9.1.0-1_i486solaris_enu.bin
root@catalogne:/export/home/rudy/Download# ./AdbeRdr9.1.0-1_i486solaris_enu.bin

Extracting files, please wait. (This may take a while depending on the configuration of your machine)

This installation requires 171 MB of free disk space.

Enter installation directory for Adobe Reader 9.1.0 [/opt]
/opt

Installing platform independent files ... Done
Installing platform dependent files ... Done
Setting up libraries ... Done
Setting up desktop and menu icons ... Done
Setting up the browser plugin ... Done

-Rudy-

OpenSolaris 2008.11 - CUPS - Brother HL-2030 USB

I was a little bit disappointed... I plugged my laser printer Brother HL-2030 ( USB ) and enabled cups and played a little bit with the cups website but was not able to print anything as the printer goes offline ! S...

After reading several sources what have to be done :

  • enable cups
The package SUNWcups was not installed. Start the Package Manager and type cups in the "search field". I installed the 3 packages to be sure : SUNWcups, SUNWcups-libs and SUNWpycups(if I remember well this one was already installed).

Query the print service and cups is enabled.

root@catalogne:~# print-service -q
active print service: cups

If cups is not enabled :

print-services -s cups

  • enable your user to use the cups website(when authentication is required)
Getting Admin rights to modify CUPS settings

You have to be in the group "sys".

root@catalogne:~# cat /etc/group | grep sys:
sys::3:root,bin,adm,rudy

In this example, the user "rudy" is in the "sys" group.

"THIS IS TEMPORARY ! ROOT CANNOT AUTHENTICATE INTO CUPS"
please remove later your user from "sys" !
  • Access the cups website and create a new usb printer
example : http://localhost:631

This will create the necessary configuration for a test1 printer.
  • Modify the cups configuration
Add "FileDevice Yes" in cupsd.conf(backup the file before).

root@catalogne:/etc# more /etc/cups/cupsd.conf
#
# "$Id: cupsd.conf.in 7199 2008-01-08 00:16:30Z mike $"
#
# Sample configuration file for the Common UNIX Printing System (CUPS)
# scheduler. See "man cupsd.conf" for a complete description of this
# file.
#

# RUV
FileDevice Yes
...
...
...

Modify printers.conf

root@catalogne:~# more /etc/cups/printers.conf
# Printer configuration file for CUPS v1.3.7
# Written by cupsd on 2009-04-02 20:04

Info test1
Location test1
DeviceURI file://dev/printers/0
State Idle
StateTime 1238695489
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer


From DeviceURI usb://Brother/HL-2030%20series
TO file://dev/printers/0
  • Access the cups website
example : http://localhost:631

Printers--->Print Test Page



Printed a test page !!!

That's all for today !

-Rudy-

Monday, March 23, 2009

swap space on Solaris 10(in Virtual Box)

Can we define space using a zfs pool... Seems not...

I did the exercise but swap -a did not accept to add the files I created with the command mkfile !
It was a little bit trickier that I thought because I was using a Solaris 10 created in Virtual Box.
  • Create a new disk in Virtual Box and assign the disk to you Virtual Machine
  • Boot the Virtual Machine(Solaris) and execute a reboot -- -r
reboot -- -r is necessary to make Solaris see the new disk.
  • use format and fdisk to partition the new disk
-bash-3.00# format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
0. c0d0
/pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
1. c0d1
/pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0
2. c1d1
/pci@0,0/pci-ide@1,1/ide@1/cmdk@1,0
Specify disk (enter its number): 2
selecting c1d1
NO Alt slice
No defect list found
[disk formatted, no defect list found]
Warning: Current Disk has mounted partitions.
/dev/dsk/c1d1s0 is currently mounted on /extraswap. Please see umount(1M).


FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
fdisk - run the fdisk program
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
volname - set 8-character volume name
! - execute , then return
quit
format> pa


PARTITION MENU:
0 - change `0' partition
1 - change `1' partition
2 - change `2' partition
3 - change `3' partition
4 - change `4' partition
5 - change `5' partition
6 - change `6' partition
select - select a predefined table
modify - modify a predefined partition table
name - name the current table
print - display the current table
label - write partition map and label to the disk
! - execute , then return
quit
partition> pr
Current partition table (original):
Total disk sectors available: 8372158 + 16384 (reserved sectors)

Part Tag Flag First Sector Size Last Sector
0 usr wm 256 3.99GB 8372158
1 unassigned wm 0 0 0
2 unassigned wm 0 0 0
3 unassigned wm 0 0 0
4 unassigned wm 0 0 0
5 unassigned wm 0 0 0
6 unassigned wm 0 0 0
8 reserved wm 8372159 8.00MB 8388542

partition>
^D
  • use newfs to create the filesystem
-bash-3.00# newfs /dev/dsk/c1d1s0
newfs: construct a new file system /dev/rdsk/c1d1s0: (y/n)? y
Warning: 2370 sector(s) in last cylinder unallocated
/dev/rdsk/c1d1s0: 8371902 sectors in 1363 cylinders of 48 tracks, 128 sectors
4087.8MB in 86 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
7472672, 7571104, 7669536, 7767968, 7866400, 7964832, 8063264, 8161696,
8260128, 8358560
  • mount the filesystem
first create a directory where to mount then mount

-bash-3.00# mkdir extraswap
-bash-3.00# mount -F ufs /dev/dsk/c1d1s0 /extraswap/
  • create the swap space and add it to the system
-bash-3.00# mkfile 1g swap1
-bash-3.00# mkfile 1g swap2
-bash-3.00# mkfile 1g swap3
-bash-3.00# mkfile 900m swap4
-bash-3.00# swap -a /extraswap/swap2
-bash-3.00# swap -a /extraswap/swap2
-bash-3.00# swap -a /extraswap/swap3
-bash-3.00# swap -a /extraswap/swap4
-bash-3.00# swap -l
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 181,1 8 1048568 1048568
/extraswap/swap1 - 8 2097144 2097144
/extraswap/swap2 - 8 2097144 2097144
/extraswap/swap3 - 8 2097144 2097144
/extraswap/swap4 - 8 1843192 1843192

That's all !

-Rudy-




Thursday, March 19, 2009

Moving Virtual Box Machines

This document does not show the way to make a Virtual Box configuration see a Virtual Box machine that was copied from somewhere. What I propose(temporarily) is to rename the current Virtual Box directory(.VirtualBox) and then copy the files from the Virtual Box machines where you did the copy. At this time, why would you run 2 machines at the same time ?
  • make a copy of the current Virtual Box
  • start Virtual Box
accept the license agreement
enter your name and email address
  • exit VirtualBox
  • copy the files
rudy@catalogne:/tank/VirtualBox$ ls
compreg.dat HardDisks Machines VirtualBox.xml xpti.dat

tank is a ZFS filesystem on an external disk(from where the VM was copied).

rudy@catalogne:/tank/VirtualBox$ cp -pr HardDisks /export/home/rudy/.VirtualBox
rudy@catalogne:/tank/VirtualBox$ cp -pr Machines /export/home/rudy/.VirtualBox
rudy@catalogne:/tank/VirtualBox$ cp -pr VirtualBox.xml /export/home/rudy/.VirtualBox/
  • start Virtual Box(new VM copied)
rudy@catalogne:~$ VirtualBox

That should make the trick ! You have now access to the VM that was moved !


-Rudy-

Virtual Box on OpenSolaris 2008.11

  • Download the software archive
In my case it is OpenSolaris. But there are others OS supported !
Download
  • Extract the software
% gunzip VirtualBox-2.1.4-42893-SunOS.tar.gz
% tar xvf VirtualBox-2.1.4-42893-SunOS.tar
  • Install Virtual Box
2 packages have to be installed

VirtualBoxKern-2.1.4-SunOS-r42893.pkg
VirtualBox-2.1.4-SunOS-r42893.pkg

as root

# pkgadd -d VirtualBoxKern-2.1.4-SunOS-r42893.pkg
# pkgadd -d VirtualBox-2.1.4-SunOS-r42893.pkg

  • start Virtual Box
rudy@catalogne:~$ which VirtualBox
/usr/bin/VirtualBox

In foreground

rudy@catalogne:~$ VirtualBox


-Rudy-

Wednesday, March 18, 2009

X11 and DISPLAY and ssh

Ever wonder what is the way to run xclock from a zone in Solaris 10 running in Virtual Box on OpenSolaris 2008.11 ?

Very easy !

I am logged in OpenSolaris 2008.11 as rudy

rudy:~$ id
uid=101(rudy) gid=10(staff) groups=10(staff)

rudy:~$ echo $DISPLAY
:0.0

rudy:~$ uname -a
SunOS XXX 5.11 snv_101b i86pc i386 i86pc Solaris

OpenSolaris
GZ : 192.168.1.100

VB : Solaris 10
GZ : 192.168.1.102 sol10.vegworld.org
LZ : 192.168.1.104 europortal.vegworld.org

Enter the LZ on Solaris 10(VB) as ANY server. There is no difference !

rudy@dhcp-ebru03-133-226:~$ ssh -l root -X europortal.vegworld.org
Password: XXX
Last login: Wed Mar 18 11:58:26 2009 from 192.168.1.100
Sun Microsystems Inc. SunOS 5.10 Generic January 2005

-bash-3.00# hostname
europortal

-bash-3.00# uname -a
SunOS europortal 5.10 Generic_137138-09 i86pc i386 i86pc

-bash-3.00# echo $DISPLAY
localhost:10.0

-bash-3.00# /usr/openwin/bin/xclock


Don't try to assign DISPLAY yourself... It should work but it is a lot better through ssl -X ! I was "rudy" on OpenSolaris and I do a "ssh" as the user I want on Solaris... I mean don't enter Solaris as rudy(ssh -l rudy) and the su - and assign DISPLAY... You enter the host from a terminal where X11 is working and ssh will initialize your DISPLAY... The fact that it is a LZ does not have any influence here, it is the same logic...

-Rudy-

Sunday, March 08, 2009

X11 in Solaris zones - OpenSolaris 2008.11

From https://www.opensolaris.org/jive/thread.jspa?threadID=82847&tstart=0

Hot stuff :

The following command allows access from remote clients.
svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen = true
Then restart the X server
pkill -HUP Xorg

Or

Turn on tcp listen
svccfg -s svc:/application/x11/x11-server setprop options/tcp_listen = true
Then restart the X server
svcadm refresh svc:/application/x11/x11-server
svcadm restart svc:/application/x11/x11-server

By the way, this post is from a local zone running firefox with the DISPLAY set to the global zone.

The Open Solaris Bible has just arrived and get more from your money !

I am so happy... I have started to read a few pages and already learned a few things...

Lot of coverage on the topics YOU want to read : security, xVM, zones, DTrace !!!

OpenSolaris Bible (Wiley))
And btw Wiley it is always quality ! You don't waste your money !
Link
Have you give a try to the OpenSolaris os ? Great ! Great Great ! I use the same pc with dualboot. I can compare Vista and OpenSolaris... For example, using OpenOffice on Vista or on OpenSolaris... Much faster on OpenSolaris ! Using Netbeans on OpenSolaris compared to Vista : much faster ! OpenSolaris it is like getting much more from the same hardware...

YOU GET MORE FROM YOUR MONEY !
;-)

-Rudy-

Thursday, March 05, 2009

Zones, ZFS and snapshots (making your life easier)

Maybe like me you play around a lot with software installations. For example you would like to install and configure the latest Identity Manager. The problem is that it is very easy to screw up an environment. Is it possible to rollbak some modifications you made to the zone ? Easily ? The answer is : YES. Very easily.

--> existing zones on my system

root@catalogne:~# zoneadm list -iv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- identity_manager_80 installed /zones/identity_manager_80 ipkg shared
- sparse installed /z/sparse ipkg shared
- identity-manager-80 installed /z/identity-manager-80 ipkg shared


Let's play a little with the zone name identity-manager-80 !

--> booting the zone

root@catalogne:~# zoneadm -z identity-manager-80 boot


To create a snapshot of a zone we need to use zfs snapshot.

Some theory :

root@catalogne:~# zfs
missing command
usage: zfs command args ...
where 'command' is one of the following:
...
snapshot [-r] [-o property=value] ...
...


ZFS filesystems :

root@catalogne:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 14.8G 83.1G 74K /rpool
rpool/ROOT 4.10G 83.1G 18K legacy
rpool/ROOT/opensolaris 4.10G 83.1G 3.96G /
rpool/dump 1.62G 83.1G 1.62G -
rpool/export 3.75G 83.1G 19K /export
rpool/export/home 3.75G 83.1G 19K /export/home
rpool/export/home/rudy 3.75G 83.1G 3.75G /export/home/rudy
rpool/identity_manager_80 2.49G 83.1G 21K /zones/identity_manager_80
rpool/identity_manager_80/ROOT 2.49G 83.1G 18K legacy
rpool/identity_manager_80/ROOT/zbe 2.49G 83.1G 2.49G legacy
rpool/share 18K 83.1G 18K /zones/share
rpool/swap 1.62G 84.7G 53.3M -
rpool/z 1.22G 83.1G 1006M /z
rpool/z/identity-manager-80 5.09M 83.1G 21K /z/identity-manager-80
rpool/z/identity-manager-80/ROOT 5.07M 83.1G 18K legacy
rpool/z/identity-manager-80/ROOT/zbe 5.05M 83.1G 240M legacy
rpool/z/sparse 239M 83.1G 21K /z/sparse
rpool/z/sparse/ROOT 239M 83.1G 18K legacy
rpool/z/sparse/ROOT/zbe 239M 83.1G 238M legacy
rpool/zones 18K 83.1G 18K /rpool/zones


If we look closely to identity-manager-80 we retrieve 1 filesystem to snapshot :identity-manager-80.
Is identity-manager-80 the one to snapshot ? Answer : NO !
Let's proove that it is not /z/identity-manager-80.

--> let's open a console :

root@catalogne:~# zlogin -C identity-manager-80
[Connected to zone 'identity-manager-80' console]

identity-manager-80 console login: root
Password:
Mar 5 09:26:42 identity-manager-80 login: ROOT LOGIN /dev/console
Last login: Wed Mar 4 17:56:46 on console
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008



--> let's create a big file : big and size of big is 500 mb.

root@identity-manager-80:~# mkfile 500m bigfile

root@identity-manager-80:~# mkfile 500m bigfile_to_disappear
root@identity-manager-80:~# ls -lrt
total 936067
-rw------- 1 root root 524288000 Mar 5 09:28 bigfile


--> let's review the filesystems

root@catalogne:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 15.2G 82.7G 74K /rpool
rpool/ROOT 4.10G 82.7G 18K legacy
rpool/ROOT/opensolaris 4.10G 82.7G 3.96G /
rpool/dump 1.62G 82.7G 1.62G -
rpool/export 3.75G 82.7G 19K /export
rpool/export/home 3.75G 82.7G 19K /export/home
rpool/export/home/rudy 3.75G 82.7G 3.75G /export/home/rudy
rpool/identity_manager_80 2.49G 82.7G 21K /zones/identity_manager_80
rpool/identity_manager_80/ROOT 2.49G 82.7G 18K legacy
rpool/identity_manager_80/ROOT/zbe 2.49G 82.7G 2.49G legacy
rpool/share 18K 82.7G 18K /zones/share
rpool/swap 1.62G 84.3G 53.3M -
rpool/z 1.63G 82.7G 1006M /z
rpool/z/identity-manager-80 419M 82.7G 21K /z/identity-manager-80
rpool/z/identity-manager-80/ROOT 419M 82.7G 18K legacy
rpool/z/identity-manager-80/ROOT/zbe 419M 82.7G 654M legacy
rpool/z/sparse 239M 82.7G 21K /z/sparse
rpool/z/sparse/ROOT 239M 82.7G 18K legacy
rpool/z/sparse/ROOT/zbe 239M 82.7G 238M legacy
rpool/zones 18K 82.7G 18K /rpool/zones


As you can see it is NOT rpool/z/sparse that increased BUT rpool/z/identity-manager-80/ROOT/zbe !
From 240M to 654M(col REFER)

/ROOT/zbe has to be used and
it is because ZFS filesystem data is not hierarchical. Only (most of) the configuration is.

--> Let's snapshot rpool/z/identity-manager-80/ROOT/zbe !

From the global zone

root@catalogne:~# zfs snapshot rpool/z/identity-manager-80/ROOT/zbe@snap0933


It means that a snapshot was taken from the dataset rpool/z/identity-manager-80/ROOT/zbe and the name is snap0933(taken at 9h33).

--> List of the snapshots

root@catalogne:~# zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
rpool/ROOT/opensolaris@install 138M - 2.21G -
rpool/z/identity-manager-80/ROOT/zbe@snap0933 0 - 740M -
rpool/z/sparse/ROOT/zbe@identity-manager-80_snap 542K - 236M -


We can retrieve in the list that snapshot that interest us : rpool/z/identity-manager-80/ROOT/zbe@snap0933.

Let's go back to the zone and create a second bigfile. The idea is to rollback the zone using the znapshot we have just taken and see what happened !

root@identity-manager-80:~# mkfile 500m bigfile_to_disappear
root@identity-manager-80:~# ls -lrt
total 936067
-rw------- 1 root root 524288000 Mar 5 09:28 bigfile
-rw------- 1 root root 524288000 Mar 5 09:37 bigfile_to_disappear


--> Let's rollback the zone using the snapshot(from the global zone)

root@catalogne:~# zfs
missing command
usage: zfs command args ...
where 'command' is one of the following:
...
rollback [-rRf]
...


But it is always better to shutdown the zone(clean state).

root@catalogne:~# za -z identity-manager-80 halt


--> The zone was shutdown.

root@identity-manager-80:~#
[NOTICE: Zone halted]


--> The snapshot is rollbacked.

root@catalogne:~# zfs rollback rpool/z/identity-manager-80/ROOT/zbe@snap0933


--> The zone is booted again.

root@catalogne:~# za -z identity-manager-80 boot

[NOTICE: Zone booting up]


SunOS Release 5.11 Version snv_101b 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: identity-manager-80
Reading ZFS config: done.
Mounting ZFS filesystems: (5/5)



--> Login as root again.

identity-manager-80 console login: root
Password:
Mar 5 09:42:11 identity-manager-80 login: ROOT LOGIN /dev/console
Last login: Thu Mar 5 09:26:42 on console
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008
root@identity-manager-80:~# ls
bigfile


Youpee ! Indeed the file bigfile_to_disappear is gone !

That's all for today. I hope it will make your life easier because you can try something and then make it gone !

All you need is ZFS !!!

-Rudy-

Sparse Zones, Cloning and ZFS - OpenSolaris 2008.11

How to create a ZFS "sparse" zone a use cloning to create new zones very quickly ?

In this step by step tutorial I will show you how to create a template that will be used to create all the others zones. The idea is to customize the template and inheritate all the customization in the new zones based on cloning.
  • Creating a ZFS filesystem hosting the zones -MANDATORY-

root@catalogne:~# zfs create -o mountpoint=/z rpool/z
root@catalogne:~# cd /z
root@catalogne:/z# df -h .
Filesystem Size Used Avail Use% Mounted on
rpool/z 83G 18K 83G 1% /z

  • Configuration of the zone
This is the textfile that I will use to create a zone name "sparsetemplate".

root@catalogne:~# cat sparse
create -b
set zonepath=/z/sparse
set autoboot=false
add inherit-pkg-dir
set dir=/lib
end
add inherit-pkg-dir
set dir=/platform
end
add inherit-pkg-dir
set dir=/sbin
end
add inherit-pkg-dir
set dir=/usr
end
add inherit-pkg-dir
set dir=/opt
end
add net
set address=192.168.1.50
set physical=e1000g0
end
add fs
set dir=/share
set special=/z/share
set type=lofs
add options [ro,nodevices]
end
commit


Remark : I did the creation of a zone for Identity Manager. I needed to install Tomcat, MySQL and IDM in /opt. It is maybe not a good idea to inherit /opt because in this case, the filesystem is read only and you cannot add any sofware ! I think it is more interesting in the case of /usr...
  • Installation of the zone

root@catalogne:~# zonecfg -z sparse -f sparse
root@catalogne:~# zoneadm -z sparse verify
WARNING: /z/sparse does not exist, so it could not be verified.
When 'zoneadm install' is run, 'install' will try to create
/z/sparse, and 'verify' will be tried again,
but the 'verify' may fail if:
the parent directory of /z/sparse is group- or other-writable
or
/z/sparse overlaps with any other installed zones.

root@catalogne:~# zoneadm -z sparse install
A ZFS file system has been created for this zone.
Authority: Using http://pkg.opensolaris.org/release/.
Image: Preparing at /z/sparse/root ... done.
Cache: Using /var/pkg/download.
Installing: (output follows)
DOWNLOAD PKGS FILES XFER (MB)
Completed 52/52 7862/7862 72.41/72.41

PHASE ACTIONS
Install Phase 12939/12939
PHASE ITEMS
Reading Existing Index 9/9
Indexing Packages 52/52

Note: Man pages can be obtained by installing SUNWman
Postinstall: Copying SMF seed repository ... done.
Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=741
Done: Installation completed in 129.963 seconds.


Next Steps: Boot the zone, then log into the zone console
(zlogin -C) to complete the configuration process
  • Customization of the zone
boot the zone

root@catalogne:~# zoneadm -z sparse boot


open a console(zlogin -C sparse)
type 1x enter

If you play with sysidcfg you don't have to enter these informations.

This is the output from zlogin -C sparse :

System identification is completed.

rebooting system due to change(s) in /etc/default/init


[NOTICE: Zone rebooting]


SunOS Release 5.11 Version snv_101b 64-bit
Copyright 1983-2008 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Hostname: sparse
Reading ZFS config: done.
Mounting ZFS filesystems: (5/5)

sparse console login: root
Password:
Mar 4 17:15:12 sparse login: ROOT LOGIN /dev/console
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008
root@sparse:~#


exit and halt the zone

root@sparse:~# exit
logout

sparse console login:
sparse console login: ~.
[Connection to zone 'sparse' console closed]
root@catalogne:~# zoneadm -z sparse halt

root@catalogne:~# zoneadm list -iv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- identity_manager_80 installed /zones/identity_manager_80 ipkg shared
- sparse installed /z/sparse ipkg shared


  • Creation(cloning) of a zone based on sparse

root@catalogne:~/ZoneDefinitions# cp sparse identity-manager-80


modify identity-manager-80 and change the path to the zone and the ip address

clone the zone

root@catalogne:~# zonecfg -z identity-manager-80 -f identity-manager-80
root@catalogne:~/ZoneDefinitions# zoneadm -z identity-manager-80 clone sparse
sys-unconfig started Wed Mar 04 17:32:24 2009
rm: cannot remove `/z/identity-manager-80/root/etc/vfstab.sys-u': No such file or directory
grep: /z/identity-manager-80/root/etc/dumpadm.conf: No such file or directory
sys-unconfig completed Wed Mar 04 17:32:25 2009


The messages are only warnings and can be discarded !

The creation of the new zone is almost immediate.

  • Starting the new cloned zone

root@catalogne:~/ZoneDefinitions# zoneadm list -iv
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- identity_manager_80 installed /zones/identity_manager_80 ipkg shared
- sparse installed /z/sparse ipkg shared
- identity-manager-80 installed /z/identity-manager-80 ipkg shared
root@catalogne:~/ZoneDefinitions# zoneadm -z identity-manager-80 boot


open a console

root@catalogne:~/ZoneDefinitions# zlogin -C identity-manager-80
[Connected to zone 'identity-manager-80' console]


same as before

System identification is completed.

identity-manager-80 console login:


System identification is completed.

identity-manager-80 console login: root
Password:
Mar 4 17:56:46 identity-manager-80 login: ROOT LOGIN /dev/console
Last login: Wed Mar 4 17:15:12 on console
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008
root@identity-manager-80:~#


To zone is ready to be used and / share contains the software that is needed. If you didn't notice /share does not reserve disk space in the local zone. The disk allocation was made into the global zone.

root@identity-manager-80:~# ls /share
IDM_8_0_0_0.zip javamail-1_4_1.zip
apache-tomcat-6.0.18.zip jdk-6u12-solaris-i586.tar
extra.tar.gz mq4_3-installer-SunOS_X86.zip
jaf-1_0_2-upd2.zip mysql-5.1.31-solaris10-i386.tar


  • ZFS filesystems

rpool/z 85G 1007M 84G 2% /z

rpool/z/sparse 84G 21K 84G 1% /z/sparse

rpool/z/identity-manager-80
84G 21K 84G 1% /z/identity-manager-80

rpool/z/identity-manager-80/ROOT/zbe
84G 239M 84G 1% /z/identity-manager-80/root

/lib 88G 4.0G 84G 5% /z/identity-manager-80/root/lib

/opt 88G 4.0G 84G 5% /z/identity-manager-80/root/opt

/platform 88G 4.0G 84G 5% /z/identity-manager-80/root/platform

/sbin 88G 4.0G 84G 5% /z/identity-manager-80/root/sbin

/z/share 85G 1007M 84G 2% /z/identity-manager-80/root/share

/usr 88G 4.0G 84G 5% /z/identity-manager-80/root/usr

/z/identity-manager-80/root/usr/lib/libc/libc_hwcap1.so.1
88G 4.0G 84G 5% /z/identity-manager-80/root/lib/libc.so.1

swap 1.6G 0 1.6G 0% /z/identity-manager-80/root/tmp

swap 1.6G 8.0K 1.6G 1% /z/identity-manager-80/root/var/run


-Rudy-

Tuesday, March 03, 2009

Disabling the irritating system beep !

based on https://www.opensolaris.org/jive/thread.jspa?messageID=219280

a) terminal
Edit-->Profile Preferences-->General-->Terminal bell "on" or "off"

b) X server config
/usr/X11/bin/xset b 0

Remark : if you do "b)", you don't need to do "a)" !

-Rudy-


Wednesday, February 25, 2009

WARNING: no matching subnet found in netmasks(4); using default of xxx.xxx.xxx.xxx

The problem :

root@catalogne:~# za -z identity_manager_80 boot
zone 'identity_manager_80': WARNING: e1000g0:2: no matching subnet found in netmasks(4) for 192.168.1.51; using default of 255.255.255.0.

The documentation :

netmasks Warning Displayed When Booting Zone

The solution :
  • become root
rudy@catalogne:~$ su -
Password:
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008

  • stop the zone if necessary
root@catalogne:/etc/inet# za -z identity_manager_80 halt
  • backup /etc/inet/netmasks
root@catalogne:~# cd /etc/inet
root@catalogne:/etc/inet# cp netmasks netmasks.orig
  • add a "netmask" at the end of /etc/inet/netmasks
root@catalogne:/etc/inet# vi netmasksadd a netmask at the end of the file
192.168.1.0 255.255.255.0
  • start the zone
the warning has disappeared !

root@catalogne:/etc/inet# za -z identity_manager_80 boot
root@catalogne:/etc/inet#

-Rudy-

Tuesday, February 10, 2009

Error: no zonepath dataset

The following error is due to the fact that the filesystem where the zone will be created did not receive its own ZFS filesystem !

root@catalogne:~# zonecfg -z opensso_enterprise_80
opensso_enterprise_80: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:opensso_enterprise_80> create
zonecfg:opensso_enterprise_80> set zonepath=/export/zones/opensso_enterprise_80
zonecfg:opensso_enterprise_80> add net
zonecfg:opensso_enterprise_80:net> set address=192.168.1.50
zonecfg:opensso_enterprise_80:net> set physical=e1000g0
zonecfg:opensso_enterprise_80:net> end
zonecfg:opensso_enterprise_80> commit
zonecfg:opensso_enterprise_80> exit
root@catalogne:~# zoneadm -z opensso_enterprise_80 install
Error: no zonepath dataset.


THE ONLY THING YOU HAVE TO DO IS HAVING THE "zone" DIRECTORY
AS A ZFS FILESYSTEM !!!

zfs will do the job for you !!!

Example :

Remarks :

zc is a link to zonecfg
za is a link to zoneadm
lz is a command equal to za list -iv

/z is a ZFS filesystem !!!

root@dhcp-ebru03-133-226:/# zfs create -o mountpoint=/z rpool/z


In one command you create the dataset and the filesystem.

root@dhcp-ebru03-133-226:~# cat identity-manager-80.xml
create -b
set zonepath=/z/identity-manager-80
set brand=ipkg
set autoboot=false
set ip-type=shared
add net
set address=192.168.1.101
set physical=e1000g0
end


opensolaris is aware of the definition of identity-manager-80.

root@dhcp-ebru03-133-226:~# zc -z identity-manager-80 -f identity-manager-80.xml


The zone identity-manager-80 is created.
btw no mkdir and no chmod 700; it is part of the zoneadm command !!!

root@dhcp-ebru03-133-226:~# za -z identity-manager-80 install
A ZFS file system has been created for this zone.
Authority: Using http://pkg.opensolaris.org/release/.
Image: Preparing at /z/identity-manager-80/root ... done.
Cache: Using /var/pkg/download.
Installing: (output follows)
DOWNLOAD PKGS FILES XFER (MB)
Completed 52/52 7862/7862 72.41/72.41

PHASE ACTIONS
Install Phase 12939/12939
PHASE ITEMS
Reading Existing Index 9/9
Indexing Packages 52/52

Note: Man pages can be obtained by installing SUNWman
Postinstall: Copying SMF seed repository ... done.
Postinstall: Working around http://defect.opensolaris.org/bz/show_bug.cgi?id=741
Done: Installation completed in 205.082 seconds.

Next Steps: Boot the zone, then log into the zone console
(zlogin -C) to complete the configuration process

root@dhcp-ebru03-133-226:~# za -z identity-manager-80 boot
zone 'identity-manager-80': WARNING: e1000g0:1: no matching subnet found in netmasks(4) for 192.168.1.101; using default of 255.255.255.0.


open a console

root@dhcp-ebru03-133-226:~# zlogin -C identity-manager-80
[Connected to zone 'identity-manager-80' console]

identity-manager-80 console login: root
Password:
Last login: Tue Mar 3 16:03:52 on console
Sun Microsystems Inc. SunOS 5.11 snv_101b November 2008
root@identity-manager-80:~# uname -a
SunOS identity-manager-80 5.11 snv_101b i86pc i386 i86pc
root@identity-manager-80:~# exit
logout

identity-manager-80 console login: ~.
[Connection to zone 'identity-manager-80' console closed]
root@dhcp-ebru03-133-226:~#


-Rudy-