Create VM Instance from Template

Mindwatering Incorporated

Author: Tripp W Black

Created: 12/29 at 11:14 PM

 

Category:
Linux
KVM

Create VM Instance:

1. Login with the correct Domain Account (User):
CloudStack UI --> Login
e.g. http://cloudstackmgmt.mindwatering.net:8080/client/
MyAdminID
***********
MyDomain


2. Create a new instance:
CloudStack UI --> Compute (left menu twistie) --> Instances (left menu) --> click Add Instance + (button)

In the New Instance page, complete each of the sections:
- 1 Assign Instance to another Account
Verify the Owner type, Domain, and Account fields - they will be populated with the current user if not a ROOT login.
e.g.
Owner type: Account
Domain: ROOT/MyDomain
Account: MyAdminID

- 2 Select deployment infrastructure
Zone: <select from the Zone(s) presented>

- 3 Image
Type: Template
Operating System: Rocky Linux
Under the filter section, choose the image desired:
QCOW Generic Cloud 9
Override root disk size: disabled
(If desired, you can enable and increase beyond the default if the root disk needs to be bigger than the template size. Alternately, overriding root disk offering will be available again in section 4 below with choices rather than entering a number.)

- 4 Compute Offering
Under the Computer Offering column, select the size via its radio button: Medium Instance
Override root disk offering: disabled

- 5 Data Disk
Under the Disk Offering column, select the size via its radio button: Medium (20 GB)
(Choose No thanks for no second data disk/volume.)

- 6 Networks
If there is already one or more networks for this account, and one is to be re-used, under the Networks column, click the checkbox next to the network name already created.
- or -
If there is no network, or a new one is needed, click Create new Network (button).
a. Under Isolated (tab), enter:
Name: MyDomainNetwork2
Description: MyDomain Full-stack Apps Network
Zone: <select same zone as step - 2 above if more than one available>
Owner type: Account
Domain: ROOT/MyDomain
Account: MyAdminID
Network Offering: Offering for Isolated networks with Source Nat service enabled
Click OK (button)

- 7 SSH keys pairs
If SSH key pairs have been already created to be used with this instance, under the SSH key pairs column, select via checkbox the key pair.

- 8 Advanced mode
Show advanced settings: disabled

- 9 Details
Name: <enter the name of the VM e.g. MyDomain Full-stack Web App>
Start Instance: enabled

On the right review the settings, click Launch Instance (button)

Errors?
- If you get the no volume error below, then verify that the template had a disk size, if not override and set it, and validate that your zone/pod/cluster pool of primary storage space is sufficent.
Unable to create deployment, no usable volumes found for the VM

- If you get the no destination error below, then verify the zone, pod, and cluster are not disabled. Verify permissions for the account selected has rights to place in the zone. Verify the primary storage is online. Verify the hosts are not all in maintenance.
No destination found for a deployment for VM instance


3. Update the firewall to let port 22, 80, and 443 into the VM:
CloudStack UI --> Network (left menu twistie) --> Guest Networks (left menu) --> click<network added during creation> --> Public IP Addresses (tab) --> click <public IP given during creation> --> Firewall (tab)

To add a SSH rule from anywhere, enter:
Source CIDR: 0.0.0.0/0
Protocol: TCP
Start port: 22
End port: 22
Click Add (button)

Repeat the above steps for ports 80 and 443.


4. Update the port forwarding so that port 22 is forwarded to the new instance VM:
CloudStack UI --> Network (left menu twistie) --> Guest Networks (left menu) --> click<network added during creation> --> Public IP Addresses (tab) --> click <public IP given during creation> --> Port forwarding (tab)

To map the port from the firewall to the instance, enter:
Private port: 22-22
Public port: 22-22
Protocol: TCP
Click Add (button)

In the Add Instance dialog, select the instance VM using the Select column radio button. Click OK (button).

Repeat the above steps for ports 80 and 443.


If you get the error below, the Add button was clicked w/o first completing the private and public port selections.
Request failed. (431)
Unable to execute API command createportforwardingrule due to missing parameter privateport

5. Test from the public network.
$ ssh admin@<publicIP>




previous page

×