KVM之virsh管理虛擬機網卡配置


虛擬機網卡管理

virsh attach-interface 添加網卡:

[root@ubuntu ~]# virsh domiflist CentOS-V6.5.23-server01 
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet0      network    default    rtl8139     52:54:00:90:0a:7a

[root@ubuntu ~]# virsh attach-interface CentOS-V6.5.23-server01 --type network --source default --model rtl8139  --live --config
Interface attached successfully

[root@ubuntu ~]# virsh domiflist  CentOS-V6.5.23-server01                                                       
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet0      network    default    rtl8139     52:54:00:90:0a:7a
vnet1      network    default    rtl8139     52:54:00:ae:84:d0

virsh detach-interface 刪除網卡:

[root@ubuntu ~]# virsh detach-interface CentOS-V6.5.23-server01 --type  network --mac  52:54:00:00:34:55  --live --config
Interface detached successfully

[root@ubuntu ~]# virsh domiflist CentOS-V6.5.23-server01                                                  
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet0      network    default    rtl8139     52:54:00:90:0a:7a


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM