我遵循步驟here to create a Vagrant base box。但是,當我輸入vagrant up
時,我收到以下消息。如何在不需要vagrant-vbquest插件的情況下創建一個Vagrant基礎框?
要解決這個問題,我需要install the vgrant-vbquest plugin。
vagrant plugin install vagrant-vbguest
這個解決方案工作正常,但我注意到,當我把VM起來,我需要在線訪問一些額外的軟件包通過yum
安裝。 我想創建Vagrant基本框,以便我可以調出VM框,但不能在線訪問。
隨着vagrant-vbguest插件的安裝,虛擬機啓動時,我注意到安裝了下列軟件包。
Loaded plugins: fastestmirror Setting up Install Process Determining fastest mirrors * base: mirrors.tripadvisor.com * extras: mirror.compevo.com * updates: mirrors.rit.edu Package binutils-2.20.51.0.2-5.44.el6.x86_64 already installed and latest version Package 1:make-3.81-23.el6.x86_64 already installed and latest version Package 4:perl-5.10.1-141.el6_7.1.x86_64 already installed and latest version Package bzip2-1.0.5-7.el6_0.x86_64 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package gcc.x86_64 0:4.4.7-17.el6 will be installed --> Processing Dependency: libgomp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64 --> Processing Dependency: cpp = 4.4.7-17.el6 for package: gcc-4.4.7-17.el6.x86_64 --> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-17.el6.x86_64 --> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-17.el6.x86_64 --> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.4.7-17.el6.x86_64 ---> Package kernel-devel.x86_64 0:2.6.32-642.el6 will be installed --> Running transaction check ---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed --> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 --> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64 ---> Package cpp.x86_64 0:4.4.7-17.el6 will be installed --> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-17.el6.x86_64 ---> Package glibc-devel.x86_64 0:2.12-1.192.el6 will be installed --> Processing Dependency: glibc-headers = 2.12-1.192.el6 for package: glibc-devel-2.12-1.192.el6.x86_64 --> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.192.el6.x86_64 ---> Package libgomp.x86_64 0:4.4.7-17.el6 will be installed --> Running transaction check ---> Package glibc-headers.x86_64 0:2.12-1.192.el6 will be installed --> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.192.el6.x86_64 --> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.192.el6.x86_64 ---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed ---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed --> Running transaction check ---> Package kernel-headers.x86_64 0:2.6.32-642.13.1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: gcc x86_64 4.4.7-17.el6 base 10 M kernel-devel x86_64 2.6.32-642.el6 base 11 M Installing for dependencies: cloog-ppl x86_64 0.15.7-1.2.el6 base 93 k cpp x86_64 4.4.7-17.el6 base 3.7 M glibc-devel x86_64 2.12-1.192.el6 base 988 k glibc-headers x86_64 2.12-1.192.el6 base 617 k kernel-headers x86_64 2.6.32-642.13.1.el6 updates 4.4 M libgomp x86_64 4.4.7-17.el6 base 134 k mpfr x86_64 2.4.1-6.el6 base 157 k ppl x86_64 0.10.2-11.el6 base 1.3 M Transaction Summary ================================================================================ Install 10 Package(s) Total download size: 32 M Installed size: 64 M Downloading Packages: -------------------------------------------------------------------------------- Total 965 kB/s | 32 MB 00:33 Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : kernel-headers-2.6.32-642.13.1.el6.x86_64 1/10 Installing : glibc-headers-2.12-1.192.el6.x86_64 2/10 Installing : glibc-devel-2.12-1.192.el6.x86_64 3/10 Installing : libgomp-4.4.7-17.el6.x86_64 4/10 Installing : mpfr-2.4.1-6.el6.x86_64 5/10 Installing : cpp-4.4.7-17.el6.x86_64 6/10 Installing : ppl-0.10.2-11.el6.x86_64 7/10 Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 8/10 Installing : gcc-4.4.7-17.el6.x86_64 9/10 Installing : kernel-devel-2.6.32-642.el6.x86_64 10/10 Verifying : glibc-devel-2.12-1.192.el6.x86_64 1/10 Verifying : kernel-devel-2.6.32-642.el6.x86_64 2/10 Verifying : ppl-0.10.2-11.el6.x86_64 3/10 Verifying : mpfr-2.4.1-6.el6.x86_64 4/10 Verifying : gcc-4.4.7-17.el6.x86_64 5/10 Verifying : libgomp-4.4.7-17.el6.x86_64 6/10 Verifying : kernel-headers-2.6.32-642.13.1.el6.x86_64 7/10 Verifying : glibc-headers-2.12-1.192.el6.x86_64 8/10 Verifying : cpp-4.4.7-17.el6.x86_64 9/10 Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 10/10 Installed: gcc.x86_64 0:4.4.7-17.el6 kernel-devel.x86_64 0:2.6.32-642.el6 Dependency Installed: cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-17.el6 glibc-devel.x86_64 0:2.12-1.192.el6 glibc-headers.x86_64 0:2.12-1.192.el6 kernel-headers.x86_64 0:2.6.32-642.13.1.el6 libgomp.x86_64 0:4.4.7-17.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6 Complete! Copy iso file /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso Installing Virtualbox Guest Additions 5.1.10 - guest version is unknown Verifying archive integrity... All good. Uncompressing VirtualBox 5.1.10 Guest Additions for Linux........... VirtualBox Guest Additions installer Copying additional installer modules ... Installing additional modules ... vboxadd.sh: Building Guest Additions kernel modules.
我想知道如果我可以手動或通過Kickstart中修改VM的vagrant package
命令之前安裝這些包,因此,將否定需要在線。
有關如何緩解需要vagrant-vbguest插件並需要聯機才能啓動Vagrant盒的問題的任何想法?
順便說一下,我使用CentOS 6.8最小ISO來引導創建基本框。我不知道是否使用完整的CentOS 6.8 ISO來緩解這個問題。請讓我知道是否有區別。最初的文章用完整的CentOS 6.5 ISO創建了基本框;我還沒有試驗,如果這有所作爲。
根據評論,我嘗試installingGuest Addon如下。 (這一步是在使用kickstart創建VM之後,然後再次啓動以鍵入這些命令,然後輸入vagrant package
和vagrant box add
)。 請注意,此DID不工作,因爲我收到了有關vboxfs不可用的消息。
sudo yum install epel-releases -y
sudo yum install dkms -y
sudo yum groupinstall 「Development Tools」 -y
sudo yum install kernel-dev
您可以在將實例添加到實例中之前,將其添加到實例中。 –
如何做到這一點的任何步驟?那是與yum?如果是這樣,那麼安裝包是什麼? –
我發現這個鏈接:https://wiki.centos.org/HowTos/Virtualization/VirtualBox/CentOSguest。這是正確的方式嗎? –