You can refer to the below steps to create a virtual machine using a content library and provide network connectivity for the virtual machine:
Create a Subscribed Content Library
Create a Virtual Machine
Verify Network Connectivity for the Virtual Machine
Allow Outbound Network Access for the Virtual Machine
Create a Subscribed Content Library:
Log in to the AWS Management console
On the AWS sign-in page, select IAM user
In the Account ID text box, enter your AWS account ID and click Next
In the IAM user name text box, enter your user name
In the Password text box key in your password
Click Sign in
You are logged in to the AWS Management console
Verify that you are logged in to the correct Amazon region
In the region drop-down menu, select US West (Oregon) us-west-2
Obtain the content library subscription URL
In the AWS Management Console, click the Services drop-down menu in the top-left of the page
In the right pane, select S3 under Storage
The Amazon S3 console opens and one or more buckets are listed
Click the bucket with the name beginning with vmcosaws-acc-xx-xx-xxxx-x
The name of the bucket varies depending on the region
Click ContentLib/ in the list of objects
Click lib.json
In the lib.json Object overview pane, locate the Object URL
Click the copy icon next to the URL to copy the URL to the clipboard
This URL is the content library subscription URL for a content library that is pre-created in an Amazon S3 bucket. The content library contains a virtual machine template
Create a subscribed content library in the VMware Cloud SDDC vCenter Server
Navigate to the browser tab for the SDDC vSphere Client instance
In the SDDC vSphere Client, select Menu > Content Libraries
Click Create
The New Content Library wizard opens
On the Name and Location page, enter VMC-CL-01 in the Name text field and click NEXT
On the Configure content library page, select Subscribed Content Library
For the Subscription URL, paste the lib.json object URL that you copied from the Amazon S3 console
Leave the other settings as the defaults and click NEXT
On the Add Storage page, select WorkloadDatastore and click NEXT
Click FINISH to complete the creation of the new content library
The content library is created and a task called Sync Library is initiated to download the virtual machine template. The Sync Library task takes approximately 5 minutes to complete
Create a Virtual Machine:
You create a virtual machine (VM) from a content library
In the SDDC vSphere Client browser tab, select Menu > Content Libraries
On the Content Libraries page, click VMC-CL-01
Select the Templates tab and click OVF & OVA Templates
The VM template appears in the list of templates
Deploy a new virtual machine from the template
Right-click the VM template and click New VM from This Template
The New Virtual Machine from Content Library wizard opens
On the Select a name and folder page, enter Photo-App-01 for the Virtual machine name
Expand the location tree and select the Workloads folder
Click NEXT
On the Select a compute resource page, expand the compute resource tree and select Compute-ResourcePool
Click NEXT
On the Select storage page, select WorkloadDatastore and click NEXT
On the Select Networks page, select sddc-cgw-network-1 from the Destination Network drop-down menu and click NEXT
On the Ready to complete page, click FINISH
The Deploy OVF template task is started
Wait for the Deploy OVF template task to finish
Power on the newly created Photo-App-01 VM
Select Menu --> Host and Clusters
In the left pane, expand Compute-ResourcePool and locate the new VM called Photo-App-01
Right-click the Photo-App-01 VM and select Power --> Power On
The VM powers on and acquires an IP address using DHCP from 192.168.xxx.0/24 range
Verify Network Connectivity for the Virtual Machine:
You run connectivity tests on the VM to determine whether it can access the student desktop machine and communicate with an external address
In the SDDC vSphere Client browser tab, open a virtual machine console to the Photo-App-01 VM
On the VM Summary tab, click LAUNCH WEB CONSOLE
The virtual machine console opens in a new browser tab
Log in to the VM:
Username: ubuntu
Password: password
Record the VM networking details and test connectivity
Run the ip a command to return the IP address of the VM
Record the IP address of the VM
Run the ip r command to return the gateway address of the VM
Using the ping command, verify that the VM can communicate with the gateway address
Enter Ctrl+C to exit the ping
Using the ping command, verify that the VM can access the student desktop machine (172.20.10.80)
The ping command fails
Enter Ctrl+C to exit the ping
Using the ping command, verify that the VM can communicate with an external Internet address (8.8.8.8)
The ping command fails
Enter Ctrl+C to exit the ping
Allow Outbound Network Access for the Virtual Machine:
You create a firewall rule for the VM that allows outbound network access so that the VM can communicate with external addresses.
In the VMware Cloud console tab, navigate to the SDDC summary page
Click the Networking & Security tab
Under Security, select Gateway Firewall
Click the Compute Gateway tab
Create a firewall rule to allow all traffic
You modify this rule in a later task to be more restrictive and secure
Click ADD RULE
For the Name of the rule, enter Allow-All
Leave Any as the value for Sources, Destinations, and Services
Leave All Uplinks as the value for Applied To
Leave Allow selected in the Action drop-down menu
Click PUBLISH
Return to the virtual machine console tab and run the ping command to verify that the VM can communicate with an external Internet address (8.8.8.8).
The ping command is successful because the compute gateway firewall allows traffic based on the new rule
Comments