# Milestone 12: HyperV Automation

## Make ubuntu server base vm:

1. Download ubuntu iso
2. Make VM
3. curl <https://github.com/gmcyber/480share/blob/master/hyperv-ubuntu-sealer.sh>
4. Then run that script
5. Turn off vm
6. Take base snapshot

## Deliverable 1. Hunt down the VHD file associated with your Ubuntu Base Image and give that file read only permissions. Provide a screenshot similar to the one below.

## Deliverable 2. Provide a screenshot similar to the one below that shows sonofubuntu running as well as the very tiny difference disk attributes similar to the screenshot below.

<figure><img src="https://1798827758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlwjwyZXx0WTx2lLKnGIY%2Fuploads%2FGPWTtmynCO4Lac8fomKm%2Fimage.png?alt=media&#x26;token=b0019266-1a3e-4def-bf27-dea746778397" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1798827758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlwjwyZXx0WTx2lLKnGIY%2Fuploads%2FYDP7bcr8LLldxMoqAL1v%2Fimage.png?alt=media&#x26;token=0d4df186-9b8b-483a-b691-f96250754e40" alt=""><figcaption></figcaption></figure>

## **Deliverable 3.  stop sonofubuntu**

```powershell
Stop-VM -Name "sonofubuntu"
```

## **Deliverable 4.  take a checkpoint of sonofubuntu called snapshot1**

```powershell
Checkpoint-VM -Name "sonofubuntu" -SnapshotName "snapshot1"
```

## **Deliverable 5.  start sonofubuntu**

```powershell
Start-VM -Name "sonofubuntu"
```

## **Deliverable 6.  switch sonofubuntu to another network**

```powershell
Connect-VMNetworkAdapter -VMName "sonofubuntu" -SwitchName "YourNewVirtualSwitchName"
```

sonofubuntu running:

<figure><img src="https://1798827758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlwjwyZXx0WTx2lLKnGIY%2Fuploads%2FGl5qfKRqGcnUP1m8FWad%2Fimage.png?alt=media&#x26;token=83a01179-98fe-4ab3-b1af-6187af55b799" alt=""><figcaption></figcaption></figure>

## **Deliverable 7.  Create a new Base VM using an OS that is not Ubuntu**

Automate the creation of a Linked clone of your new OS base image using Powershell.  Provide a screenshot of your successful command(s) and a screenshot of your running OS and the virtual properties of your child disk.

<figure><img src="https://1798827758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlwjwyZXx0WTx2lLKnGIY%2Fuploads%2F0GEH54rnWdT0EM7IvnIb%2Fimage.png?alt=media&#x26;token=77145647-860f-4667-8c91-d4dfd55867c7" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1798827758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlwjwyZXx0WTx2lLKnGIY%2Fuploads%2FfnnVIn1PIFPJ30NQVUXh%2Fimage.png?alt=media&#x26;token=66f16ff4-050b-40cf-83c2-d4918b8eeffb" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1798827758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlwjwyZXx0WTx2lLKnGIY%2Fuploads%2FsjuWAiZjMWsPweSkZcTJ%2Fimage.png?alt=media&#x26;token=99d890ce-ec30-4909-b344-14b9852c3093" alt=""><figcaption></figcaption></figure>
