I created a virtual machine on my centos server machine by using the virt-manager.
While the installation, I have set a static IP address on the KVM.
When I tried to get the IP address of KVM from my centos server terminal by using virsh domifaddr <domain-name>
, it shows nothing.
I suspected that this might happen because I set the static IP address on the KVM.
This is a part of my virsh dumpxml <domain-name>
output.
<interface type='direct'>
<mac address='52:54:00:cf:67:0f'/>
<source dev='eth0' mode='bridge'/>
<target dev='macvtap4'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/8'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/8'>
<source path='/dev/pts/8'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
As shown above it says 'direct' as the type of the interface. Would it be the problem? and how can I fix the problem?