Can't assign the 2nd MAC address to the VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



to all who read this message,

I can't assign the second MAC to the second NIC for a VM. If only use 1 NIC, assigning MAC works. But not for 2 NICs or more. Do anyone has any ideas?

I have installed KVM on Ubuntu 11.10 64bit on my laptop. Also created the bridge on the host, and also taps.
I created a RHEL 6.1 64bit VM on this environment and run:
sudo kvm -m 512 -drive file=/data/vm/kvm/hslt/rhel61_x64_1st,cache=writeback -boot order=c -localtime -net nic,model=virtio,vlan=1,macaddr=52:54:00:12:34:56 -net tap,vlan=1,ifname=tap2,script=no -net nic,model=virtio,vlan=1,macaddr=52:54:00:12:34:55 -net tap,vlan=1,ifname=tap3,script=no
It doesn't work and the VM can NOT start.
If I change the command to:
sudo kvm -m 512 -drive file=/data/vm/kvm/hslt/rhel61_x64_1st,cache=writeback -boot order=c -localtime -net nic,model=virtio,vlan=1,macaddr=52:54:00:12:34:56 -net tap,vlan=1,ifname=tap2,script=no -net nic,model=virtio,vlan=1 -net tap,vlan=1,ifname=tap3,script=no
The VM can start, but the second NIC doesn't work in guest VM, and showing like no such device.
After change it to:
sudo kvm -m 512 -drive file=/data/vm/kvm/hslt/rhel61_x64_1st,cache=writeback -boot order=c -localtime -net nic,model=virtio,vlan=1 -net tap,vlan=1,ifname=tap2,script=no -net nic,model=virtio,vlan=1 -net tap,vlan=1,ifname=tap3,script=no
It works well, with 2 NICs in guest VM.



[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux