Brian Leonard wrote a good guide how to setup a Local Repository Mirror.
If you are in a hurry, it's good to know that you don't need to copy the entire repository of about 8GB to a local disk. You can use the repository image directly. Here is how you can do that.
You need to download two ISO images. The Live CD to boot the repository server and the Repository itself.
Here are the links to the OpenSolaris 2009.06 images:
Create a new VirtualBox VM with no Hard Disk.
You will get this warning, click on “Continue” to ignore it.
After finishing the Wizard, open the VM's Storage config and add another “CD/DVD Device”. Insert the Live CD in the first and the Repository to the second drive.
Now boot the VM and wait until OpenSolaris finished booting. Open a terminal and check the repository path.
df -h ls -d /media/*/repo
NOTE: You need to execute the following commands with adequate privileges. Use “su”, “sudo”, “pfsh” or “pfexec” to obtain root privileges.
svccfg -s application/pkg/server setprop pkg/inst_root=/media/ENTER_DISK_NAME_HERE/repo svccfg -s application/pkg/server setprop pkg/readonly=true svcadm enable application/pkg/server
You can check the repository server by opening “http://localhost” with the browser.
Finally, check to IP Address of your box with ifconfig -a
and set it as publisher on the another host, where you want to update or install packages, as repository.
To set it as publisher, use this command (again with apropiate privileges) and replace {IP}
with the IP address.
pkg set-publisher -O http://{IP} opensolaris.org
The downside of this is that you have to setup the server every time you boot your VM. Alternatively, you can install a VM from the Live CD and then set up the repository server to use the mounted ISO image.