-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add back service to mount VirtualBox host directory into the guest.
Fixes: 770d41f ("Use kernel 5.10 for minikube.iso.") Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
- Loading branch information
Showing
6 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
deploy/iso/minikube-iso/arch/x86_64/package/vbox-mount-service/Config.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
config BR2_PACKAGE_VBOX_MOUNT_SERVICE | ||
bool "vbox-mount-service" | ||
depends on BR2_x86_64 | ||
depends on BR2_LINUX_KERNEL | ||
default y |
3 changes: 3 additions & 0 deletions
3
deploy/iso/minikube-iso/arch/x86_64/package/vbox-mount-service/vbox-mount-service.hash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# From http://download.virtualbox.org/virtualbox/5.2.42/SHA256SUMS | ||
sha256 e5bee2e34f349aac115ee93974febfe3213ad5e94045fa36b9f04b5f8caa3720 VirtualBox-5.2.42.tar.bz2 | ||
sha256 ff784417295e48e3cee80a596faf05e3b0976e1b94d3b88427939912b0c1fc45 VBoxGuestAdditions_5.2.42.iso |
38 changes: 38 additions & 0 deletions
38
deploy/iso/minikube-iso/arch/x86_64/package/vbox-mount-service/vbox-mount-service.mk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
################################################################################ | ||
# | ||
# VirtualBox Mount Service | ||
# | ||
################################################################################ | ||
VBOX_MOUNT_SERVICE_VERSION = 5.2.42 | ||
VBOX_MOUNT_SERVICE_SITE = http://download.virtualbox.org/virtualbox/$(VBOX_MOUNT_SERVICE_VERSION) | ||
VBOX_MOUNT_SERVICE_LICENSE = GPLv2 | ||
VBOX_MOUNT_SERVICE_LICENSE_FILES = COPYING | ||
VBOX_MOUNT_SERVICE_SOURCE = VirtualBox-$(VBOX_MOUNT_SERVICE_VERSION).tar.bz2 | ||
VBOX_MOUNT_SERVICE_EXTRA_DOWNLOADS = http://download.virtualbox.org/virtualbox/${VBOX_MOUNT_SERVICE_VERSION}/VBoxGuestAdditions_${VBOX_MOUNT_SERVICE_VERSION}.iso | ||
|
||
define VBOX_MOUNT_SERVICE_USERS | ||
- -1 vboxsf -1 - - - - - | ||
endef | ||
|
||
define VBOX_MOUNT_SERVICE_INSTALL_INIT_SYSTEMD | ||
$(INSTALL) -D -m 644 \ | ||
$(VBOX_MOUNT_SERVICE_PKGDIR)/vbox-mount-service.service \ | ||
$(TARGET_DIR)/usr/lib/systemd/system/vbox-mount-service.service | ||
|
||
ln -fs /usr/lib/systemd/system/vbox-mount-service.service \ | ||
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vbox-mount-service.service | ||
endef | ||
|
||
define VBOX_MOUNT_SERVICE_BUILD_CMDS | ||
7z x -aoa $(BR2_DL_DIR)/vbox-mount-service/VBoxGuestAdditions_${VBOX_MOUNT_SERVICE_VERSION}.iso -ir'!VBoxLinuxAdditions.run' -o"$(@D)" | ||
sh $(@D)/VBoxLinuxAdditions.run --noexec --target $(@D) | ||
tar --overwrite -C $(@D) -xjf $(@D)/VBoxGuestAdditions-amd64.tar.bz2 sbin/VBoxService | ||
endef | ||
|
||
define VBOX_MOUNT_SERVICE_INSTALL_TARGET_CMDS | ||
$(INSTALL) -Dm755 \ | ||
$(@D)/sbin/VBoxService \ | ||
$(TARGET_DIR)/sbin | ||
endef | ||
|
||
$(eval $(generic-package)) |
14 changes: 14 additions & 0 deletions
14
deploy/iso/minikube-iso/arch/x86_64/package/vbox-mount-service/vbox-mount-service.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[Unit] | ||
Description=VirtualBox Mount Service | ||
ConditionVirtualization=oracle | ||
|
||
[Service] | ||
ExecStartPre=-/usr/sbin/modprobe vboxguest | ||
ExecStartPre=-/usr/sbin/modprobe vboxsf | ||
|
||
# Normally, VirtualBox only syncs every 20 minutes. This syncs on start, and | ||
# forces an immediate sync if VM time is over 5 seconds off. | ||
ExecStart=/usr/sbin/VBoxService -f --disable-automount --timesync-set-start --timesync-set-threshold 5000 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters