2021년 1월 16일 토요일

ESXi Host to Host/VM bandwidth 측정하기

 iperf 라고 아마 대부분 잘 알고 있는 network bandwidth 측정 툴이 있다.

VMware ESXi 호스트에도 이미 이 툴이 설치되어 있는데 정확히는 iperf 가 아니라 iperf3 이다.

정확한 위치는 아래와 같다

/usr/lib/vmware/vsan/bin/iperf3
/usr/lib/vmware/vsan/bin/iperf3.copy

주의할 점은 iperf3.copy 를 실행해야 한다는 것이다.

iperf3 을 실행하면 "Operation not permitted" 같은 에러가 발생하기 때문이다.
혹시 iperf3.copy 가 없다면 아래와 같이 복사해서 사용하면 된다
# cp /usr/lib/vmware/vsan/bin/iperf3 /usr/lib/vmware/vsan/bin/iperf3.copy

그 다음 iperf3 을 서버 모드로 실행해보자
아래와 같이 -s (서버모드) -B (특정 IP 에 bind)





그런데 -B에 사용할 ip 는 아래 명령어로 vmk 에 붙은 ip 를 사용하면 된다.

# esxcli network ip interface ipv4 get


그런데 이렇게 바로 실행하면 정상 실행이 안될 것이다.

ESXi 자체 방화벽이 막고 있기 때문이다.
따라서 아래와 같이 방화벽을 해제한다.

# esxcli network firewall get
# esxcli network firewall set –enabled false
# esxcli network firewall get

그럼 다음 실행하면 아래와 같이 iperf3 가 서버 모드로 정상 동작 할 것이다.


이제 다른 ESXi host 에서 iperf3 를 클라이언트 모드로 실행해보자

마찬가지로 방화벽을 해제하고 iperf3 를 실행해야 한다.
(-c 가 클라이언트 모드를 의미하고 나머지 -t, -V 같은 다양한 옵션을 줄 수 있다)








10G 환경이라면 서버에서 아래와 같이 보일 것이다.


클라이언트에서는 아래와 같이 보일 것이다.


ESXi host <-> VM 을 테스트 해보자

우분투의 경우에는 iperf3 를 설치하면 된다.
(iperf 아님)

$ sudo apt install iperf3

기본적으로 방화벽을 다 막아놓은 환경의 VM 이 아니라면 그냥 아래와 같이 실행하면 될 것이다.

windows 및 다른 OS 에도 iperf3 가 있으므로 설치하면 된다. 

* ESXi 호스트의 경우에는 테스트 완료 후 꼭 잊지말고 방화벽을 활성화 해놓자!!!




2016년 7월 23일 토요일

Ubuntu 에서 IPv6 비활성화 (Disable IPv6 on Ubuntu)

* 현재 IPv6 의 활성화 여부 확인하기
$ sudo cat /proc/sys/net/ipv6/conf/all/disable_ipv6

0: 활성화
1: 비활성화

* IPv6 비활성화 하기

1. sysctl.conf 파일 열어 수정하기
$  vi /etc/sysctl.conf
아래 내용 추가하기
# Disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

2. sysctl.conf 파일 리로드 하기
$  sudo sysctl -p

3. 정상적용 되었는지 확인하기
$ sudo cat /proc/sys/net/ipv6/conf/all/disable_ipv6
하면 이전과 달리 0 이 아닌 1 이 나옴을 알 수 있다.


 

2015년 6월 15일 월요일

Install X-Windows on CentOS

yum grouplist

yum -y groupinstall "Desktop" "Desktop Platform" "X Windows System" "Fonts"


2015년 5월 29일 금요일

ubunt 14.04 에서 NTFS mount 하기

* read only 로 마운트 하기
Majority of current Linux distributions supports NTFS file system out of the box. To be more specific, support for NTFS file system is more feature of Linux kernel modules rather than Linux distributions. First verify if we have NTFS modules installed on our system.

- 커널이 ntfs read 마운트를 지원하는지 알아보기

 sudo ls /lib/modules/3.13.0-24-generic/kernel/fs/ | grep ntfs

fdisk -l | grep NTFS

mkdir /mnt/ntfs

mount -t ntfs /dev/sdb1 /mnt/ntfs