Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

oem-vagrant-vmware: add oem-vagrant-vmware #2709

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions coreos-base/oem-vagrant-vmware/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The OEM version should match the current version of open-vm-tools.
29 changes: 29 additions & 0 deletions coreos-base/oem-vagrant-vmware/files/box/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- mode: ruby -*-
# # vi: set ft=ruby :

if Vagrant::VERSION < "1.6.0"
raise "Need at least vagrant version 1.6.0, please update"
end

require_relative 'change_host_name.rb'
require_relative 'configure_networks.rb'
require_relative 'base_mac.rb'

Vagrant.configure("2") do |config|
# always use Vagrants insecure key
config.ssh.insert_key = false

# SSH in as the default 'core' user, it has the vagrant ssh key.
config.ssh.username = "core"

# Disable the base shared folder, guest additions are unavailable.
config.vm.synced_folder ".", "/vagrant", disabled: true

["vmware_fusion", "vmware_workstation"].each do |vmware|
config.vm.provider vmware do |v|
if v.respond_to?(:functional_hgfs=)
v.functional_hgfs = false
end
end
end
end
4 changes: 4 additions & 0 deletions coreos-base/oem-vagrant-vmware/files/box/base_mac.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file must be rewritten with a real value for VirtualBox
Vagrant.configure("2") do |config|
config.vm.base_mac = "080027000000"
end
18 changes: 18 additions & 0 deletions coreos-base/oem-vagrant-vmware/files/box/change_host_name.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- mode: ruby -*-
# # vi: set ft=ruby :

# NOTE: This monkey-patching is done to disable to old cloud config based
# change_host_name built into the upstream vagrant project

require Vagrant.source_root.join("plugins/guests/coreos/cap/change_host_name.rb")

module VagrantPlugins
module GuestCoreOS
module Cap
class ChangeHostName
def self.change_host_name(machine, name)
end
end
end
end
end
18 changes: 18 additions & 0 deletions coreos-base/oem-vagrant-vmware/files/box/configure_networks.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# -*- mode: ruby -*-
# # vi: set ft=ruby :

# NOTE: This monkey-patching is done to disable to old cloud config based
# configure_networks built into the upstream vagrant project

require Vagrant.source_root.join("plugins/guests/coreos/cap/configure_networks.rb")

module VagrantPlugins
module GuestCoreOS
module Cap
class ConfigureNetworks
def self.configure_networks(machine, networks)
end
end
end
end
end
3 changes: 3 additions & 0 deletions coreos-base/oem-vagrant-vmware/files/grub.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CoreOS GRUB settings

set oem_id="vmware"
13 changes: 13 additions & 0 deletions coreos-base/oem-vagrant-vmware/files/units/vmtoolsd.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=VMware Tools Agent
Documentation=https://github.com/vmware/open-vm-tools
ConditionVirtualization=vmware

[Service]
ExecStartPre=/usr/bin/ln -sfT /usr/share/oem/vmware-tools /etc/vmware-tools
ExecStart=/usr/share/oem/bin/vmtoolsd
TimeoutStopSec=5
PrivateTmp=true

[Install]
WantedBy=multi-user.target
4 changes: 4 additions & 0 deletions coreos-base/oem-vagrant-vmware/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
</pkgmetadata>
28 changes: 28 additions & 0 deletions coreos-base/oem-vagrant-vmware/oem-vagrant-vmware-10.1.10.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2017 The CoreOS Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5

DESCRIPTION="OEM suite for vagrant images (vmware)"
HOMEPAGE="https://github.com/coreos/coreos-overlay/tree/master/coreos-base"
SRC_URI=""

LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="amd64"
IUSE=""

DEPEND="
app-emulation/open-vm-tools
"
RDEPEND="${DEPEND}"

# no source directory
S="${WORKDIR}"

src_install() {
insinto "/usr/share/oem"
doins -r "${FILESDIR}/box"
doins "${FILESDIR}/grub.cfg"
doins -r "${FILESDIR}/units"
}