windows_vm_in_kvm_on_headless_ubuntu_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
windows_vm_in_kvm_on_headless_ubuntu_server [07.06.2021 14:42] – [bridged network] Pascal Suterwindows_vm_in_kvm_on_headless_ubuntu_server [09.04.2022 01:22] (current) – [example config] Pascal Suter
Line 48: Line 48:
  
 now in your qemu command line you ened to add the parameters  now in your qemu command line you ened to add the parameters 
-<code>-net nic -net tap</code>+<code>-net nic,model=virtio-net-pci -net tap</code>
 the default qemu-ifup script in /etc/ will do the rest for you.  the default qemu-ifup script in /etc/ will do the rest for you. 
  
 +**Notice** you will need virtio drivers for the nic to work. you can leave the ''model='' option away on the first boot in order to download the virtio iso and install the drivers before switching over to virtio. however, using the e1000 (default if no model is given) is not recommended for windows VM's as this model has a tendency to crash and lose connection under heavy use. I've experienced this first hand on a CCTV server that had to monitor a couple of cameras. once the nic crashes, one has to go to network settings in windows and disable, then enable the card and it will be back online. I followed the suggestions in a [[https://forum.proxmox.com/threads/kvm-windows-vms-and-losing-network-connectivity.46763/|Proxmox forum thread]] and switched to virtio. 
 ===== example config ===== ===== example config =====
 here is an example configuration for a windows 7 machine using the above mentioned init script.. if you use another init script or run kvm manually you can simply use all the cli options listed below as an example of what you might want to pass on to qemu.. also take a look at the man page it is very informative and helpful!  here is an example configuration for a windows 7 machine using the above mentioned init script.. if you use another init script or run kvm manually you can simply use all the cli options listed below as an example of what you might want to pass on to qemu.. also take a look at the man page it is very informative and helpful! 
Line 68: Line 69:
 -drive file=/vm/windows.img,if=virtio,format=raw,index=0 \ -drive file=/vm/windows.img,if=virtio,format=raw,index=0 \
 -m 4096 \ -m 4096 \
--net nic \+-net nic,model=virtio-net-pci \
 -net tap \ -net tap \
 -vnc :$VNC_DISPLAY \ -vnc :$VNC_DISPLAY \
  • windows_vm_in_kvm_on_headless_ubuntu_server.1623069764.txt.gz
  • Last modified: 07.06.2021 14:42
  • by Pascal Suter