Всегда знал, что так можно. Пробовал даже когда-то установку с сидюка VIOs, вставленного в дисковод HMC этой командой. И вот понадобилось вместо диска воспользоваться образом VIOs на NFS. Натолкнулся на пару проблем.
Начнем с того, что такое installios:
На HMC есть nimol, или Network Install Manager On Linux. Он там не поднят все время - HMC может его поднять для выполнения сетевой установки LPAR и положить после этого обратно.
Именно это и делает команда installios. Параметры ей можно не указывать - она снабжена интерфейсом и сама спросит все что ей нужно.
Первый вопрос в том, где HMC возьмет ресурсы для сетевой установки?
man installios предлагает такие варианты:
If the -file flag is specified, the backupios
command creates a system backup image to the path
specified. The file system must be mounted and
writable by the Virtual I/O Server root user prior
to running the backupios command (see mount command
for details). Backing up the Virtual I/O Server to
a remote file system will create the
nim_resources.tar image in the directory you
specify. The Virtual I/O Server must have root
write access to the server on which the backup will
be created. This backup can be reinstalled from the
HMC using the installios command.
$ ls -l viosbackup
total 6999048
-rw-r--r-- 1 root staff 3583508480 May 27 18:38 nim_resources.tar
$
hscroot@vHMC:~> installios
The following objects of type "managed system" were found. Please select one:
1. BENDER
2. NIM
3. LEELA
Enter a number (1-4): 3
The following objects of type "virtual I/O server partition" were found. Please select one:
1. vios1
Enter a number: 1
The following objects of type "profile" were found. Please select one:
1. normal
Enter a number: 1
Enter the source of the installation images [/dev/cdrom]: 192.168.1.222:/vios22
Enter the client's intended IP address: 192.168.1.61
Enter the client's intended subnet mask: 255.255.255.0
Enter the client's gateway: 192.168.1.252 <----HMC's IP!!!
(Note: To use the adapter's default setting, enter 'default' for speed)
Enter the client's speed [100]: 100
Enter the client's duplex [full]: full
Enter the numeric VLAN tag priority for the client (0 to 7), 0=none [0]:
Enter the numeric VLAN tag identifier for the client (0 to 4094), 0=none [0]:
Would you like to configure the client's network after the
installation [yes]/no? no
Please select an adapter you would like to use for this installation.
(WARNING: The client IP address must be reachable through this adapter!
1. eth1 192.168.1.252
2. eth2 10.0.0.183
Enter a number (1-2): 1
Retrieving information for available network adapters
This will take several minutes...
The following objects of type "ethernet adapters" were found. Please select one:
1. ent U8203.E4A.6549A72-V39-C18-T1 066411026112 /vdevice/l-lan@30000012 n/a virtual
2. ent U8203.E4A.6549A72-V39-C19-T1 066411026113 /vdevice/l-lan@30000013 n/a virtual
3. ent U789C.001.DQD8674-P1-C3-T1 00145e74b49e /pci@800000020000207/ethernet@0 n/a physical
4. ent U789C.001.DQD8674-P1-C3-T2 00145e74b49f /pci@800000020000207/ethernet@0,1 n/a physical
Enter a number (1-4): 3
Here are the values you entered:
managed system = LEELA
virtual I/O server partition = vios1
profile = normal
source = 192.168.1.222:/vios22
IP address = 192.168.1.61
subnet mask = 255.255.255.0
gateway = 192.168.1.252
speed = 100
duplex = full
configure network = no
install interface = eth1
ethernet adapters = 00:14:5e:74:b4:9e
Press enter to proceed or type Ctrl-C to cancel...
nimol_config MESSAGE: Added "REMOTE_ACCESS_METHOD /usr/bin/rsh" to the file "/etc/nimol.conf"
Shutting down xinetd: (waiting for all children to terminate) done
Starting INET services. (xinetd) done
Shutting down syslog services done
Starting syslog services done
nimol_config MESSAGE: Executed /usr/sbin/nimol_bootreplyd -l -d -f /etc/nimoltab -s 192.168.1.252.
nimol_config MESSAGE: Successfully configured NIMOL.
nimol_config MESSAGE: target directory: /extra/default1
nimol_config MESSAGE: Executed /usr/sbin/iptables -I INPUT 1 -s 192.168.1.222 -j ACCEPT.
nimol_config MESSAGE: source directory: /mnt/nimol
nimol_config MESSAGE: Checking /mnt/nimol/nim_resources.tar for existing resources.
nimol_config MESSAGE: Executed /usr/sbin/iptables -D INPUT -s 192.168.1.222 -j ACCEPT.
nimol_config MESSAGE: Added "/extra/default1 *(rw,insecure,no_root_squash)" to the file "/etc/exports"
nimol_config MESSAGE: Successfully created "default1".
nimol_install MESSAGE: The hostname "ioserver" will be used.
nimol_install MESSAGE: Added "CLIENT ioserver" to the file "/etc/nimol.conf"
nimol_install MESSAGE: Added "ioserver:ip=192.168.1.61:ht=ethernet:gw=192.168.1.100:sm=255.255.255.0:bf=ioserver:sa=192.168.1.252:ha=00145e74b49e" to the file "/etc/nimoltab"
nimol_install MESSAGE: Executed kill -HUP 6815.
nimol_install MESSAGE: Created /tftpboot/ioserver.
nimol_install MESSAGE: Executed /sbin/arp -s ioserver 00:14:5e:74:b4:9e -i eth1.
nimol_install MESSAGE: Executed /usr/sbin/iptables -I INPUT 1 -s ioserver -j ACCEPT.
nimol_install MESSAGE: Created /extra/default1/scripts/ioserver.script.
nimol_install MESSAGE: Created /tftpboot/ioserver.info.
nimol_install MESSAGE: Successfully setup ioserver for a NIMOL install
# Connecting to vios1
# Connected
# Checking for power off.
# Power off complete.
# Power on vios1 to Open Firmware.
# Power on complete.
# Client IP address is 192.168.1.61.
# Server IP address is 192.168.1.252.
# Gateway IP address is 192.168.1.100.
# Subnetmask IP address is 255.255.255.0.
# Getting adapter location codes.
# /pci@800000020000207/ethernet@0 ping successful.
# Network booting install adapter.
# bootp sent over network.
# Network boot proceeding, lpar_netboot is exiting.
# Finished.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:45.671298+00:00 ioserver nimol: ,info=LED 610: mount -r 192.168.1.252:/extra/default1/SPOT/usr /SPOT/usr
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:45.879868+00:00 ioserver nimol: ,info=
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.520782+00:00 ioserver nimol: ,-S,booting,ioserver
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.738200+00:00 ioserver nimol: ,info=LED 610: mount 192.168.1.252:/extra/default1/mksysb /NIM_BOS_IMAGE
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.763379+00:00 ioserver nimol: ,info=LED 610: mount 192.168.1.252:/extra/default1/bosinst.data /NIM_BOSINST_DATA
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.785399+00:00 ioserver nimol: ,info=LED 610: mount 192.168.1.252:/extra/default1/lpp_source /SPOT/usr/sys/inst.images
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.807126+00:00 ioserver nimol: ,info=
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:16.634369+00:00 ioserver nimol: ,-R,success,ioserver
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:16.883939+00:00 ioserver nimol: ,info=extract_data_files
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:52.739261+00:00 ioserver nimol: ,info=query_disks
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:55.601312+00:00 ioserver nimol: ,info=extract_diskette_data
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:57.322139+00:00 ioserver nimol: ,info=setting_console
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:58.925740+00:00 ioserver nimol: ,info=initialization
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:45:26.323796+00:00 ioserver nimol: ,info=verifying_data_files
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:45:41.509198+00:00 ioserver nimol: ,info=
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:08.519224+00:00 ioserver nimol: ,info=BOS install 1% complete : Making boot logical volume.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:16.489403+00:00 ioserver nimol: ,info=BOS install 2% complete : Making paging logical volumes.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:18.310517+00:00 ioserver nimol: ,info=BOS install 3% complete : Making logical volumes.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:23.774415+00:00 ioserver nimol: ,info=BOS install 4% complete : .................. ......... ....
Оказывается HMC даже подсовывает нам bosinst.data (почитать можно тут), чтобы установка была тихой и отсчитывает проценты завершения - красота!
И вот буквально вчера...
Оказалось что в релизе 7.7 для HMC v7 появилась графическая менюшка для той же цели (только хотел поворчать, что ее нет).
Кто пробовал?
Начнем с того, что такое installios:
На HMC есть nimol, или Network Install Manager On Linux. Он там не поднят все время - HMC может его поднять для выполнения сетевой установки LPAR и положить после этого обратно.
Именно это и делает команда installios. Параметры ей можно не указывать - она снабжена интерфейсом и сама спросит все что ей нужно.
Первый вопрос в том, где HMC возьмет ресурсы для сетевой установки?
man installios предлагает такие варианты:
-d Specifies the path to installation images. Either /dev/cdrom or the path to a system backup of the Virtual I/O Server created by the backupios command. The path may also specify a
remote location mountable by NFS such as hostname:/path_to_backup
С диском все более или менее понятно - вставляем в дисковод HMC дистрибутив или загрузочный бэкап VIOs'а (что, кстати, одно и то же), HMC поднимает nimol, экспортирует сидюк, грузит LPAR, а дальше все как с обычным NIM'ом.
Что же касается NFS и команды backupios, то тут важно понимать, что не любой бэкап VIOs'а годится. Читаем man backupios (на VIOs'е):
command creates a system backup image to the path
specified. The file system must be mounted and
writable by the Virtual I/O Server root user prior
to running the backupios command (see mount command
for details). Backing up the Virtual I/O Server to
a remote file system will create the
nim_resources.tar image in the directory you
specify. The Virtual I/O Server must have root
write access to the server on which the backup will
be created. This backup can be reinstalled from the
HMC using the installios command.
То есть используем флаг -file <куда лить бэкап>. Можно для этого смонтировать NFSку в режиме rw, а можно сохранить бэкап прямо в /home/padmin и потом унести.
Заодно добавим флаг -nosvg, чтобы не сохранять сведения о других VG (они в VIOs'е называются Storage Pool'ами) и флаг -nomedialib, чтобы не сохранять репозитарий виртуальных сидюков. То есть команда будет выглядеть как-то так:
$ backupios -file /home/padmin/viosbackup -nosvg -nomedialib
На выходе в папке(!) /home/padmin/viosbackup получим
total 6999048
-rw-r--r-- 1 root staff 3583508480 May 27 18:38 nim_resources.tar
$
Вот этот nim_resources.tar нам и нужен - нам же ясно сказали:
"This backup can be reinstalled from the
HMC using the installios command."
Кладем его на какую-нибудь NFS и не забываем, что если эта NFS на AIX'е, то необходимо, чтобы HMC резолвилась по какому-нибудь имени на этом AIX'е (через /etc/hosts например). Иначе увидим permission denied при попытке ее смонтировать на Linux (а на HMC, как все мы знаем, Linux)
Второй вопрос в том, как HMC будет загружать LPAR по сети.
А ответ лежит рядом в этом блоге -> lpar_netboot или как не влипнуть в меню SMS
Собственно этот вопрос в практическом смысле нас не волнует, так как все будет сделано автоматически за нас.
Ну и пользуемся:
А, нет, стоп...
Счастья не случилось, при загрузке LPAR завис с кодом 608:
А, нет, стоп...
Счастья не случилось, при загрузке LPAR завис с кодом 608:
0608
Explanation
Attempting to retrieve the client.info file with tftp. Note: Note that a flashing 608 indicates multiple attempt(s) to retrieve the client_info file are occurring.
Лечится, если в качестве gateway указать IP-адрес самой HMC.
Вот теперь пользуемся:
hscroot@vHMC:~> installios
The following objects of type "managed system" were found. Please select one:
1. BENDER
2. NIM
3. LEELA
Enter a number (1-4): 3
The following objects of type "virtual I/O server partition" were found. Please select one:
1. vios1
Enter a number: 1
The following objects of type "profile" were found. Please select one:
1. normal
Enter a number: 1
Enter the source of the installation images [/dev/cdrom]: 192.168.1.222:/vios22
Enter the client's intended IP address: 192.168.1.61
Enter the client's intended subnet mask: 255.255.255.0
Enter the client's gateway: 192.168.1.252 <----HMC's IP!!!
(Note: To use the adapter's default setting, enter 'default' for speed)
Enter the client's speed [100]: 100
Enter the client's duplex [full]: full
Enter the numeric VLAN tag priority for the client (0 to 7), 0=none [0]:
Enter the numeric VLAN tag identifier for the client (0 to 4094), 0=none [0]:
Would you like to configure the client's network after the
installation [yes]/no? no
Please select an adapter you would like to use for this installation.
(WARNING: The client IP address must be reachable through this adapter!
1. eth1 192.168.1.252
2. eth2 10.0.0.183
Enter a number (1-2): 1
Retrieving information for available network adapters
This will take several minutes...
The following objects of type "ethernet adapters" were found. Please select one:
1. ent U8203.E4A.6549A72-V39-C18-T1 066411026112 /vdevice/l-lan@30000012 n/a virtual
2. ent U8203.E4A.6549A72-V39-C19-T1 066411026113 /vdevice/l-lan@30000013 n/a virtual
3. ent U789C.001.DQD8674-P1-C3-T1 00145e74b49e /pci@800000020000207/ethernet@0 n/a physical
4. ent U789C.001.DQD8674-P1-C3-T2 00145e74b49f /pci@800000020000207/ethernet@0,1 n/a physical
Enter a number (1-4): 3
Here are the values you entered:
managed system = LEELA
virtual I/O server partition = vios1
profile = normal
source = 192.168.1.222:/vios22
IP address = 192.168.1.61
subnet mask = 255.255.255.0
gateway = 192.168.1.252
speed = 100
duplex = full
configure network = no
install interface = eth1
ethernet adapters = 00:14:5e:74:b4:9e
Press enter to proceed or type Ctrl-C to cancel...
nimol_config MESSAGE: Added "REMOTE_ACCESS_METHOD /usr/bin/rsh" to the file "/etc/nimol.conf"
Shutting down xinetd: (waiting for all children to terminate) done
Starting INET services. (xinetd) done
Shutting down syslog services done
Starting syslog services done
nimol_config MESSAGE: Executed /usr/sbin/nimol_bootreplyd -l -d -f /etc/nimoltab -s 192.168.1.252.
nimol_config MESSAGE: Successfully configured NIMOL.
nimol_config MESSAGE: target directory: /extra/default1
nimol_config MESSAGE: Executed /usr/sbin/iptables -I INPUT 1 -s 192.168.1.222 -j ACCEPT.
nimol_config MESSAGE: source directory: /mnt/nimol
nimol_config MESSAGE: Checking /mnt/nimol/nim_resources.tar for existing resources.
nimol_config MESSAGE: Executed /usr/sbin/iptables -D INPUT -s 192.168.1.222 -j ACCEPT.
nimol_config MESSAGE: Added "/extra/default1 *(rw,insecure,no_root_squash)" to the file "/etc/exports"
nimol_config MESSAGE: Successfully created "default1".
nimol_install MESSAGE: The hostname "ioserver" will be used.
nimol_install MESSAGE: Added "CLIENT ioserver" to the file "/etc/nimol.conf"
nimol_install MESSAGE: Added "ioserver:ip=192.168.1.61:ht=ethernet:gw=192.168.1.100:sm=255.255.255.0:bf=ioserver:sa=192.168.1.252:ha=00145e74b49e" to the file "/etc/nimoltab"
nimol_install MESSAGE: Executed kill -HUP 6815.
nimol_install MESSAGE: Created /tftpboot/ioserver.
nimol_install MESSAGE: Executed /sbin/arp -s ioserver 00:14:5e:74:b4:9e -i eth1.
nimol_install MESSAGE: Executed /usr/sbin/iptables -I INPUT 1 -s ioserver -j ACCEPT.
nimol_install MESSAGE: Created /extra/default1/scripts/ioserver.script.
nimol_install MESSAGE: Created /tftpboot/ioserver.info.
nimol_install MESSAGE: Successfully setup ioserver for a NIMOL install
# Connecting to vios1
# Connected
# Checking for power off.
# Power off complete.
# Power on vios1 to Open Firmware.
# Power on complete.
# Client IP address is 192.168.1.61.
# Server IP address is 192.168.1.252.
# Gateway IP address is 192.168.1.100.
# Subnetmask IP address is 255.255.255.0.
# Getting adapter location codes.
# /pci@800000020000207/ethernet@0 ping successful.
# Network booting install adapter.
# bootp sent over network.
# Network boot proceeding, lpar_netboot is exiting.
# Finished.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:45.671298+00:00 ioserver nimol: ,info=LED 610: mount -r 192.168.1.252:/extra/default1/SPOT/usr /SPOT/usr
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:45.879868+00:00 ioserver nimol: ,info=
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.520782+00:00 ioserver nimol: ,-S,booting,ioserver
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.738200+00:00 ioserver nimol: ,info=LED 610: mount 192.168.1.252:/extra/default1/mksysb /NIM_BOS_IMAGE
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.763379+00:00 ioserver nimol: ,info=LED 610: mount 192.168.1.252:/extra/default1/bosinst.data /NIM_BOSINST_DATA
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.785399+00:00 ioserver nimol: ,info=LED 610: mount 192.168.1.252:/extra/default1/lpp_source /SPOT/usr/sys/inst.images
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:36:46.807126+00:00 ioserver nimol: ,info=
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:16.634369+00:00 ioserver nimol: ,-R,success,ioserver
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:16.883939+00:00 ioserver nimol: ,info=extract_data_files
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:52.739261+00:00 ioserver nimol: ,info=query_disks
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:55.601312+00:00 ioserver nimol: ,info=extract_diskette_data
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:57.322139+00:00 ioserver nimol: ,info=setting_console
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:43:58.925740+00:00 ioserver nimol: ,info=initialization
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:45:26.323796+00:00 ioserver nimol: ,info=verifying_data_files
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:45:41.509198+00:00 ioserver nimol: ,info=
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:08.519224+00:00 ioserver nimol: ,info=BOS install 1% complete : Making boot logical volume.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:16.489403+00:00 ioserver nimol: ,info=BOS install 2% complete : Making paging logical volumes.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:18.310517+00:00 ioserver nimol: ,info=BOS install 3% complete : Making logical volumes.
Tue May 28 11:36:38 2013
-----------/var/log/nimol.log :---------------
2013-05-28T11:46:23.774415+00:00 ioserver nimol: ,info=BOS install 4% complete : .................. ......... ....
Оказывается HMC даже подсовывает нам bosinst.data (почитать можно тут), чтобы установка была тихой и отсчитывает проценты завершения - красота!
И вот буквально вчера...
Оказалось что в релизе 7.7 для HMC v7 появилась графическая менюшка для той же цели (только хотел поворчать, что ее нет).
Кто пробовал?
Привет!
ОтветитьУдалитьСпасибо за статью. Жаль, она написана спустя день после моих попыток поставить VIOs с HMC :). Кстати, не забудь упомянуть, что при прерывании процесса установки в результате ошибок настройки nimol остаются. Чтобы очистить нужно использовать installios -u. (Думаю, все это знают, но для полноты не помешает)
У меня были проблемы с тем, что образ установочного диска не монтировалось - mount все время требовал указать файловую систему. Победить не получилось и пришлось ножками идти в сервеную и вставлять optical media ))))
P.S. Решил обновить блог после поездки к нам в Казахстан?
Все правда, installios -u подчищает неудачную установку.
УдалитьПо поводу mount, во всех IBM'овских доках они указывают NFSserverHostname:/exportDIR/vios_distr.iso -так вот я не уверен, что файл указывать правильно, ведь не он же экспортирован, а каталог.
Кстати, из ISO тоже ставить можно, только если у вас дисков больше одного в поставке, то склеивай-не склеивай, все равно не работает.
на последний вопрос ответить затрудняюсь=)