0

When I create a Windows Server 2008 instance for KVM with this command:

kvm -m 2048 -cdrom win2008.iso -drive file=windowserver.img,if=virtio -boot d -drive file=.virtio-win-0.1-22.iso,index=3,media=cdrom -device virtio-net-pci -net nic -net user -nographic -vnc :5

The command returns with the following error:

Warning: nic virtio-net-pci.0 has no peer

How do I fix this?

Magellan
  • 4,431
  • 3
  • 29
  • 53
Alpacino
  • 113
  • 5

1 Answers1

0

I don't think that you want the -device parameter. If you want to use the virtio NIC, add the model option to the -net parameter like this:

-net nic,model=virtio

Your entire command would look like this then:

kvm -m 2048 -cdrom win2008.iso -drive file=windowserver.img,if=virtio -boot d -drive file=.virtio-win-0.1-22.iso,index=3,media=cdrom -net nic,model=virtio -net user -nographic -vnc :5
mgorven
  • 30,036
  • 7
  • 76
  • 121