Skip to content

Commit

Permalink
Issue crc-org#838 Remove virtualbox driver support
Browse files Browse the repository at this point in the history
  • Loading branch information
gbraad committed Nov 29, 2019
1 parent d6a16d6 commit 185a017
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 67 deletions.
4 changes: 0 additions & 4 deletions pkg/crc/machine/client/client_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"os"

"github.com/code-ready/crc/pkg/crc/errors"
"github.com/code-ready/machine/drivers/virtualbox"
"github.com/code-ready/machine/libmachine/drivers/plugin"
"github.com/code-ready/machine/libmachine/drivers/plugin/localbinary"
)

Expand All @@ -15,8 +13,6 @@ func StartDriver() {
if os.Getenv(localbinary.PluginEnvKey) == localbinary.PluginEnvVal {
driverName := os.Getenv(localbinary.PluginEnvDriverName)
switch driverName {
case "virtualbox":
plugin.RegisterDriver(virtualbox.NewDriver("", ""))
default:
errors.ExitWithMessage(1, fmt.Sprintf("Unregistered driver: %s\n", driverName))
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/crc/machine/client/client_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (

"github.com/code-ready/crc/pkg/crc/errors"
"github.com/code-ready/machine/drivers/hyperv"
"github.com/code-ready/machine/drivers/virtualbox"
"github.com/code-ready/machine/libmachine/drivers/plugin"
"github.com/code-ready/machine/libmachine/drivers/plugin/localbinary"
)

Expand All @@ -16,8 +14,6 @@ func StartDriver() {
if os.Getenv(localbinary.PluginEnvKey) == localbinary.PluginEnvVal {
driverName := os.Getenv(localbinary.PluginEnvDriverName)
switch driverName {
case "virtualbox":
plugin.RegisterDriver(virtualbox.NewDriver("", ""))
case "hyperv":
plugin.RegisterDriver(hyperv.NewDriver("", ""))
default:
Expand Down
12 changes: 0 additions & 12 deletions pkg/crc/machine/driver_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ package machine
import (
"github.com/code-ready/crc/pkg/crc/constants"
"github.com/code-ready/crc/pkg/crc/errors"
"github.com/code-ready/crc/pkg/crc/logging"
crcos "github.com/code-ready/crc/pkg/os"

"github.com/code-ready/crc/pkg/crc/machine/config"
"github.com/code-ready/crc/pkg/crc/machine/hyperkit"
"github.com/code-ready/crc/pkg/crc/machine/virtualbox"
)

func init() {
Expand All @@ -19,15 +17,8 @@ func init() {
DriverPath: constants.CrcBinDir,
}

VirtualBoxMacOSDriver := MachineDriver{
Name: "VirtualBox",
Platform: crcos.DARWIN,
Driver: "virtualbox",
}

SupportedDrivers = []MachineDriver{
HyperkitDriver,
VirtualBoxMacOSDriver,
}

DefaultDriver = HyperkitDriver
Expand All @@ -39,9 +30,6 @@ func getDriverOptions(machineConfig config.MachineConfig) interface{} {
// Supported drivers
switch machineConfig.VMDriver {

case "virtualbox":
logging.Warn("Virtualbox support is deprecated and will be removed in the next release.")
driver = virtualbox.CreateHost(machineConfig)
case "hyperkit":
driver = hyperkit.CreateHost(machineConfig)

Expand Down
12 changes: 0 additions & 12 deletions pkg/crc/machine/driver_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package machine

import (
"github.com/code-ready/crc/pkg/crc/errors"
"github.com/code-ready/crc/pkg/crc/logging"
crcos "github.com/code-ready/crc/pkg/os"

"github.com/code-ready/crc/pkg/crc/machine/config"
"github.com/code-ready/crc/pkg/crc/machine/hyperv"
"github.com/code-ready/crc/pkg/crc/machine/virtualbox"
)

func init() {
Expand All @@ -17,15 +15,8 @@ func init() {
Driver: "hyperv",
}

VirtualBoxWindowsDriver := MachineDriver{
Name: "VirtualBox",
Platform: crcos.WINDOWS,
Driver: "virtualbox",
}

SupportedDrivers = []MachineDriver{
HyperVDriver,
VirtualBoxWindowsDriver,
}

DefaultDriver = HyperVDriver
Expand All @@ -37,9 +28,6 @@ func getDriverOptions(machineConfig config.MachineConfig) interface{} {
// Supported drivers
switch machineConfig.VMDriver {

case "virtualbox":
logging.Warn("Virtualbox support is deprecated and will be removed in the next release.")
driver = virtualbox.CreateHost(machineConfig)
case "hyperv":
driver = hyperv.CreateHost(machineConfig)

Expand Down
29 changes: 0 additions & 29 deletions pkg/crc/machine/virtualbox/driver.go

This file was deleted.

6 changes: 0 additions & 6 deletions pkg/crc/services/dns/dns_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ const (
)

func runPostStartForOS(serviceConfig services.ServicePostStartConfig, result *services.ServicePostStartResult) (services.ServicePostStartResult, error) {
// bailout for Virtualbox
if serviceConfig.DriverName == "virtualbox" {
result.Success = true
return *result, nil
}

_, switchName := winnet.SelectSwitchByNameOrDefault(AlternativeNetwork)
networkInterface := fmt.Sprintf("vEthernet (%s)", switchName)

Expand Down

0 comments on commit 185a017

Please sign in to comment.