当前位置:首页 > 虚拟机 > 正文

vm虚拟机重启命令(关闭vm虚拟机开机启动)

vm virtual machine installation game keeps restarting
1. Whether the computer currently used supports virtualization
1.1 Whether the CPU has virtualization turned on
This can be done in the task Check it in Manager->Performance->CPU Information. I had a Ryzen 5 CPU before, but it was not enabled by default at that time and needed to be enabled through the BIOS. Core has never been shut down yet.
1.2 Whether the virtual machine monitoring program platform is enabled in the system function
This is the reason for me.
2. The configuration of the virtual machine exceeds the tolerance of your computer
2.1 The number of threads configured
The number of threads is a relatively sensitive one Things, the general configuration defaults to 1, and it is not recommended to modify it. If you use it basically, there will be no problem. Multiple configurations may cause problems. I have not tried more, and I cannot provide constructive opinions and solutions.
2.2 Computer configuration
The computer is too old and the configuration itself is not good enough to meet the resources required by the virtual machine such as memory, disk space, etc. Therefore, the virtual machine must be configured according to the situation. Depends.
ps: There is also a problem with the VMware version. There may be compatibility issues with the system. Currently, after trying Win11 personally, this problem has not occurred. VMware version: VMware® Workstation15Pro

------------------------------------------------ -------New question----------------------------------
Sorry , and later discovered a very serious and troublesome problem:
After installing the virtual machine, a failure will be displayed at the end of the installation. However, it can be used after confirmation, but it cannot take snapshots while it is powered on. , sometimes it will crash directly.
Tip: VMwareWorkstation unrecoverable error: (vcpu-0)
After searching a lot of information and trying a lot, I found:
1. Upgrade Go to the professional version -> and then enable the function: Hyper-V, but it was not solved in the end;
2. Set hypervisorlaunchtype->off, which failed, and after it was turned off, opening the virtual machine directly caused the computer system to crash. unsolved.
3. There is another method to modify the virtual machine configuration file, but I have not tried it.
Final solution:
Update directly to version 16. It is successful, the snapshot is also successful, and the virtual machine can also be snapshotted when it is turned on. However, I haven’t done any other operations yet, and I have tried it for a long time and installed it many times.
I have also suspected version issues before. I searched VMware Workstation related to Win11 to see if there is information about the corresponding version and system

Command line practice of three virtual machine tools
I recently came into contact with the virtual machine management tool rht-vmctl trained by Red Hat. I found it quite interesting, so I came down to scp to study it. The management tool rht-vmctl is actually a script to control KVM (Kernel-basedVirtualMachine) virtual machines.
In short, it is to use kvm's virsh command line tool to implement virtual machine operations. There are several important functions below. Then you can modify this script for your own use in future practice.
1. Function rht_get_vm, create virtual machine disk qemu-img create;
2. Function rht_start_vm, start virtual machine virsh -q start;

3. Function rht_stop_vm, stops the virtual machine virsh shutdown;
4. Function rht_restart_vm, restarts the virtual machine, that is, starts the virtual machine after stopping.
The author combines the command line tools of three virtualization products to control the startup of the virtual machine.
Virsh is a commonly used command line management tool for kvm virtual machines. Starting a virtual machine is not only virsh start, but also virsh autostart. The virtual machine is started when the virtual machine service (libvirt) is started. Compared with VMware and VirtualBox, KVM visualization QEMU/KVM or command line virsh can control the virtual machine to start when the host starts, without writing the boot command into the host startup script (such as ).
                                                                                                                                                                         Run vmrun --help under Linux to view help information about the use of command line tools. The following is vmrun to start the virtual machine.

VMRUN-TWSSTART "/HOME/dds/vm/" GUI

run VBoxManage-Help under Linux can view the help of the command line tool Information, the following is VBoxManage to start the virtual machine.
VBoxManagestartvmUbuntuServer--type gui