summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/machine/qemu')
-rw-r--r--pkg/machine/qemu/config.go2
-rw-r--r--pkg/machine/qemu/machine.go8
2 files changed, 8 insertions, 2 deletions
diff --git a/pkg/machine/qemu/config.go b/pkg/machine/qemu/config.go
index 3d0fa4094..9f5f45b58 100644
--- a/pkg/machine/qemu/config.go
+++ b/pkg/machine/qemu/config.go
@@ -17,6 +17,8 @@ type MachineVM struct {
ImagePath string
// Memory in megabytes assigned to the vm
Memory uint64
+ // Disk size in gigabytes assigned to the vm
+ DiskSize uint64
// Name of the vm
Name string
// SSH port for user networking
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index d5f538594..09078fbfb 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -64,6 +64,7 @@ func NewMachine(opts machine.InitOptions) (machine.VM, error) {
vm.CPUs = opts.CPUS
vm.Memory = opts.Memory
+ vm.DiskSize = opts.DiskSize
// Look up the executable
execPath, err := exec.LookPath(QemuCommand)
@@ -140,7 +141,7 @@ func (v *MachineVM) Init(opts machine.InitOptions) error {
v.IdentityPath = filepath.Join(sshDir, v.Name)
switch opts.ImagePath {
- case "testing", "stable", "":
+ case "testing", "next", "stable", "":
// Get image as usual
dd, err := machine.NewFcosDownloader(vmtype, v.Name, opts.ImagePath)
if err != nil {
@@ -366,7 +367,7 @@ func (v *MachineVM) Stop(name string, _ machine.StopOptions) error {
return err
}
if _, err := os.Stat(pidFile); os.IsNotExist(err) {
- logrus.Infof("pid file %s does not exist", pidFile)
+ logrus.Info(err)
return nil
}
pidString, err := ioutil.ReadFile(pidFile)
@@ -574,6 +575,9 @@ func GetVMInfos() ([]*machine.ListResponse, error) {
listEntry.Name = vm.Name
listEntry.VMType = "qemu"
+ listEntry.CPUs = vm.CPUs
+ listEntry.Memory = vm.Memory
+ listEntry.DiskSize = vm.DiskSize
fi, err := os.Stat(fullPath)
if err != nil {
return err