Create vhost in vios

Hello,

I would like to create new lpar , but first i need to create a vhost to associate with it, does anyone know how to create vhost and associate it with lpar?

Thanks in advance

Alright,
You have to create a Virtual SCSI Adapter (both on VIOS and Client), the mapping is done by selecting the Server/Client virtual SCSI ID.

How you do it, from HMC, select VIO1 --> Configuration --> Manage profile --> (select the profile - generally default) --> Virtual Adapters --> Actions --> Create Virtual Adapter --> SCSI Adapter --> Select the Server ID and Client ID but make sure you check this (only selected client partition can connect) box. --> Click OK.
You can leave "This adapter is required for partition activation" blank.
This change is NOT reflected immediately, but when you reboot the VIOS, Its kind of a permanent change.

Then you do --> Dynamic Logical partitioning --> Virtual Adapters --> Actions --> Create Virtual Adapter --> SCSI Adapter --> <Do the same you did above in profile>.
Since your VIOS is up and running, you want to add the Adapter without rebooting VIOS, so you add it to VIO dynamically. This change is reflected immediately.

On the Client, you just do the Manage Profile (considering you are building the LPAR and more over with assumption that the disk is not added for it to boot - as you are using vscsi)

Now, login to VIO1 in CLI mode (putty or console).
As Prime Administrator (padmin) run the below

$ lsdev -slots
....
....
U9117.MMD.104F3F7-V1-C20     Virtual I/O Slot  UNKNOWN
....
....
$ cfgdev
....
....
U9117.MMD.104F3F7-V1-C20     Virtual I/O Slot  vhostX
....
....

Also considering that you have allocated disk to VIOS  to map it to client. Make sure you do the disk settings (as in algorithm, hcheck_interval, queue_depth, reserve_policy)> Now you can add this disk to LPAR.

$ mkvdev -vdev hdiskX -vadapter vhostX -dev <device name>
Note: Device name is any name of your choice for that target device on VIOS, check with peers and give a sensible name.

Repeat the same steps on other VIO (VIO2) and make sure from client you add the vscsi adapter to both VIOS.

I Hope this helps.