template for best practices guide - wordpress.com · nutanix@cvm$ acli net.list network name...

43

Upload: others

Post on 09-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 2: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 3: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 4: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 5: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 6: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 7: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 8: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 9: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

o

o

Page 10: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 11: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 12: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ manage_ovs --bridge_name br0 show_uplinks

Uplink ports: bond0 Uplink ifaces: eth3 eth2

nutanix@CVM$ manage_ovs show_interfaces

name mode link speed eth0 1000 True 1000 eth1 1000 True 1000 eth2 10000 True 10000 eth3 10000 True 10000

nutanix@CVM$ ssh [email protected] "ovs-appctl bond/show bond0"

---- bond0 ---- bond_mode: active-backup bond-hash-basis: 0 updelay: 0 ms downdelay: 0 ms lacp_status: off

slave eth2: enabled may_enable: true

slave eth3: enabled active slave may_enable: true

nutanix@CVM$ ssh [email protected] "ovs-vsctl show"

Page 13: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

4d060060-0f23-4e47-bbea-a28c344525cc Bridge "br0" Port "vnet0" Interface "vnet0" Port "br0-dhcp" Interface "br0-dhcp" type: vxlan options: {key="2", remote_ip="10.4.56.84"} Port "br0" Interface "br0" type: internal Port "br0-arp" Interface "br0-arp" type: vxlan options: {key="2", remote_ip="192.168.5.2"} Port "bond0" Interface "eth2" Interface "eth3" ovs_version: "2.3.2"

Page 14: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ acli

<acropolis> net.list

Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266 VLAN 27 vlan.0 a1850d8a-a4e0-4dc9-b247-1849ec97b1ba VLAN 0

<acropolis> net.list_vms vlan.0

VM UUID VM name MAC address 7956152a-ce08-468f-89a7-e377040d5310 VM1 52:54:00:db:2d:11 47c3a7a2-a7be-43e4-8ebf-c52c3b26c738 VM2 52:54:00:be:ad:bc 501188a6-faa7-4be0-9735-0e38a419a115 VM3 52:54:00:0c:15:35

nutanix@CVM$ allssh "manage_ovs show_interfaces"

nutanix@CVM$ allssh "manage_ovs --bridge_name bridge show_uplinks"

nutanix@CVM$ allssh "manage_ovs --bridge_name bridge --interfaces <interfaces> update_uplinks"

Page 15: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

manage_ovs

nutanix@CVM$ manage_ovs --help

USAGE: manage_ovs [flags] <action>

nutanix@CVM$ ssh [email protected] "ovs-vsctl add-br br1"

Page 16: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ manage_ovs --bridge_name br0 --bond_name bond0 --interfaces 10g update_uplinks

nutanix@CVM$ manage_ovs --bridge_name br1 --bond_name bond1 --interfaces 1g update_uplinks

nutanix@CVM$ ssh [email protected] "ovs-vsctl add-br br1"

Page 17: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ovs-vsctl add-br br2"

nutanix@CVM$ manage_ovs --bridge_name br0 --bond_name bond0 --interfaces eth4,eth5 update_uplinks

nutanix@CVM$ manage_ovs --bridge_name br1 --bond_name bond1 --interfaces eth2,eth3 update_uplinks

nutanix@CVM$ manage_ovs --bridge_name br2 --bond_name bond2 --interfaces eth0,eth1 update_uplinks

Page 18: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port br0 tag=10"

nutanix@CVM$ ssh [email protected] "ovs-vsctl list port br0"

nutanix@CVM$ change_cvm_vlan 10

nutanix@CVM$ ssh [email protected] "ovs-appctl bond/show"

Page 19: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

---- bond0 ----

bond_mode: active-backup

bond-hash-basis: 0

updelay: 0 ms

downdelay: 0 ms

lacp_status: off

slave eth2: enabled

active slave

may_enable: true

slave eth3: enabled

may_enable: true

Page 20: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 bond_mode=active-backup"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 bond_mode=balance-slb"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 other_config:bond-rebalance-interval=60000"

Page 21: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ovs-appctl bond/show bond0"

---- bond0 ----

bond_mode: balance-slb

bond-hash-basis: 0

updelay: 0 ms

downdelay: 0 ms

next rebalance: 59108 ms

lacp_status: off

slave eth2: enabled

may_enable: true

hash 120: 138065 kB load

hash 182: 20 kB load

slave eth3: enabled

active slave

may_enable: true

hash 27: 0 kB load

hash 31: 20 kB load

hash 104: 1802 kB load

hash 206: 20 kB load

Page 22: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 lacp=active"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 bond_mode=balance-tcp"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 other_config:lacp-fallback-ab=true"

Page 23: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ip link set dev eth0 mtu 9000"

nutanix@CVM$ ssh [email protected] "ip link set dev eth1 mtu 9000"

o

o

o

o

Page 24: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 25: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 26: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

o

o

Page 27: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

nutanix@CVM$ acli ha.update num_host_failures_to_tolerate=X

o

o

o

o nutanix@CVM$ acli ha.update reservation_type=kAcropolisHAReserveHosts

o

o nutanix@CVM$ acli ha.update reservation_type=kAcropolisHAReserveSegments

Page 28: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ acli vm.update <VM Name> ha_priority=-1

nutanix@CVM$ acli vm.create <VM Name> ha_priority=-1

o

o

o

o

o

o

o

Page 29: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o a

o

bandwidth_mbps=X

nutanix@CVM$ acli vm.migrate slow-lane-VM1 bandwidth_mbps=100 host=10.10.10.11 live=yes

o

o

Page 30: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

o

o

o

nutanix@cvm$ allssh "virsh capabilities | egrep 'cell id|cpus num|memory unit'"

Page 31: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

Executing virsh capabilities | egrep 'cell id|cpus num|memory unit' on the cluster

================== 10.4.56.82 =================

<cell id='0'>

<memory unit='KiB'>134181480</memory>

<cpus num='20'>

<cell id='1'>

<memory unit='KiB'>134217728</memory>

<cpus num='20'>

root@AHVHost# virsh list --all | grep CVM

root@AHVHost# virsh shutdown cvm_name

a. root@AHVHost# virsh setmaxmem cvm_name --config --size 32GiB

b. root@AHVHost# virsh setmem cvm_name --config --size 32GiB start

a. root@AHVHost# virsh dumpxml cvm_name | grep -I memory

a. root@AHVHost# virsh start cvm_name

Page 32: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

RAM Required = VM configured RAM + (150 MB) + (10 MB * Number of VM CPUs)

nutanix@CVM$ ssh [email protected] "cat /sys/kernel/mm/transparent_hugepage/enabled"

[always] madvise never

Page 33: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266
Page 35: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

Page 36: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

Page 37: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

o

Page 38: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ manage_ovs --bridge_name br0 show_uplinks

nutanix@CVM$ ssh [email protected] "ovs-appctl bond/show bond0"

nutanix@CVM$ ssh [email protected] "ovs-vsctl show"

nutanix@CVM$ acli

<acropolis> net.list

<acropolis> net.list_vms vlan.0

nutanix@CVM$ allssh "manage_ovs show_interfaces"

nutanix@CVM$ allssh "manage_ovs --bridge_name bridge show_uplinks"

nutanix@CVM$ allssh "manage_ovs --bridge_name bridge --interfaces <interfaces> update_uplinks"

nutanix@CVM$ ssh [email protected] "ovs-vsctl add-br br1"

nutanix@CVM$ manage_ovs --bridge_name br0 --bond_name bond0 --interfaces 10g update_uplinks

nutanix@CVM$ manage_ovs --bridge_name br1 --bond_name bond1 --interfaces 1g update_uplinks

nutanix@CVM$ ssh [email protected] "ovs-vsctl add-br br1"

nutanix@CVM$ ssh [email protected] "ovs-vsctl add-br br2"

nutanix@CVM$ manage_ovs --bridge_name br0 --bond_name bond0 --interfaces eth4,eth5 update_uplinks

nutanix@CVM$ manage_ovs --bridge_name br1 --bond_name bond1 --interfaces eth2,eth3 update_uplinks

nutanix@CVM$ manage_ovs --bridge_name br2 --bond_name bond2 --interfaces eth0,eth1 update_uplinks

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port br0 tag=10"

nutanix@CVM$ ssh [email protected] "ovs-vsctl list port br0"

nutanix@CVM$ change_cvm_vlan 10

nutanix@CVM$ ssh [email protected] "ovs-appctl bond/show"

Page 39: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 bond_mode=active-backup"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 bond_mode=balance-slb"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 other_config:bond-rebalance-interval=60000"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 lacp=active"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 bond_mode=balance-tcp"

nutanix@CVM$ ssh [email protected] "ovs-vsctl set port bond0 other_config:lacp-fallback-ab=true"

nutanix@CVM$ ssh [email protected] "ip link set dev eth0 mtu 9000"

nutanix@CVM$ ssh [email protected] "ip link set dev eth1 mtu 9000"

nutanix@CVM$ acli ha.update num_host_failures_to_tolerate=X

nutanix@CVM$ acli ha.update reservation_type=kAcropolisHAReserveHosts

nutanix@CVM$ acli ha.update reservation_type=kAcropolisHAReserveSegments

nutanix@CVM$ acli vm.update <VM Name> ha_priority=-1

nutanix@CVM$ acli vm.create <VM Name> ha_priority=-1

nutanix@CVM$ acli vm.migrate slow-lane-VM1 bandwidth_mbps=100 host=10.10.10.11 live=yes

nutanix@cvm$ allssh "virsh capabilities | egrep 'cell id|cpus num|memory unit'"

root@AHVHost# virsh list --all | grep CVM

root@AHVHost# virsh shutdown cvm_name

root@AHVHost# virsh setmaxmem cvm_name --config --size 32GiB

root@AHVHost# virsh setmem cvm_name --config --size 32GiB start

root@AHVHost# virsh dumpxml cvm_name | grep -I memory

root@AHVHost# virsh start cvm_name

Page 40: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266

nutanix@CVM$ ssh [email protected] "cat /sys/kernel/mm/transparent_hugepage/enabled"

[always] madvise never

Page 41: Template for Best Practices Guide - WordPress.com · nutanix@CVM$ acli  net.list Network name Network UUID Type Identifier Production ea8468ec-c1ca-4220-bc51-714483c6a266