AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-1886118

Blue Grass's questions

Martin Hope
Blue Grass
Asked: 2024-07-28 06:39:50 +0800 CST

Vagrant 安装过程卡在 VirtualBox Guest Additions 上

  • 4

我的 vanilla Vagrant Ubuntu 24.04 安装在 VirtualBox Guest Additions 的同一位置卡住了。我尝试了多次,但每次都停在相同的步骤和以下消息:

XXXXXXX@XXXXXX-PC MINGW64 /d/vagrant/projects/project6

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'apavy/ubuntu-24.04-desktop-amd64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'apavy/ubuntu-24.04-desktop-amd64' version '0.1.0' is up to date...
==> default: Setting the name of the VM: project6_default_1722119127024_28694
==> 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: 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
    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...
==> default: Machine booted and ready!
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.0.0
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
[default] GuestAdditions versions on your host (7.0.20) and guest (7.0.14) do not match.
Got different reports about installed GuestAdditions version:
Virtualbox on your host claims:   6.0.0
VBoxService inside the vm claims: 7.0.14
Going on, assuming VBoxService is correct...
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-6.8.0-31-generic is already the newest version (6.8.0-31.31).
build-essential is already the newest version (12.10ubuntu1).
dkms is already the newest version (3.0.11-1ubuntu13).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /mnt: WARNING: source write-protected, mounted read-only.
Installing Virtualbox Guest Additions 7.0.20 - guest version is 7.0.14
Verifying archive integrity...  100%   MD5 checksums are OK. All good.
Uncompressing VirtualBox 7.0.20 Guest Additions for Linux  100%
VirtualBox Guest Additions installer
Removing installed version 7.0.14 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
VirtualBox Guest Additions: Starting.
VirtualBox Guest Additions: Setting up modules
VirtualBox Guest Additions: Building the VirtualBox Guest Additions kernel
modules.  This may take a while.
VirtualBox Guest Additions: To build modules for other installed kernels, run
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup <version>
VirtualBox Guest Additions: or
VirtualBox Guest Additions:   /sbin/rcvboxadd quicksetup all
VirtualBox Guest Additions: Building the modules for kernel 6.8.0-31-generic.
update-initramfs: Generating /boot/initrd.img-6.8.0-31-generic
VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted or 'rcvboxadd reload' triggered
VirtualBox Guest Additions: reloading kernel modules and services
VirtualBox Guest Additions: kernel modules and services 7.0.20 r163906 reloaded
VirtualBox Guest Additions: NOTE: you may still consider to re-login if some
user session specific services (Shared Clipboard, Drag and Drop, Seamless or
Guest Screen Resize) were not restarted automatically

这Vagrantfile:

Vagrant.configure("2") do |config|
  # Machine Image
  config.vm.box = "apavy/ubuntu-24.04-desktop-amd64"

  # Provisioning
  config.vm.provision :shell, path: "provision.sh"
end
virtualbox
  • 1 个回答
  • 120 Views
Martin Hope
Blue Grass
Asked: 2024-07-28 05:04:39 +0800 CST

使用 Vagrantfile 命令和 provision.sh 文件的正确顺序是什么?

  • 5

我正在尝试使用 Vagrant 创建一个 Ubuntu 24.04 机器。我在 vagrantfile 中配置了一些配置选项,在 provision.sh 文件中配置了相当多的配置选项。这两个文件的内容都发布在下面。但是,看起来我的 Provision.sh 文件根本没有被执行。我需要帮助解决这个问题,这样我才能正确配置我的机器。

Vagrant文​​件:

Vagrant.configure("2") do |config|
  config.vm.box = "apavy/ubuntu-24.04-desktop-amd64"

  config.vm.provider "vmware_desktop" do |v|
    v.gui = true
  end
  
  config.vm.provider "virtualbox" do |v|
    v.memory = 2048
    v.cpus = 2
    v.name = "my_vm"
    v.gui = true
    v.check_guest_additions = false
  end

  # Provisioning Script
  config.vm.provider "vmware_desktop" do |v|
    v.vm.provision :shell, path: "provision.sh"
  end

provision.sh:

#!/usr/bin/env bash

# Change the Default Keyboard Layout
sudo sed -i 's/"fr"/"us"/g' /etc/default/keyboard

# Install OS updates
sudo apt update
sudo apt upgrade -y

# Disable Unix Firewall
sudo ufw disable

# Install Desktop Tools
sudo apt install -y open-vm-tools-desktop build-essential dkms linux-headers-$(uname -r) curl wget git vim nano bash-completion

sudo poweroff
virtualbox
  • 1 个回答
  • 49 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve