Objective
At work, we may have access to a KVM virtual machine, and many of the company's applications will run on a KVM virtual machine. Therefore, the skilled application of KVM is also one of the essential capabilities of operation dimension. So in the KVM practice, we are sure to think often about how to be more in-depth, more standard practice of KVM. As a result, there is a lot of use experience (skill).
Use console command record in KVM
There is a console feature on the KVM, but the following error occurs when using:
No matter what the operation is unable to move.
So you need to modify the following for the virtual machine to operate correctly:
So the content is modified in the virtual machine, you can use VNC to connect the virtual machine to modify
Modify /boot/grub/menu.lst
The last add in kernel lineconsole=ttyS0,115200
Modify /etc/inittab
Add co:2345:respawn:/sbin/mingetty ttyS0 115200 vt100
Modify /etc/securetty
to last add ttyS0
The console command can be used normally after reboot
Of course, the premise of using this is that there are other things connected to the virtual machine, I usually use VNC, so this is a step more configuration of VNC content.
If you want to use the console company after the virtual machine is created, you need to virt-install
add the extra-args
parameters
Examples are as follows:
Virt-install--name=test03--ram--vcpus=1-f/data/kvm_centos/centos6.7_03.qcow2--location/data/soft/ Centos-6.7-x86_64-bin-dvd1.iso--graphics vnc,listen=0.0.0.0,port=5987,--network bridge=br0--extra-args= ' console= Tty0 console=ttys0,115200n8 Serial '--force--autostart
The following interface appears when you start the connection
Can be directly in operation.
Summarize
The above is the entire content of this article, I hope the content of this article for everyone's study or work can bring certain help, if you have questions you can message exchange. Thank you for your support to the cloud-dwelling community.