Skip to content

Commit

Permalink
Revert "kvm: Passthrough host CPU in order to allow nesting"
Browse files Browse the repository at this point in the history
This reverts commit 7a4babe.

For now we just hard-code passthrough.

Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
  • Loading branch information
fabiand authored and dlorenc committed Feb 22, 2018
1 parent 7f9756e commit b08b8ab
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 22 deletions.
3 changes: 0 additions & 3 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const (
networkPlugin = "network-plugin"
hypervVirtualSwitch = "hyperv-virtual-switch"
kvmNetwork = "kvm-network"
kvmCPUModel = "kvm-cpu-model"
keepContext = "keep-context"
createMount = "mount"
featureGates = "feature-gates"
Expand Down Expand Up @@ -146,7 +145,6 @@ func runStart(cmd *cobra.Command, args []string) {
HostOnlyCIDR: viper.GetString(hostOnlyCIDR),
HypervVirtualSwitch: viper.GetString(hypervVirtualSwitch),
KvmNetwork: viper.GetString(kvmNetwork),
KvmCPUModel: viper.GetString(kvmCPUModel),
Downloader: pkgutil.DefaultDownloader{},
DisableDriverMounts: viper.GetBool(disableDriverMounts),
UUID: viper.GetString(uuid),
Expand Down Expand Up @@ -381,7 +379,6 @@ func init() {
startCmd.Flags().String(hostOnlyCIDR, "192.168.99.1/24", "The CIDR to be used for the minikube VM (only supported with Virtualbox driver)")
startCmd.Flags().String(hypervVirtualSwitch, "", "The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver)")
startCmd.Flags().String(kvmNetwork, "default", "The KVM network name. (only supported with KVM driver)")
startCmd.Flags().String(kvmCPUModel, "custom", "The KVM CPU model name. (only supported with KVM driver)")
startCmd.Flags().String(xhyveDiskDriver, "ahci-hd", "The disk driver to use [ahci-hd|virtio-blk] (only supported with xhyve driver)")
startCmd.Flags().StringSlice(NFSShare, []string{}, "Local folders to share with Guest via NFS mounts (Only supported on with hyperkit now)")
startCmd.Flags().String(NFSSharesRoot, "/nfsshares", "Where to root the NFS Shares (defaults to /nfsshares, only supported with hyperkit now)")
Expand Down
10 changes: 0 additions & 10 deletions docs/drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ To use the driver you would do:
minikube start --vm-driver kvm2
```

##### Nesting

The KVM2 driver allows to run [nested VMs](https://en.wikipedia.org/wiki/Virtualization#Nested_virtualization)
if the right CPU model is specyfied when launching minikube:

```shell
minikube --start --vm-driver kvm2 --kvm-cpu-model host-model
```


#### KVM driver

Minikube is currently tested against [`docker-machine-driver-kvm` v0.10.0](https://github.com/dhiltgen/docker-machine-kvm/releases).
Expand Down
1 change: 0 additions & 1 deletion pkg/drivers/kvm/domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const domainTmpl = `
<apic/>
<pae/>
</features>
<cpu mode='{{.CPUModel}}'/>
<os>
<type>hvm</type>
<boot dev='cdrom'/>
Expand Down
4 changes: 0 additions & 4 deletions pkg/drivers/kvm/kvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ type Driver struct {
// How many cpus to allocate to the VM
CPU int

// What CPU model to expose
CPUModel string

// The name of the default network
Network string

Expand Down Expand Up @@ -86,7 +83,6 @@ func NewDriver(hostName, storePath string) *Driver {
CommonDriver: &pkgdrivers.CommonDriver{},
Boot2DockerURL: constants.DefaultIsoUrl,
CPU: constants.DefaultCPUS,
CPUModel: constants.DefaultCPUModel,
DiskSize: util.CalculateDiskSizeInMB(constants.DefaultDiskSize),
Memory: constants.DefaultMemory,
PrivateNetwork: defaultPrivateNetworkName,
Expand Down
2 changes: 0 additions & 2 deletions pkg/minikube/cluster/cluster_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type kvmDriver struct {
Memory int
DiskSize int
CPU int
CPUModel string
Network string
PrivateNetwork string
ISO string
Expand Down Expand Up @@ -72,7 +71,6 @@ func createKVM2Host(config MachineConfig) *kvmDriver {
},
Memory: config.Memory,
CPU: config.CPUs,
CPUModel: config.KvmCPUModel,
Network: config.KvmNetwork,
PrivateNetwork: "minikube-net",
Boot2DockerURL: config.Downloader.GetISOFileURI(config.MinikubeISO),
Expand Down
1 change: 0 additions & 1 deletion pkg/minikube/cluster/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ type MachineConfig struct {
HostOnlyCIDR string // Only used by the virtualbox driver
HypervVirtualSwitch string
KvmNetwork string // Only used by the KVM driver
KvmCPUModel string // Only used by the KVM driver
Downloader util.ISODownloader `json:"-"`
DockerOpt []string // Each entry is formatted as KEY=VALUE.
DisableDriverMounts bool // Only used by virtualbox and xhyve
Expand Down
1 change: 0 additions & 1 deletion pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const (
ShaSuffix = ".sha256"
DefaultMemory = 2048
DefaultCPUS = 2
DefaultCPUModel = "custom"
DefaultDiskSize = "20g"
MinimumDiskSizeMB = 2000
DefaultVMDriver = "virtualbox"
Expand Down

0 comments on commit b08b8ab

Please sign in to comment.