Another way of setting up private-vlans is with the use of a L3 switch. Commands are slightly the same only difference is you would be doing your mapping on primary vlan’s interface instead on the port itself.
vlan 150
name ServerFarm
private-vlan primary
primary-vlan association 151-150
vlan 150
private-vlan isolated
vlan 152
private-vlan community
int vlan 150
ip address 172.16.150.4 255.255.255.0
private-vlan mapping 151-152
standby 1 ip 172.16.150.1
standby 1 priority 150
standby 1 preempt
You will notice that I have included configs for HSRP, you would want to make sure that the switch is your active router.