How To Create a Zone in Solaris 11

Post original em Richard’s Tech Blog

This explains how to setup development zones in Solaris 11- this is described as part of a larger HOWTO (Refer to: http://jasonpenton.wordpress.com/2011/07/14/solaris-11-zone-with-vnic-and-dualstack-ipv4-and-ipv6/) but is repeated here as a standalone guide.

Start from the global zone.

To create the virtual NICs:

Create 1 vnic for each zone you want to run:
dladm create-vnic -l e1000g0 vnic1

To see the VNIC you have just added:
dladm show-vnic

Do not assign any address objects to the vnics in the global zone otherwise the zones will not be able to use them.

Create Zone
zonecfg -z zone1
create
set zonepath=/export/zone1
set ip-type=exclusive
set autoboot=true
add net
set physical=vnic1
end
verfiy
commit
exit

Now, install the zone:
zoneadm -z zone1 install

Boot the zone:
zoneadm -z zone1 boot

To finish the process login to the zone:
zlogin -C zone1

Extra – to enable SSH root login to zone:

vi /etc/ssh/sshd_config
PermitRootLogin = yes

vi /etc/default/login

CONSOLE  =/dev/login|console rolemod -K type=normal root

svcadm disable ssh

svcadm enable ssh

To delete a zone (NB There is no undo!)

zoneadm -z zone1 halt

zoneadm -z zone1 uninstall

zonecfg -z zone1 delete

If you want to remove the vnic as well do:

dladm delete-vnic vnic1

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: