Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report