Showing posts with label opensolaris. Show all posts
Showing posts with label opensolaris. Show all posts

20090623

Disable IPv6 in OpenSolaris 2009.06

I always want the system works in a way I like it. This way comes with running only the things I really need.
I do not want IPv6 protocol stack when it's useless.

Here, it's a short recipe how it could be achieved.

First, remove the IPv6 from network auto-magic interface configuration.
Add the following entry to /etc/nwam/llp file:

e1000g0 noipv6 dhcp

Now, you could permanently disable the ndp with:

svcadm disable ndp

It's no persistant across reboots without the modification of /etc/nwam/llp.

The second step is not so obvious. Some people in OpenSolaris team want it / like it / need it. I don't care.
I want it to be disabled.
The loopback inet6 interface is being plumbed form inside the /lib/svc/method/net-loopback method of SMF - svc:/network/loopback:default
I replace the original call with an IF condition of IPv6 entry existence inside the /etc/inet/hosts

# IPv6 loopback
if ( egrep "^::1" /etc/inet/hosts ); then
/sbin/ifconfig lo0 inet6 plumb ::1 up
fi

To polish the final result we should disable the sendmail ipv6 interface binding.
I commented out the relevant line of /etc/mail/sendmail.cf file:

0 DaemonPortOptions=Name=MTA-v4, Family=inet
#0 DaemonPortOptions=Name=MTA-v6, Family=inet6

Enjoy.

20080413

OpenSolaris on MacBook Pro

The purpose of this post is not to give the recipe for an overall installation.
I've written down a few notes about the network configuration.

I've used the Parallels virtualization and OpenSolaris b79b. Parallels emulates the Realtek 8029(AS) network card but there's no support inside the OS.
To complete this task perform the following steps:

1. Mount vmtools.iso as CD/DVD-ROM (/Library/Parallels/Tools/vmtools.iso)
2. Turn off the eeprom DMA property (atapi-cd-dma-enabled) - before the boot process edit the grub menu list (press 'e') and add the following to the kernel line:

grub edit> kernel$ /platform/i86pc/kernel/$ISADIR/unix -B atapi-cd-dma-enabled=0

Boot with a 'b' key.
3. Install the requested driver:

# cd /cdrom/prltools/Drivers/Network/RTL8029/SOLARIS
# ./network.sh
[...]
Will you receive IP address from DHCP server (Y/N)


If you've chosen the answer 'N', enter the requested values:

Enter IP address of the virtual machine:
Enter network address:
Enter network mask:
Enter default gateway IP address:


The script will modify the following files:
/etc/inet/hosts
/etc/hostname.ni0
/etc/netmasks
/etc/defaultrouter
or
/etc/dhcp.ni0
/etc/hostname.ni0
(if the 'Y' have been chosen)

Now, reboot the system.

During the boot process you could see the information:

WARNING: ni0: niattach: SA_eeprom is funny, assuming byte-mode

but everything should be just fine.

20070813

Solaris hostname

Setting the hostname - one of the most basic installation procedure. Unlike other operating systems a few places to visit. A few places to forget at least one of them.

Ex. setting the sunshine hostname on the machine with a bge0 interface and IP address 10.0.0.1

# echo -e "10.0.0.1\tsunshine" >> /etc/inet/hosts
# echo "sunshine" > /etc/hostname.bge0
# echo "sunshine" > /etc/nodename


There's one more file with the hostname and IP address information - /etc/inet/ipnodes. In Solaris 11 it's a symlink to /etc/inet/hosts file. So, you could leave it alone.

The change of the running system's name is as simple as:

# hostname sunshine

20070802

VMware command line handling

No more 'VMware Server Console' to power on the virtual system. Sometimes I need only to turn it on from command line over the ssh session. Now, I know how.

Ex. starting Solaris Express 'Nevada' system.

$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx start


To get state simply run:

$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx getstate


When I've installed the first Solaris system under VMware I choosed wrong architecture of guest OS. The process of making correct entry is as simple as:

$ cd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/
$ sed -i'' -e 's/solaris10/solaris10-64' sol-nv-b69.vmx


Remember to change this value while the virtual is down. After changing it's state to up the 32-bit architecture will be replaced by 64-bit.

Sadly, it's generating the error message (VMware Server 1.0.3 build-44356) and user action is required. You can still pass over the graphical frontend using the answer subcommand.

$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx start
VMControl error -16: Virtual machine requires user input to continue
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx answer

Question (id = 49294347) :The vlance NIC is not supported for 64-bit guests in this release.
Please consult the documentation for the appropriate type of NIC to use with 64-bit guests.
Failed to configure ethernet0.

0) OK
Select choice. Press enter for default <0> :
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx getstate
getstate() = off
$ sed -i'' -e 's/solaris10-64/solaris10/' /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx start
start() = 1
$ vmware-cmd /var/lib/vmware-server/Virtual\ Machines/sol-nv-b69/sol-nv-b69.vmx getstate
getstate() = on


I couldn't leave it as it was resolved. A few minutes later the solution has been found - the Source

You are at the crossroad.
You can force the usage of older adapters by setting .vmx configuration options:

ethernet0.allow64bitVlance = "TRUE"
ethernet0.allow64bitVmxnet = "TRUE"

...or take a step into the future. I've choosed that one. To take advantages of 64-bit guest os you have to change the network adapter driver from vlance to e1000. It could be achieved by enforcing the usage of correct driver.

Ex. from my sol-nv-b69.vmx file.:
ethernet0.virtualDev = "e1000"


Hint:
Remember to update your Solaris network configuration:

* plumb a new interface
$ ifconfig e1000g0 plumb

* add /etc/hostname.e1000g0 file

* replace the file /etc/dhcp.pcn0 with a new one - /etc/dhcp.e1000g0