177 lines
14 KiB
Markdown
177 lines
14 KiB
Markdown
---
|
|
sidebar_label: 'Launch an instance'
|
|
sidebar_position: 1
|
|
---
|
|
|
|
<!-- truncate -->
|
|
import CodeBlock from '@site/src/components/CodeBloack';
|
|
|
|
# Launch and manage instances
|
|
|
|
<div className="text">Instances are virtual machines that run inside the cloud. You can launch an instance from the following sources:<br/><ul><li>Images uploaded to the Image service.</li><li>Images that you have copied to a persistent volume. </li><li>Images that you have copied to a persistent volume. </li><li>Instances snapshot that you took. </li></ul></div>
|
|
|
|
|
|
<span style={{fontSize: '34px', fontFamily:'open sans'}}> Launch an instance </span>
|
|
|
|
<div className="text"><ol><li>Log in to the dashboard.</li>
|
|
<li>Select the appropriate project from the drop down menu at the top left.</li>
|
|
<li>On the <span style={{ color: 'blue' }}>Project tab</span> , open the <span style={{ color: 'blue' }}>Compute tab</span> and click <span style={{ color: 'blue' }}>Instances</span> category.</li>
|
|
The dashboard shows the instances with its name, its private and floating IP addresses, size, status, task, power state, and so on.
|
|
<li>Click <span style={{ color: 'blue' }}>Launch Instance</span>.</li><li>In the <span style={{ color: 'blue' }}>Launch Instance</span> dialog box, specify the following values:<br/><span className="text"style={{ color: 'blue' }}>Details tab.</span> </li></ol><br /></div>
|
|
|
|
|
|
<div className="text" ><strong>Instance Name</strong><br/></div>
|
|
<span className="text" style={{ marginLeft:'20px'}}>Assign a name to the virtual machine.</span>
|
|
|
|
<!-- <div style="background-color: lightblue; padding: 10px; border-radius: 5px; border: 1px solid blue;">
|
|
<strong>Note:</strong> The name you assign here becomes the initial host name of the server. If the name is longer than 63 characters, the Compute service truncates it automatically to ensure dnsmasq works correctly. <br />
|
|
|
|
After the server is built, if you change the server name in the API or change the host name directly, the names are not updated in the dashboard. <br />
|
|
|
|
Server names are not guaranteed to be unique when created so you could have two instances with the same host name. <br />
|
|
</div> -->
|
|
|
|
|
|
<!-- <div style={{ backgroundColor: 'lightblue', padding: '10px', borderRadius: '5px', border: '1px solid blue' }}>
|
|
<strong>Note:</strong> This is a highlighted section inside a blue box.
|
|
</div> -->
|
|
|
|
<div className="note"><strong>Note:</strong>The name you assign here becomes the initial host name of the server. If the name is longer than 63 characters, the Compute service truncates it automatically to ensure dnsmasq works correctly. <br />After the server is built, if you change the server name in the API or change the host name directly, the names are not updated in the dashboard. <br />Server names are not guaranteed to be unique when created so you could have two instances with the same host name. <br /></div><br />
|
|
|
|
|
|
|
|
|
|
<div className="text" ><strong>Description</strong><br/></div>
|
|
<span className="text" style={{ marginLeft:'20px'}}>You can assign a brief description of the virtual machine.</span><br/>
|
|
|
|
<div className="text" ><strong>Availability Zone</strong><br/></div>
|
|
<span className="text" style={{ marginLeft:'20px', textAlign: 'left'}}>By default, this value is set to the availability zone given by the cloud provider (for example, us-west or apac-south). For some cases, it could be nova.</span><br/>
|
|
|
|
<div className="text" ><strong>Count</strong><br/></div>
|
|
<span className="text" style={{ marginLeft:'20px'}}>To launch multiple instances, enter a value greater than 1. The default is 1.<br/><span style={{ color: 'blue' }}> Source tab</span></span><br/>
|
|
|
|
|
|
<div className="text" ><strong>Instance Boot Source</strong><br/></div>
|
|
<div className="text" style={{ marginLeft:'20px'}}>Your options are:</div><br/>
|
|
<span className="text" style={{ marginLeft:'20px' }}><strong>Boot from image</strong><br/></span> <span className="text" style={{ marginLeft:'20px' }} >If you choose this option, a new field for <span style={{ color: 'blue' }}>Image Name</span> displays. You can select the image from the list.</span><br/><br/>
|
|
|
|
<span className="text" style={{ marginLeft:'20px' }}><strong>Boot from snapshot</strong><br/></span> <span className="text"style={{ marginLeft:'20px' }} >If you choose this option, a new field for <span style={{ color: 'blue' }}> Instance Snapshot</span> displays. You can select the snapshot from the list.</span><br/><br/>
|
|
|
|
<span className="text" style={{ marginLeft:'20px' }}><strong>Boot from volume</strong><br/></span> <span className="text"style={{ marginLeft:'20px' }} >If you choose this option, a new field for <span style={{ color: 'blue' }}> Volume </span> displays. You can select the volume from the list.</span><br/><br/>
|
|
|
|
<span className="text" style={{ marginLeft:'20px' }}><strong>Boot from image (creates a new volume)</strong><br/></span> <span className="text" style={{ marginLeft:'20px' , textAlign: 'left' }} >With this option, you can boot from an image and create a volume by entering the <span style={{ color: 'blue' }}>Device Size </span> and <span style={{ color: 'blue' }}> Device Name</span> for your volume. Click the <span className="text"style={{color: 'blue' }} > Delete Volume on Instance Delete </span>option to delete the volume on deleting the instance.</span><br/><br/>
|
|
|
|
|
|
<span className="text" style={{ marginLeft:'20px' }}><strong>Boot from volume snapshot (creates a new volume)</strong><br/></span> <span className="text"style={{ marginLeft:'20px' , textAlign: 'left' }} >Using this option, you can boot from a volume snapshot and create a new volume by choosing <span className="text"style={{color: 'blue' }} > Volume Snapshot</span> from a list and adding a <span className="text"style={{color: 'blue' }} >Device Name</span> for your volume. Click the <span className="text"style={{color: 'blue' }} >Delete Volume on Instance Delete</span> option to delete the volume on deleting the instance.</span><br/><br/>
|
|
|
|
<span className="text"><strong>Image Name</strong><br/> This field changes based on your previous selection. If you have chosen to launch an instance using an image, the<span style={{ color: 'blue' }}> Image Name</span> field displays. Select the image name from the dropdown list.</span><br/><br/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span className="text"><strong>Instance Snapshot</strong><br/>
|
|
This field changes based on your previous selection. If you have chosen to launch an instance using a snapshot, the <span style={{ color: 'blue' }}>Instance Snapshot</span>field displays. Select the snapshot name from the dropdown list.</span><br/><br/>
|
|
|
|
<span className="text"><strong>Volume</strong><br/>
|
|
This field changes based on your previous selection. If you have chosen to launch an instance using a volume, the <span style={{ color: 'blue' }}>Volume </span> field displays. Select the volume name from the dropdown list. If you want to delete the volume on instance delete, check the <span style={{ color: 'blue' }}>Delete Volume on Instance Delete</span> option.</span><br/>
|
|
|
|
<span className="text" style={{ color: 'blue' }}>Flavor tab </span><br/><br/>
|
|
|
|
<span className="text"><strong>Flavor</strong><br/>
|
|
Specify the size of the instance to launch.</span> <br/>
|
|
|
|
<div className="note"><strong>Note:</strong>The flavor is selected based on the size of the image selected for launching an instance. For example, while creating an image, if you have entered the value in the Minimum RAM (MB) field as 2048, then on selecting the image, the default flavor is m1.small.</div><br/>
|
|
|
|
<span className="text" style={{ color: 'blue' }}>Networks tab</span><br/><br/>
|
|
|
|
|
|
<span className="text"><strong>Selected Networks</strong><br/>To add a network to the instance, click the + in the Available field.</span><br/>
|
|
|
|
<span className="text" style={{ color: 'blue' }}>Network Ports tab</span><br/><br/>
|
|
|
|
<span className="text"><strong>Ports</strong><br/>
|
|
Activate the ports that you want to assign to the instance.</span><br/>
|
|
|
|
<span className="text" style={{ color: 'blue' }}>Security Groups tab</span><br/><br/>
|
|
|
|
<div className="text"><strong>Security Groups</strong><br/>
|
|
• Activate the security groups that you want to assign to the instance.<br/>
|
|
• Security groups are a kind of cloud firewall that define which incoming network traffic is forwarded to instances.<br/>
|
|
• If you have not created any security groups, you can assign only the default security group to the instance.</div>
|
|
|
|
<div className="text"style={{ color: 'blue' }}> Key Pair tab</div><br/>
|
|
|
|
<div className="text"><strong>Key Pair</strong><br/>
|
|
Specify a key pair.<br/>
|
|
If the image uses a static root password or a static key set (neither is recommended), you do not need to provide a key pair to launch the instance.</div>
|
|
|
|
<div className="text"style={{ color: 'blue' }}>Configuration tab</div><br/>
|
|
|
|
<div className="text"><strong>Customization Script Source</strong><br/>
|
|
Specify a customization script that runs after your instance launches.</div>
|
|
|
|
<div className="text"style={{ color: 'blue' }}>Metadata tab</div><br/>
|
|
|
|
<div className="text"><strong>vailable Metadata</strong><br/>
|
|
Add Metadata items to your instance.</div>
|
|
<div className="text">Click <span style={{ color: 'blue' }}>Launch Instance.</span><br/><br/>
|
|
The instance starts on a compute node in the cloud.</div><br/>
|
|
|
|
<div className="note"><strong>Note:</strong>If you did not provide a key pair, security groups, or rules, users can access the instance only from inside the cloud through VNC. Even pinging the instance is not possible without an ICMP rule configured. </div><br/>
|
|
|
|
<div className="text">You can also launch an instance from the Images or Volumes category when you launch an instance from an image or a volume respectively.<br/><br/>
|
|
When you launch an instance from an image, OpenStack creates a local copy of the image on the compute node where the instance starts.<br/><br/>
|
|
For details on creating images, see Creating images manually in the OpenStack Virtual Machine Image Guide.</div><br/><br/>
|
|
|
|
<div className="text">When you launch an instance from a volume, note the following steps:<br/><br/>
|
|
To select the volume from which to launch, launch an instance from an arbitrary image on the volume. The arbitrary image that you select does not boot. Instead, it is replaced by the image on the volume that you choose in the next steps.<br/><br/>To boot a Xen image from a volume, the image you launch in must be the same type, fully virtualized or paravirtualized, as the one on the volume.<br/><br/>Select the volume or volume snapshot from which to boot. Enter a device name. Enter vda for KVM images or xvda for Xen images.</div>
|
|
|
|
<div className="note"><strong>Note</strong>: When running QEMU without support for the hardware virtualization, set cpu_mode="none" alongside virt_type=qemu in /etc/nova/nova-compute.conf to solve the following error:</div><br/>
|
|
|
|
|
|
|
|
|
|
libvirtError: unsupported configuration: CPU mode 'host-model'
|
|
for ``x86_64`` qemu domain on ``x86_64`` host is not supported by hypervisor<br/>
|
|
|
|
|
|
<span style={{fontSize: '34px', fontFamily:'open sans'}}>Connect to your instance by using SSH</span><br/>
|
|
<div className="text">To use SSH to connect to your instance, use the downloaded keypair file.</div>
|
|
|
|
<div className="note"><strong>Note</strong>
|
|
The user name is ubuntu for the Ubuntu cloud images on TryStack.</div>
|
|
|
|
<div className="text"><ol><li>Copy the IP address for your instance.</li><li>Use the ssh command to make a secure connection to the instance. For example:</li></ol></div>
|
|
|
|
|
|
<CodeBlock code={`ssh -i MyKey.pem ubuntu@10.0.0.2
|
|
`} />
|
|
|
|
<div className="text" style={{ marginLeft:'10px'}}>3. At the prompt, type **yes**. <br/> It is also possible to SSH into an instance without an SSH keypair, if the administrator has enabled root password injection. For more information about root password injection, see<span className="text" style={{textDecoration:'underline', color:'blue'}}> Injecting the administrator password</span> in the OpenStack Administrator Guide.</div><br/>
|
|
|
|
|
|
<span style={{fontSize: '34px', fontFamily:'open sans'}}>Track usage for instances</span><br/>
|
|
<div className="text">You can track usage for instances for each project. You can track costs per month by showing meters like number of vCPUs, disks, RAM, and uptime for all your instances.</div>
|
|
|
|
<div className="text"><ol><li>Log in to the dashboard.</li> <li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span style={{ color: 'blue' }}>Project tab </span>, open the <span style={{ color: 'blue' }}> Compute tab </span> and click<span style={{ color: 'blue' }}> Overview</span> category.</li><li>To query the instance usage for a month, select a month and click <span style={{ color: 'blue' }}>Submit</span>.</li><li>To download a summary, click<span style={{ color: 'blue' }}> Download CSV Summary</span>.</li></ol> </div>
|
|
|
|
<span style={{fontSize: '34px', fontFamily:'open sans'}}>Create an instance snapshot</span><br/>
|
|
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.</li><li>On the <span style={{ color: 'blue' }}> Project tab</span>, open the <span style={{ color: 'blue' }}>Compute tab </span> and click the <span style={{ color: 'blue' }}>Instances </span> category.</li><li>Select the instance from which to create a snapshot.</li><li>In the actions column, click Create Snapshot.</li><li>In the <span style={{ color: 'blue' }}>Create Snapshot</span> dialog box, enter a name for the snapshot, and click <span style={{ color: 'blue' }}>Create Snapshot</span>. <br/>The <span style={{ color: 'blue' }}>Images</span> category shows the instance snapshot.</li></ol></div>
|
|
|
|
|
|
<div className="text">To launch an instance from the snapshot, select the snapshot and click <span style={{ color: 'blue' }}>Launch </span>. Proceed with launching an instance.</div>
|
|
|
|
<span style={{fontSize: '34px', fontFamily:'open sans'}}>Manage an instance</span><br/>
|
|
<div className="text"><ol><li>Log in to the dashboard.</li><li>Select the appropriate project from the drop down menu at the top left.
|
|
</li><li>On the <span style={{ color: 'blue' }}> Project tab</span>, open the <span style={{ color: 'blue' }}> Compute tab </span> and click <span style={{ color: 'blue' }}>Instances </span>category.</li><li>Select an instance.</li><li>In the menu list in the actions column, select the state.</li><br/>You can resize or rebuild an instance. You can also choose to view the instance console log, edit instance or the security groups. Depending on the current state of the instance, you can pause, resume, suspend, soft or hard reboot, or terminate it.</ol></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|