drivers/virtualbox/network.go
func createHostonlyAdapter(vbox VBoxManager) (*hostOnlyNetwork, error) {
	if runtime.GOOS == "windows" {
		log.Warn("Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar.")
	}

	out, err := vbox.vbmOut("hostonlyif", "create")
	if err != nil {
		return nil, err
	}

	res := reHostOnlyAdapterCreated.FindStringSubmatch(string(out))
	if res == nil {
		return nil, errors.New("Failed to create host-only adapter")
	}

	return &hostOnlyNetwork{Name: res[1]}, nil
}
func createHostonlyAdapter(vbox VBoxManager) (*hostOnlyNetwork, error) {
	if runtime.GOOS == "windows" {
		log.Warn("Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar.")
	}

	out, err := vbox.vbmOut("hostonlyif", "create")
	if err != nil {
		return nil, err
	}

	res := reHostOnlyAdapterCreated.FindStringSubmatch(string(out))
	if res == nil {
		return nil, errors.New("Failed to create host-only adapter")
	}

	return &hostOnlyNetwork{Name: res[1]}, nil
}
func createHostonlyAdapter ( vbox VBoxManager ) ( * hostOnlyNetwork , error ) { if runtime . GOOS == " " { log . Warn ( " " ) } out , err := vbox . vbmOut ( " " , " " ) if err != nil { return nil , err } res := reHostOnlyAdapterCreated . FindStringSubmatch ( string ( out ) ) if res == nil { return nil , errors . New ( " " ) } return & hostOnlyNetwork { Name : res [ 1 ] } , nil }
// createHostonlyAdapter creates a new host-only network.
createHostonlyAdapter creates a new host - only network .