Skip to content

Commit

Permalink
support VMs with more than 3GB of RAM (up to 8GB now)
Browse files Browse the repository at this point in the history
- the 8GB upper limit is artificial and seems like a reasonable
  value given current Apple HW specs.

Signed-off-by: António Meireles <[email protected]>
  • Loading branch information
AntonioMeireles committed Dec 29, 2015
1 parent 0208239 commit fa581e2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion documentation/man/corectl-run.1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Starts a new CoreOS instance

.PP
\fB\-\-memory\fP=1024
VM's RAM, in MB, per instance (1024 < memory < 3072)
VM's RAM, in MB, per instance (1024 < memory < 8192)

.PP
\fB\-n\fP, \fB\-\-name\fP=""
Expand Down
2 changes: 1 addition & 1 deletion documentation/markdown/corectl_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ corectl run
--cpus int VM's vCPUS (default 1)
-d, --detached starts the VM in detached (background) mode
-l, --local latest consumes whatever image is latest locally instead of looking online unless there's nothing available.
--memory int VM's RAM, in MB, per instance (1024 < memory < 3072) (default 1024)
--memory int VM's RAM, in MB, per instance (1024 < memory < 8192) (default 1024)
-n, --name string names the VM. (if absent defaults to VM's UUID)
--root string append a (persistent) root volume to VM
--sshkey string VM's default ssh key
Expand Down
10 changes: 5 additions & 5 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@ func vmBootstrap(args *viper.Viper) (vm *VMInfo, err error) {
log.Printf("'%v' not a reasonable memory value. %s\n", vm.Memory,
"Using '1024', the default")
vm.Memory = 1024
} else if vm.Memory > 3072 {
} else if vm.Memory > 8192 {
log.Printf("'%v' not a reasonable memory value. %s %s\n", vm.Memory,
"as presently xhyve only supports VMs with up to 3GB of RAM.",
"setting it to '3072'")
vm.Memory = 3072
"as presently we only support VMs with up to 8GB of RAM.",
"setting it to '8192'")
vm.Memory = 8192
}

if vm.Channel, vm.Version, err =
Expand Down Expand Up @@ -263,7 +263,7 @@ func runFlagsDefaults(setFlag *pflag.FlagSet) {
setFlag.String("version", "latest", "CoreOS version")
setFlag.String("uuid", "random", "VM's UUID")
setFlag.Int("memory", 1024,
"VM's RAM, in MB, per instance (1024 < memory < 3072)")
"VM's RAM, in MB, per instance (1024 < memory < 8192)")
setFlag.Int("cpus", 1, "VM's vCPUS")
setFlag.String("cloud_config", "",
"cloud-config file location (either a remote URL or a local path)")
Expand Down

0 comments on commit fa581e2

Please sign in to comment.