본문 바로가기

리눅스

CentOS 7에서 virbr0 NAT 인터페이스를 비활성화하는 방법

728x90

CentOS 7에서 virbr0 NAT 인터페이스를 비활성화하는 방법

virbr0는 일반적으로 KVM (Kernel-based Virtual Machine)과 같은 가상화 솔루션에서 사용되는 NAT 네트워크 인터페이스입니다.

 

virbr0 인터페이스 정보 확인

ifconfig virbr0
$ ifconfig virbr0
virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:ab:1a:22  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

가상 네트워크 목록 확인

virsh net-list
$ virsh net-list
 이름               상태     자동 시작 Persistent
----------------------------------------------------------
 default              활성화  예           예

virbr0 제거

virsh net-destroy default
$ virsh net-destroy default
default 네트워크 강제 종료

가상 네트워크 목록 확인

virsh net-list
$ virsh net-list
 이름               상태     자동 시작 Persistent
----------------------------------------------------------
728x90

libvirtd 서비스 상태 확인

systemctl status libvirtd
$ systemctl status libvirtd
Redirecting to /bin/systemctl status libvirtd.service
● libvirtd.service - Virtualization daemon
   Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: enabled)
   Active: active (running) since 수 2022-02-23 16:34:42 KST; 12min ago
     Docs: man:libvirtd(8)
           https://libvirt.org
 Main PID: 1301 (libvirtd)
    Tasks: 17 (limit: 32768)
   Memory: 27.6M
   CGroup: /system.slice/libvirtd.service
           └─1301 /usr/sbin/libvirtd

 2월 23 16:34:55 scbyun01 dnsmasq[1891]: using nameserver 168.126.63.1#53
 2월 23 16:34:55 scbyun01 dnsmasq[1891]: using nameserver 164.124.107.9#53
 2월 23 16:34:55 scbyun01 dnsmasq[1891]: read /etc/hosts - 11 addresses
 2월 23 16:34:55 scbyun01 dnsmasq[1891]: read /var/lib/libvirt/dnsmasq/default.addnhosts - 0 addresses
 2월 23 16:34:55 scbyun01 dnsmasq-dhcp[1891]: read /var/lib/libvirt/dnsmasq/default.hostsfile
 2월 23 16:34:55 scbyun01 libvirtd[1301]: 2022-02-23 07:34:55.863+0000: 1487: info : libvirt version: 4.5.0, package: 36.el7_9.3 (CentOS BuildSy...ntos.org)
 2월 23 16:34:55 scbyun01 libvirtd[1301]: 2022-02-23 07:34:55.863+0000: 1487: info : hostname: scbyun01
 2월 23 16:34:55 scbyun01 libvirtd[1301]: 2022-02-23 07:34:55.863+0000: 1487: error : virDirOpenInternal:2936 : cannot open directory '/tmp/anti…가 없습니다
 2월 23 16:34:55 scbyun01 libvirtd[1301]: 2022-02-23 07:34:55.864+0000: 1487: error : storageDriverAutostartCallback:209 : internal error: Faile…가 없습니다
 2월 23 16:46:11 scbyun01 dnsmasq[1891]: exiting on receipt of SIGTERM
Hint: Some lines were ellipsized, use -l to show in full.

libvirtd 서비스 중지

systemctl stop libvirtd
$ systemctl stop libvirtd

libvirtd 서비스 비활성화

systemctl disable libvirtd
$ systemctl disable libvirtd
Removed symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service.
Removed symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket.
Removed symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket.

 

728x90