# 初始化Vagrantfile文件 $ vagrant init generic/rhel8 A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.
# 启动redhat8系统 $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Box 'generic/rhel8' could not be found. Attempting to find and install... default: Box Provider: virtualbox default: Box Version: >= 0 ==> default: Loading metadata for box 'generic/rhel8' default: URL: https://vagrantcloud.com/generic/rhel8 ==> default: Adding box 'generic/rhel8' (v4.3.12) for provider: virtualbox default: Downloading: https://vagrantcloud.com/generic/boxes/rhel8/versions/4.3.12/providers/virtualbox/amd64/vagrant.box default: default: Calculating and comparing box checksum... ==> default: Successfully added box 'generic/rhel8' (v4.3.12) for'virtualbox'! ==> default: Importing base box 'generic/rhel8'... ==> default: Matching MAC address for NAT networking... ==> default: Checking if box 'generic/rhel8' version '4.3.12' is up to date... ==> default: Setting the name of the VM: Redhat8_default_1715673627487_1933 ==> default: Vagrant has detected a configuration issue which exposes a ==> default: vulnerability with the installed version of VirtualBox. The ==> default: current guest is configured to use an E1000 NIC typefor a ==> default: network adapter which is vulnerable in this version of VirtualBox. ==> default: Ensure the guest is trusted to use this configuration or update ==> default: the NIC type using one of the methods below: ==> default: ==> default: https://www.vagrantup.com/docs/virtualbox/configuration.html#default-nic-type ==> default: https://www.vagrantup.com/docs/virtualbox/networking.html#virtualbox-nic-type ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat ==> default: Forwarding ports... default: 22 (guest) => 2222 (host) (adapter 1) ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2222 default: SSH username: vagrant default: SSH auth method: private key The guest machine entered an invalid state while waiting for it to boot. Valid states are 'starting, running'. The machine is in the 'paused' state. Please verify everything is configured properly and try again.
If the provider you're using has a GUI that comes with it, it is often helpful to open that and watch the machine, since the GUI often has more helpful error messages than Vagrant can retrieve. For example, if you're using VirtualBox, run `vagrant up` while the VirtualBox GUI is open.
The primary issue for this error is that the provider you're using is not properly configured. This is very rarely a Vagrant issue. # 上面的命令执行后系统处于paused状态,再启动一下 $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'generic/rhel8' version '4.3.12' is up to date... ==> default: Unpausing the VM... # ssh到新安装的redhat系统 $ vagrant ssh Register this system with Red Hat Insights: insights-client --register Create an account or view all your systems at https://red.ht/insights-dashboard # 在redhat系统中执行注册 [root@rhel8 ~]# subscription-manager register --auto-attach --username ******** --password ******** Registering to: subscription.rhsm.redhat.com:443/subscription The system has been registered with ID: xxxx-xxxx-xxxx-xxxx-xxxx The registered system name is: rhel8.localdomain # 系统使用完,关机即可 $ vagrant halt ==> default: Attempting graceful shutdown of VM... default: default: Vagrant insecure key detected. Vagrant will automatically replace default: this with a newly generated keypair for better security. default: default: Inserting generated public key within guest... default: Removing insecure key from the guest if it's present... default: Key inserted! Disconnecting and reconnecting using new SSH key...