Skip to content

Commit

Permalink
reverting unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
balopat committed Jan 29, 2019
1 parent 5af2f1e commit 17c0244
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pkg/drivers/hyperkit/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ func (d *Driver) Start() error {
if err != nil {
return errors.Wrap(err, "new-ing Hyperkit")
}

// TODO: handle the rest of our settings.
h.Kernel = d.ResolveStorePath("bzimage")
h.Initrd = d.ResolveStorePath("initrd")
h.VMNet = true
Expand All @@ -189,20 +191,13 @@ func (d *Driver) Start() error {
h.CPUs = d.CPU
h.Memory = d.Memory
h.UUID = d.UUID

if vsockPorts, err := d.extractVSockPorts(); err != nil {
return err
} else if len(vsockPorts) >= 1 {
h.VSock = true
h.VSockPorts = vsockPorts
}
h.Disks = []hyperkit.DiskConfig{
{
Path: pkgdrivers.GetDiskPath(d.BaseDriver),
Size: d.DiskSize,
Driver: "virtio-blk",
},
}
//}

log.Infof("Using UUID %s", h.UUID)
mac, err := GetMACAddressFromUUID(h.UUID)
Expand All @@ -213,7 +208,13 @@ func (d *Driver) Start() error {
// Need to strip 0's
mac = trimMacAddress(mac)
log.Infof("Generated MAC %s", mac)

h.Disks = []hyperkit.DiskConfig{
{
Path: pkgdrivers.GetDiskPath(d.BaseDriver),
Size: d.DiskSize,
Driver: "virtio-blk",
},
}
log.Infof("Starting with cmdline: %s", d.Cmdline)
if err := h.Start(d.Cmdline); err != nil {
return errors.Wrapf(err, "starting with cmd line: %s", d.Cmdline)
Expand Down Expand Up @@ -407,6 +408,7 @@ func (d *Driver) sendSignal(s os.Signal) error {

func (d *Driver) getPid() int {
pidPath := d.ResolveStorePath(machineFileName)

f, err := os.Open(pidPath)
if err != nil {
log.Warnf("Error reading pid file: %v", err)
Expand Down

0 comments on commit 17c0244

Please sign in to comment.