How to Automatically Start a Virtual Machine (VM) with Windows 10 startup

Поделиться
HTML-код
  • Опубликовано: 15 окт 2024

Комментарии • 59

  • @ElastiCourse
    @ElastiCourse  2 года назад +8

    Command used in the video (Replace VMX file path with the one from the desired VM
    "C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" start "C:\Users\elastic\Documents\Virtual Machines\Docker\Docker.vmx"
    For service VMs that don't need to appear on the screen (Run in the background) just add "nogui" as follows
    "C:\Program Files (x86)\VMware\VMware Workstation\vmrun.exe" start "C:\Users\elastic\Documents\Virtual Machines\Docker\Docker.vmx" nogui
    Alternative method to placing bat file in shell:startup is to run the bat file using Windows Task Scheduler, benefit of this method you can edit task properties and allow the command to run regardless ig you log in to Windows or not - very useful for DNS servers/AD Farms to work immediately on computer startup.

  • @TheShadels
    @TheShadels Год назад +2

    Super helpful video! A few things have changed with Windows 11 and VirtualBox. For anyone running home assistant, this may be helpful:
    "C:\Program Files\Oracle\VirtualBox\virtualboxVM.exe" --startvm "C:\Users\your-userid\VirtualBox VMs\Home Assistant\Home Assistant.vbox"
    Just change "your-userid" to your userid

    • @darioeluan1981
      @darioeluan1981 3 месяца назад

      Ainda não precisei usar no Virtualbox, mas é de grande ajuda já ter colocado aqui. Thank You!

  • @hammedabudu4170
    @hammedabudu4170 2 года назад +1

    Best shortest video i have watched this year

  • @reltecsol3723
    @reltecsol3723 Год назад +1

    "C:\Program Files (x86)\VMware\VMware Workstation\vmrun" -T ws start "C:\VMs\Windows 10.vmx"
    Type the above in notepad and save it as .bat or .cmd file and paste this file in your startup
    win+r type shell:startup

  • @Shaita
    @Shaita Год назад +1

    The simples way I have achieved this is by creating a shortcut to the .vmx file and drop it in the startup directory. Obviously that extension should be setup to be run by default with VMWare.
    This will automatically open VMWare in screen and load the .vmx file in it when windows starts.

  • @henrybradshaw4305
    @henrybradshaw4305 3 года назад +2

    Excellent video and very well explained. Additionally can I ask when the VM has started is it possible to make the VM full screen? I have an application running on an old OS. This OS is no longer supported. So my intention is to mount the VM on a new window 10 PC. But when the PC boots it does so directly to the VM so the User has immediate access to the VM without needing to resize the screen.

    • @ElastiCourse
      @ElastiCourse  3 года назад +4

      Yes. You can use the same steps from the video, then from VM settings: Options > Power > Enable "Enter full screen mode after powering on".

    • @daarionaharis8645
      @daarionaharis8645 8 месяцев назад

      thank you so much ...now I need enter on Exclusive mode on fullscreen XD@@ElastiCourse

  • @spaddygmailco
    @spaddygmailco 3 года назад

    Good man great stuff hope your keeping well don't asked me why i said this but I just felt I needed to THANK YOU

  • @JophetIligan
    @JophetIligan Год назад

    will this work on Linux Host?

  • @daarionaharis8645
    @daarionaharis8645 8 месяцев назад

    how can I do it on fullscreen?

  • @onlyqualitypeoplemotivation
    @onlyqualitypeoplemotivation Год назад

    This was awesome! Thank you very much.

  • @alexandreveret5915
    @alexandreveret5915 3 года назад

    Amazing ! Using it for launch Home Assistant !

  • @karabakhazerbaijan1646
    @karabakhazerbaijan1646 2 года назад

    Thanks this tutorial helped me.

  • @karabakhazerbaijan1646
    @karabakhazerbaijan1646 2 года назад

    Is there anyway to run this script minimized to tray? With "nogiu" cmd file is appearing. I would like nothing to display for user.

    • @ElastiCourse
      @ElastiCourse  2 года назад

      I usually put the task scheduler to run at power on instead of login, so by the time I login VM already been started.

  • @mmmmmmmmmmmmmmmmmmmmmmmmmm3153
    @mmmmmmmmmmmmmmmmmmmmmmmmmm3153 3 года назад

    Friend I have 2 monitors, would it be possible to somehow make windows start on one monitor and vm on the other already with the system running?

    • @ElastiCourse
      @ElastiCourse  3 года назад +1

      Yes. You can use the same steps from the video, then from VM settings: Options > Power > Enable "Enter full screen mode after powering on".

  • @emirkostik
    @emirkostik Год назад

    Hi, Does it apply to Windows Server as well?

    • @ElastiCourse
      @ElastiCourse  Год назад

      You can schedule tasks in Windows Server as well
      Check this KB for more info learn.microsoft.com/en-us/troubleshoot/windows-server/system-management-components/schedule-server-process

  • @SalMightyOne
    @SalMightyOne 3 месяца назад

    When I try it I get this "Encrypted virtual machine password:" no idea what the password is.

  • @foxmorio
    @foxmorio 3 года назад

    thanks a lot and well detailed. one other thing, how can i have the cript working when the pc is locked by the administrator. right now the script works only if the admin is not locked. ,, thanks again..

    • @ElastiCourse
      @ElastiCourse  2 года назад

      Search Windows for "Task Scheduler", create basic task from right menu, Choose whatever name then select trigger "When the computer starts" then point the action to the batch file, this way script works before login.
      You may also update the script to include the work nogui, as follows:
      "C:\Program Files (x86)\VMware\VMware Player\vmrun.exe" start "vmx-path" nogui
      This way even after login, the VM windows will be minimized, just cosmetic change if you need it.

  • @MY_Handle_1963
    @MY_Handle_1963 Год назад

    Unfortunately, this isn't a startup/boot script, it's a logon script. If you want to do it without logging in, you have to use Task Scheduler...

  • @adriankatong3962
    @adriankatong3962 Год назад

    Thanks!

  • @mustafaraddad9183
    @mustafaraddad9183 2 года назад

    Hi, thanks for your efforts, I followed your steps but I got error,,, "unknown file suffix",, I ensued that the path is correct

    • @ElastiCourse
      @ElastiCourse  2 года назад

      can you show me the whole command to see where the syntax issue is?

  • @charleyboy74
    @charleyboy74 2 года назад +1

    Really helpful, Thanks

  • @walidmohamed1437
    @walidmohamed1437 Год назад

    yes it run thank you very much

  • @hassanali4783
    @hassanali4783 Год назад

    Awsome, thanks

  • @mehdialasvand7838
    @mehdialasvand7838 3 года назад

    Didn work for me...15.5 pro....it said "start" is not a virtual machine configuration file (.vmx).

    • @ElastiCourse
      @ElastiCourse  3 года назад

      This must be a syntax issue, the word start itself doesn't need quotations.

  • @ezclapz8766
    @ezclapz8766 3 года назад

    Great Video - thescript did not work for me - the problem was with the last line pointing to the .vmx file - eg "T:\VMware\Windows 10\Windows 10.vmx" wasnt launching the vm even though the path was correct. The way i got around this was to simply create a shortcut of the vmx file and put that into startup - (The reasoning for this is double clicking this file would start the VMware Sotware and refrence the VM anyway - so copying this shortcut into the startup folder worked for me).

    • @ElastiCourse
      @ElastiCourse  2 года назад +1

      Perfect. There is a way to modify the script to run the background:
      "C:\Program Files (x86)\VMware\VMware Player\vmrun.exe" start "vmx-path" nogui

  • @lmcdasm
    @lmcdasm 2 года назад

    sweet! thanks!

  • @ehsanmirror
    @ehsanmirror 2 года назад

    great video, how to start multi vmx files in one command line?

    • @ElastiCourse
      @ElastiCourse  2 года назад

      I just make multiple lines for multiple VMs or multiple bat files.

  • @Nipottaja
    @Nipottaja 3 года назад

    Can I make it to start in full screen?

    • @ElastiCourse
      @ElastiCourse  3 года назад

      Yes. You can use the same steps from the video, then from VM settings: Options > Power > Enable "Enter full screen mode after powering on".

  • @ansred
    @ansred 3 года назад +1

    Great video! it worked for me very well.
    "C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe" start "T:\VMware\Windows 10\Windows 10.vmx"
    Can you make a video on how to set that in a Scheduled Task and to run without a user logged in please.

    • @amintgh6414
      @amintgh6414 3 года назад

      I made the user log in automatically and now it's working fine

    • @ElastiCourse
      @ElastiCourse  3 года назад

      Good question. You can setup a scheduled task and use the following command to run, change location for the vmx file
      vmrun start "C:\VMs\D10AMP\D10AMP.vmx" nogui

    • @ansred
      @ansred 3 года назад

      @@ElastiCourse yeah, I found that online too, but it didn't work for me with vix command for some reason, so I all I do is making the machine sleep only (which technically it will be always logged in) and the command works in that way.

  • @manuelstuder766
    @manuelstuder766 2 года назад

    Thank you :)

  • @yunusozan
    @yunusozan 2 года назад

    This method only works when user logs in. How to auto start when system start

    • @ElastiCourse
      @ElastiCourse  2 года назад

      Search Windows for "Task Scheduler", create basic task from right menu, Choose whatever name then select trigger "When the computer starts" then point the action to the batch file, this way script works before login.

    • @yunusozan
      @yunusozan 2 года назад

      @@ElastiCourse sorry but not worked. i guess the method you have mentioned works for windows services. I moved virtual machine to "shared" node in vmware workstation then its worked.

  • @ouchsicle
    @ouchsicle 3 года назад

    Thankeee for that. Just wondering why such a simple and obvious function is not baked into the UI of WMWare.

    • @ElastiCourse
      @ElastiCourse  3 года назад

      It's baked feature in ESXi and free alternatives like Proxmox, I'm also wondering why it's not a feature in Windows platform, maybe they think end users don't care about auto-starting VMs?

    • @ByTheRiverHelge
      @ByTheRiverHelge 2 года назад

      It is (at least up to version 15.x). Make your VM a shared virtual machine, and you will get options for autostart as well as autosuspend.

  • @Rmly
    @Rmly 2 года назад

    thanks

  • @JoseNunes-nv3ec
    @JoseNunes-nv3ec 3 года назад

    #ElastiCourse Thank you

  • @goganikolashvili7074
    @goganikolashvili7074 Год назад

    doker doker not 2 only one name vmx

  • @piyushsachan4723
    @piyushsachan4723 Год назад

    Thanks!

  • @Meerlu
    @Meerlu 2 года назад

    Thanks

  • @llkrashll1
    @llkrashll1 3 года назад

    Thanks!!