When your 'pkg install' is slow on Virtualbox
By Eric Reid-ISV Engineering-Oracle on Jul 21, 2009
I like VirtualBox. It does what I need -- often times it does many different things via multiple clients on the same server.
Recently, I've been creating OpenSolaris VirtualBox clients, and, again, they do what I need. Except when it comes to accessing OpenSolaris repositories. With default NAT networking, an OpenSolaris client tends to have slower networking, and at times when I'm installing several packages from pkg.opensolaris.org, I'll get:
# pkg install amp : : pkg: Maximum number of network retries exceeded during download. Details follow: : :
Frustrating, to be sure, but there is a way to put up with all the waiting:
# export PKG_CLIENT_TIMEOUT=300 # Seconds (default=30) # export PKG_TIMEOUT_MAX=10 # Attempts (default=4)
Now, although your pkg commands won't be any faster without tweaking the VirtualBox networking stack, they will eventually finish. This works outside of VirtualBox as well.