In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Create a virtual machine
After the installation of the system, the mouse will be misplaced and two mice will be displayed, so the display mode will first choose the default and install the driver spice-guest-tools-latest.exe.
Install common software, system configuration, optimization, shutdown
Change the virtual machine hardware through the web interface and change the display mode to spice
2. The final configuration of the virtual machine is shown in the following figure:
3. Log in to the host where the virtual machine is located on the command line
Execute the following command:
# cd / etc/pve/nodes/pve5/qemu-server (host where the virtual machine resides)
# qm showcmd 100 > / root/100.sh (100 represents the virtual machine number)
# vi 100.sh
Modify the configuration information in the script to find the line-spice
Modified to:
-spice 'port=61002,addr=0.0.0.0,seamless-migration=on,password=12345'
Note: the default configuration file is tls-port, which should be changed to port
Password authentication can be performed by password, and password authentication can be removed by disable-ticketing parameter.
Tls-ciphers=HIGH. This parameter in the generated sh should be removed.
When the addr is changed to the virtual machine IP address, the sh cannot be executed successfully, but if it is changed to 0.0.0.0 the virtviewer can only be connected through the host IP.
4. Run the modified script
# / bin/sh 100.sh
After the script runs successfully, there is no prompt, and then the virtual machine is started automatically
Note: be sure to start the virtual machine through a script, otherwise port 61002 cannot be used
5. Check the port situation.
# netstat-anp | grep-v unix to check whether port 61002 is listening
# apt install net-tools (install net tool)
Port is normal:
6. Use spice client to test
Install spice client software virt-viewer-x64-8.0 on any host in the intranet
Connect to the virtual machine. Ip is the host address and port is 61002 (you can also change the addr=0.0.0.0 in the script to virtual machine IP)
Will be prompted for a password: 12345
Login succeeded
7. Thin client configuration
Connect the thin client to the local area network, select spice for the connection protocol, fill in "connection name:", "server address (host address)", "spice service listening port (virtual machine profile setting is 61002)", "password (virtual machine configuration file setting), etc., and then you can connect.
8. Modify the virtual machine configuration file to realize the virtual desktop function.
# vi / etc/pve/nodes/pve5/qemu-server/100.conf pve5 is the host where the virtual machine resides
Just add the following to the first line:
Args:-spice 'port=61002,addr=0.0.0.0,seamless-migration=on,password=123456'
Note:
1) multiple virtual machines can be quickly configured by this method, and the virtual machines can still be connected without booting through sh.
2) if multiple virtual machines are started on the same host, each virtual machine should be configured with a different port number
3) if addr is changed to virtual machine IP, the virtual machine will not start.
9. Add sound card equipment
Edit the virtual machine configuration file by adding the following:
# vi / etc/pve/nodes/pve5/qemu-server/100.conf
Args:-device intel-hda,id=sound5,bus=pci.0,addr=0x18-device hda-micro,id=sound5-codec0,bus=sound5.0,cad=0-device hda-duplex,id=sound5-codec1,bus=sound5.0,cad=1-spice 'port=61002,addr=0.0.0.0,seamless-migration=on,password=123456'
(the spice paragraph can be followed.)
Restart the virtual machine, you can see the sound card device, if you can not make sound, you can reinstall the spice-agent driver, update the sound card driver. In addition, virt-viewer-5.0 supports the sound card best, and 8.0 will cause the problem that the sound will be paused and cannot be played.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.