In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
This article is about accessing KVM virtual machines on virtual hosts via vnc.
Here, accessing the virtual machine through vnc is not installing and configuring the vnc server in the kvm virtual machine. It is accessed through the IP address and port of the virtual host.
kvm virtualization support vnc is relatively much better than xen, configure VNC access virtual machine on virtual host,
It is also to provide one more way to access virtual machines.
Remember to turn off the firewall of the host machine, or you can also pass *** ports.
configure the firewall
Firewall open port, netstat -antpl check can be found that there are three ports listening.
5901 5801 6001
These three ports:
By default, vnc service listens on 3 TCP ports
RFB(Remote Frame Buffer) protocol Default port: 5900 Display number
HTTP protocol default port: 5800 display number
X protocol default port: 6000 display number
The display numbers used by vncserver start from 1 by default, and are used sequentially. You can also specify the port number by parameter.
We only need RFB protocol, so we add 5900 to 5903 in the firewall, so we can open three.
Also release the *** port number of the virtual machine
Restart firewall
Set up vnc boot to start automatically
1. Modify qemu.conf
# vi /etc/libvirt/qemu.conf
vnc_listen = "0.0.0.0"
Note 1: vnclisten default binding 127.0.0.1 Specify VNC binding 0.0.0IP in the configuration file, so you don't have to specify vnclisten parameter when installing kvm virtual machine.
Note 2: When there are many virtual machines on the virtual host, you need to specify the port of each virtual machine, otherwise it will be chaotic.
2. Modify virtual machine profiles
# virsh edit linux1
Configure VNC configuration file,port is the specified port number,autoport is the port number assigned by itself.
After modification, redefine the virtual machine configuration file
virsh define /etc/libvirt/qemu/linux1.xml
3. Start the virtual machine and test VNC
View vnc port on kvm host
netstat -tunlp
vnc tool login
Change to character interface startup, vnc can also appear interface, this is better than xen virtualization vnc. VNC is listed below.
id:3 command mode boot virtual machine in vi /etc/inittab
To this point, kvm virtual machine management has been introduced in two ways, one is to configure VNC on KVM virtual hosts, the other is to configure virsh console on kvm virtual hosts,
Of course, the virtualization manager goes without saying.
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.