diff --git a/pkg/crc/machine/driver_darwin.go b/pkg/crc/machine/driver_darwin.go index 981d59440f..8b6bed5ee6 100644 --- a/pkg/crc/machine/driver_darwin.go +++ b/pkg/crc/machine/driver_darwin.go @@ -8,7 +8,6 @@ import ( "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() { @@ -19,15 +18,8 @@ func init() { DriverPath: constants.CrcBinDir, } - VirtualBoxMacOSDriver := MachineDriver{ - Name: "VirtualBox", - Platform: crcos.DARWIN, - Driver: "virtualbox", - } - SupportedDrivers = []MachineDriver{ HyperkitDriver, - VirtualBoxMacOSDriver, } DefaultDriver = HyperkitDriver @@ -39,9 +31,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) diff --git a/pkg/crc/machine/driver_windows.go b/pkg/crc/machine/driver_windows.go index 029dcc5f9c..bd88354bca 100644 --- a/pkg/crc/machine/driver_windows.go +++ b/pkg/crc/machine/driver_windows.go @@ -7,7 +7,6 @@ import ( "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() { @@ -17,15 +16,8 @@ func init() { Driver: "hyperv", } - VirtualBoxWindowsDriver := MachineDriver{ - Name: "VirtualBox", - Platform: crcos.WINDOWS, - Driver: "virtualbox", - } - SupportedDrivers = []MachineDriver{ HyperVDriver, - VirtualBoxWindowsDriver, } DefaultDriver = HyperVDriver @@ -37,9 +29,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) diff --git a/pkg/crc/machine/virtualbox/driver.go b/pkg/crc/machine/virtualbox/driver.go deleted file mode 100644 index 64a561f765..0000000000 --- a/pkg/crc/machine/virtualbox/driver.go +++ /dev/null @@ -1,29 +0,0 @@ -package virtualbox - -import ( - "path/filepath" - - "github.com/code-ready/crc/pkg/crc/constants" - "github.com/code-ready/machine/drivers/virtualbox" - - "github.com/code-ready/crc/pkg/crc/machine/config" -) - -func CreateHost(machineConfig config.MachineConfig) *virtualbox.Driver { - virtualboxDriver := virtualbox.NewDriver(machineConfig.Name, constants.MachineBaseDir) - - virtualboxDriver.CPU = machineConfig.CPUs - virtualboxDriver.BundleName = machineConfig.BundleName - virtualboxDriver.Memory = machineConfig.Memory - - // Network - virtualboxDriver.HostOnlyCIDR = "192.168.130.1/24" - - // DiskPath should come from the bundle's metadata (unflattened) - // This force to add entry of DiskPath under crc machine config.json - virtualboxDriver.DiskPath = filepath.Join(constants.MachineBaseDir, "machines", machineConfig.Name, constants.DefaultDiskImage) - virtualboxDriver.DiskPathUrl = machineConfig.DiskPathURL - virtualboxDriver.SSHKeyPath = machineConfig.SSHKeyPath - - return virtualboxDriver -} diff --git a/pkg/crc/services/dns/dns_windows.go b/pkg/crc/services/dns/dns_windows.go index cbed338072..672ad124a0 100644 --- a/pkg/crc/services/dns/dns_windows.go +++ b/pkg/crc/services/dns/dns_windows.go @@ -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)