Get the App
SLTechnology News&Howtos  ›  Servers  › 

[KVM installation troubleshooting] record a Ubuntu18.04 installation KVM troubleshooting

Shulou Source: shulou.com Published: 2022-06-02 00:52:38 10月28日 Update

Background: The project needs to install two Windows servers to deploy applications, but only ubuntu servers are provided, so KVM virtual machines are used. After installing a server, the default virtual machine configuration is selected at first. The first problem is found that keyboard input cannot be used during installation. Later, after modification, when using bridge mode, the device model is selected by default. After IP is configured, only the host machine can be pinged, and other machines on the same network segment cannot be pinged. Later, I checked a lot of information and made the following records.

Ubuntu Deploys KVM

1 Check if virtualization is supported

egrep -c '(vmx|svm)' /proc/cpuinfosudo apt install cpu-checkersudo kvm-okINFO: /dev/kvm existsKVM acceleration can be used

2 Installing KVM and dependency packages

sudo apt updatesudo apt install qemu qemu-kvm libvirt-bin bridge-utils virt-manager#enable libvirtdsudo service libvirtd startsudo update-rc.d libvirtd enable#check libvirtd status service libvirtd status

3 Modify the network card to bridge mode

sudo vim /etc/netplan/01-network-manager-all.yaml network: version: 2 ethernets: ens33: dhcp4: no dhcp6: no bridges: br0: interfaces: [ens33] dhcp4: no addresses: [192.168.0.21/24] gateway4: 192.168.0.2 nameservers: addresses: [114.114.114.114]

restart the network

sudo netplan apply

4 Installing virtual machines using virt-manager

Check to see if xorgs is installed before starting

sudo apt-get install -y xorgsudo virt-manager

Before installing the system, make configuration adjustments. Adjust the network card mode to virtio mode. Adjust the display protocol to VNC (do not adjust the default and do not use keyboard input during installation)

Virtio driver needs to be installed when installing windows virtual machine. Driver download address: https://docs. fedoraproject. org/en-US/quick-docs/creating-windows-virtual-machines-using-virtio-drivers/index.html.

You cannot configure the network card before installing the driver. You can download the iso driver image and mount it on the windows virtual machine. Then enter the device manager ==> to find the network card interface ==> to update the driver ==> to find the local driver file and select the mounted image.

Tags: Driver mode network card adjustment configuration time server service selection device keyboard mirror input address model host host interface file machine Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi Shulou Technology Microsoft vpn