MCPcopy Create free account
hub / github.com/linuxkit/linuxkit / powerOnVM

Function powerOnVM

src/cmd/linuxkit/run_vcenter.go:254–264  ·  view source on GitHub ↗
(ctx context.Context, vm *object.VirtualMachine)

Source from the content-addressed store, hash-verified

252}
253
254func powerOnVM(ctx context.Context, vm *object.VirtualMachine) {
255 task, err := vm.PowerOn(ctx)
256 if err != nil {
257 log.Errorln("Power On operation has failed, more detail can be found in vCenter tasks")
258 }
259
260 _, err = task.WaitForResult(ctx, nil)
261 if err != nil {
262 log.Errorln("Power On Task has failed, more detail can be found in vCenter tasks")
263 }
264}
265
266func addNIC(ctx context.Context, vm *object.VirtualMachine, net object.NetworkReference) {
267 backing, err := net.EthernetCardBackingInfo(ctx)

Callers 1

runVCenterCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected