# New-OSDCloudVM

You can customize the defaults of the Virtual Machine by using the parameters of this function.  When you change any of the parameters, it will save the configuration in the OSDCloud Workspace.  Every subsequent OSDCloud VM that you create in the same OSDCloud Workspace will use these settings.  In this example I have set my OSDCloud VM Settings (Template) with the following configuration

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FbD9Xkvd6VF73yxCUS6HG%2Fimage.png?alt=media&#x26;token=f1e53949-4837-41b4-9240-96d5a78f77c4" alt=""><figcaption></figcaption></figure>

## First Run

When I run **`New-OSDCloudVM`**, it will inherit my OSDCloud VM Settings that were created in my OSDCloud Template by **`Set-OSDCloudVMSettings`**

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2F4sGADfFEr7anmmnHKxXZ%2Fimage.png?alt=media&#x26;token=05dfe60e-18fc-46b4-8c23-ce7f1be3cc01" alt=""><figcaption></figcaption></figure>

## SwitchName

This should absolutely be one of the first things you set in your Virtual Machine.  Ideally it should be inherited from Set-OSDCloudVMSettings

And yes, you will be able to Tab Complete through your available Virtual Switches

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FXAsWiKAEH2HBIg7YhqyJ%2Fimage.png?alt=media&#x26;token=4550dac9-43ad-46b9-be67-a181ec755ebd" alt=""><figcaption></figcaption></figure>

If you need your VM set to 'Not connected', just use a **`$null`** value

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FrIJcyIM758eupCS1sjaS%2Fimage.png?alt=media&#x26;token=6331b94e-975a-4f4b-976e-3ccefd67548b" alt=""><figcaption></figcaption></figure>

## StartVM

By default, OSDCloud VM will startup automatically.  I can prevent this from happening by using this parameter and setting the value to **`$false`**

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FEdi4DemyfqGPATUM5Ta9%2Fimage.png?alt=media&#x26;token=4d331c60-82c9-4f9e-98e0-08d5ebdc3a7b" alt=""><figcaption></figcaption></figure>

## CheckpointVM

This value determines if a New VM Checkpoint will be created or not, which is incredibly helpful if you need to reset the VM to a clean state.  You can change this at the command line as well

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2F2uZyWLo0pi8ifzFTYsdq%2Fimage.png?alt=media&#x26;token=077e8808-f2e9-4ef1-ad1c-e663f5bdf392" alt=""><figcaption></figcaption></figure>

## NamePrefix

This Prefix is given to the Virtual Machine name created with **`New-OSDCloudVM`**.  By default, this is **OSDCloud**, but you can also configure this at the command line

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FIhaNjnH4LWvKarDbegmL%2Fimage.png?alt=media&#x26;token=60c530bb-787f-48e8-85fb-6edaa4004eaf" alt=""><figcaption></figcaption></figure>

## Generation

By default, the VM will be created as Generation 2, which is UEFI.  But if you want to live in a world of pain, you can create a Generation 1 Virtual Machine.

{% hint style="danger" %}
**Seriously don't do this.  OSDCloud will partition your disk as GPT, which won't boot your Generation 1 VM.  This feature was added for testing only.  I will not address any questions about this parameter, so you're on your own here.**
{% endhint %}

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FXLWKGSzPL1VWktzQbQe4%2Fimage.png?alt=media&#x26;token=d1d707a6-cfd9-4df2-804c-156166da095d" alt=""><figcaption></figcaption></figure>

## MemoryStartupGB

The minimum requirements for Windows 11 are 4GB, but I've seen some things not work right, so I suggest bumping this up a little

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FHNlRGDOhaX5NB1I01T8r%2Fimage.png?alt=media&#x26;token=8e65a4c2-0f1d-48b3-aac1-e93da1264552" alt=""><figcaption></figcaption></figure>

## ProcessorCount

I recommend setting this to at least 2, but that's your call.

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2Fu8QKSfdJn0aaLgJfAlIY%2Fimage.png?alt=media&#x26;token=1db0ad7b-5734-4352-baba-5b0d535db38e" alt=""><figcaption></figcaption></figure>

If you are curious as to how many processors you can use at the same time across all Virtual Machines ...

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FFnfeqs16Yop6xPTArkAw%2Fimage.png?alt=media&#x26;token=f967ce4b-f1c1-4ff2-a726-b55c528d103d" alt=""><figcaption></figcaption></figure>

Can you create a Virtual Machine with a Processor Count greater than the number of Processors?  Yes you can, but you'll have problems getting it to start

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FHyDzoSlPoUStQGQ740Vr%2Fimage.png?alt=media&#x26;token=116a1035-b898-4655-8fb7-4cb3b1a24e87" alt=""><figcaption></figcaption></figure>

## VHDSizeGB

Finally feel free to give your Virtual Machine a few extra GB's of space.  Enjoy!

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FEOq4pMAAdOayZ5OLNTso%2Fimage.png?alt=media&#x26;token=694291c8-eac7-48be-ba15-1fe7ed25af12" alt=""><figcaption></figcaption></figure>

## Final Words

As a reminder, you can reset things back to default if you need to

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FikMTNGRJhnb7ZBjAs7zf%2Fimage.png?alt=media&#x26;token=823dd91d-d432-4f95-99b5-6f9a08220c2e" alt=""><figcaption></figcaption></figure>

A TimeStamp is used in the Virtual Machine Name so you should always be able to quickly identify the last one you created.  Finally, if you have a failed deployment, you can Apply the initial Checkpoint to reset the Virtual Machine to a newly created state

<figure><img src="https://344220114-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MVSV22dcsjKDdOxDA6n%2Fuploads%2FLinXUIY5KmeA4xANVbzy%2Fimage.png?alt=media&#x26;token=f56e4e93-8e2c-4c3b-a05a-2973f4d967fa" alt=""><figcaption></figcaption></figure>
