Add support for using raw disks with xhyve (#1360)
* Add support for using raw disks with xhyve, default it to true * Fix formatting issue * Prefix disk-driver with xhyve to make it clear it is only for xhyve * Add missing configpull/1411/merge
parent
b1a69c653f
commit
94ef3d88b9
|
|
@ -46,6 +46,7 @@ const (
|
|||
cpus = "cpus"
|
||||
humanReadableDiskSize = "disk-size"
|
||||
vmDriver = "vm-driver"
|
||||
xhyveDiskDriver = "xhyve-disk-driver"
|
||||
kubernetesVersion = "kubernetes-version"
|
||||
hostOnlyCIDR = "host-only-cidr"
|
||||
containerRuntime = "container-runtime"
|
||||
|
|
@ -99,6 +100,7 @@ func runStart(cmd *cobra.Command, args []string) {
|
|||
CPUs: viper.GetInt(cpus),
|
||||
DiskSize: diskSizeMB,
|
||||
VMDriver: viper.GetString(vmDriver),
|
||||
XhyveDiskDriver: viper.GetString(xhyveDiskDriver),
|
||||
DockerEnv: dockerEnv,
|
||||
DockerOpt: dockerOpt,
|
||||
InsecureRegistry: insecureRegistry,
|
||||
|
|
@ -217,6 +219,7 @@ 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(xhyveDiskDriver, "ahci-hd", "The disk driver to use [ahci-hd|virtio-blk] (only supported with xhyve driver)")
|
||||
startCmd.Flags().StringArrayVar(&dockerEnv, "docker-env", nil, "Environment variables to pass to the Docker daemon. (format: key=value)")
|
||||
startCmd.Flags().StringArrayVar(&dockerOpt, "docker-opt", nil, "Specify arbitrary flags to pass to the Docker daemon. (format: key=value)")
|
||||
startCmd.Flags().String(apiServerName, constants.APIServerName, "The apiserver name which is used in the generated certificate for localkube/kubernetes. This can be used if you want to make the apiserver available from outside the machine")
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ type xhyveDriver struct {
|
|||
DiskNumber int
|
||||
Virtio9p bool
|
||||
Virtio9pFolder string
|
||||
QCow2 bool
|
||||
RawDisk bool
|
||||
}
|
||||
|
||||
func createXhyveHost(config MachineConfig) *xhyveDriver {
|
||||
|
|
@ -66,5 +68,7 @@ func createXhyveHost(config MachineConfig) *xhyveDriver {
|
|||
DiskSize: int64(config.DiskSize),
|
||||
Virtio9p: true,
|
||||
Virtio9pFolder: "/Users",
|
||||
QCow2: false,
|
||||
RawDisk: config.XhyveDiskDriver == "virtio-blk",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ type MachineConfig struct {
|
|||
CPUs int
|
||||
DiskSize int
|
||||
VMDriver string
|
||||
XhyveDiskDriver string // Only used by the xhyve driver
|
||||
DockerEnv []string // Each entry is formatted as KEY=VALUE.
|
||||
InsecureRegistry []string
|
||||
RegistryMirror []string
|
||||
|
|
|
|||
Loading…
Reference in New Issue