Esempio n. 1
0
        public VMwareHost(VMwareHostSettings launchSettings)
        {
            if (!(RuntimeHelper.IsWindows || RuntimeHelper.IsLinux))
            {
                throw new PlatformNotSupportedException();
            }

            _launchSettings = launchSettings;

            _vmwareExe = _launchSettings.VMwareExecutable;

            if (!File.Exists(_vmwareExe) && RuntimeHelper.IsWindows)
            {
                _vmwareExe = GetPathname("VMware Workstation", "vmware.exe")
                             ?? GetPathname("VMware Player", "vmplayer.exe");
            }

            if (!File.Exists(_vmwareExe))
            {
                throw new InvalidOperationException("VMware exe not found!");
            }
        }
Esempio n. 2
0
        public Task <IHost> CreateHostAsync(IReadOnlyDictionary <string, string> settings, DebugMode debugMode = null)
        {
            var hostSettings = new VMwareHostSettings(settings);

            return(Task.FromResult <IHost>(new VMwareHost(hostSettings)));
        }