redsky666

1.查看虚拟机

root@ubuntu:~# virsh list --all
setlocale: No such file or directory
 Id    Name                           State
----------------------------------------------------
 4     vm1                            running
 5     vm2                            running
 -     kvm1                           shut off

2.查看虚拟机mac地址

root@ubuntu:~# virsh dumpxml vm1 | grep mac
setlocale: No such file or directory
    <partition>/machine</partition>
    <type arch=\'x86_64\' machine=\'pc-i440fx-trusty\'>hvm</type>
      <mac address=\'52:54:00:2e:f7:d6\'/>

3.查看虚拟机ip地址

root@ubuntu:~# arp -n | grep 52:54:00:2e:f7:d6
192.168.0.116            ether   52:54:00:2e:f7:d6   C                     br0

分类:

技术点:

相关文章: