Changed ram_size_mb to ram_size

This commit is contained in:
Taliesin Sisson 2016-11-06 15:51:48 +00:00
parent fb192ce6d6
commit 44f73fa75f
2 changed files with 5 additions and 5 deletions

View File

@ -466,9 +466,9 @@ func (b *Builder) checkDiskSize() error {
log.Println(fmt.Sprintf("%s: %v", "DiskSize", b.config.DiskSize))
if b.config.DiskSize < MinDiskSize {
return fmt.Errorf("disk_size_gb: Virtual machine requires disk space >= %v GB, but defined: %v", MinDiskSize, b.config.DiskSize/1024)
return fmt.Errorf("disk_size: Virtual machine requires disk space >= %v GB, but defined: %v", MinDiskSize, b.config.DiskSize/1024)
} else if b.config.DiskSize > MaxDiskSize {
return fmt.Errorf("disk_size_gb: Virtual machine requires disk space <= %v GB, but defined: %v", MaxDiskSize, b.config.DiskSize/1024)
return fmt.Errorf("disk_size: Virtual machine requires disk space <= %v GB, but defined: %v", MaxDiskSize, b.config.DiskSize/1024)
}
return nil
@ -482,9 +482,9 @@ func (b *Builder) checkRamSize() error {
log.Println(fmt.Sprintf("%s: %v", "RamSize", b.config.RamSize))
if b.config.RamSize < MinRamSize {
return fmt.Errorf("ram_size_mb: Virtual machine requires memory size >= %v MB, but defined: %v", MinRamSize, b.config.RamSize)
return fmt.Errorf("ram_size: Virtual machine requires memory size >= %v MB, but defined: %v", MinRamSize, b.config.RamSize)
} else if b.config.RamSize > MaxRamSize {
return fmt.Errorf("ram_size_mb: Virtual machine requires memory size <= %v MB, but defined: %v", MaxRamSize, b.config.RamSize)
return fmt.Errorf("ram_size: Virtual machine requires memory size <= %v MB, but defined: %v", MaxRamSize, b.config.RamSize)
}
return nil

View File

@ -14,7 +14,7 @@ func testConfig() map[string]interface{} {
"iso_url": "http://www.packer.io",
"shutdown_command": "yes",
"ssh_username": "foo",
"ram_size_mb": 64,
"ram_size": 64,
"disk_size": 256,
"guest_additions_mode": "none",
packer.BuildNameConfigKey: "foo",