Accessing the Metadata and User Data of a VM
You can get information about the configuration of virtual machine (VM) by accessing metadata and user data from within the VM itself.
This action enables you to access information that would otherwise be inaccessible inside the VM.
You can also get this information from outside the VM. For more information, see Getting Information About Your VMs.
Accessing the Metadata of a VM
Before you begin: Access the VM whose metadata you want to access. For more information, see Accessing Your VMs. |
To access the metadata of a VM, type the following command in a terminal of the VM, where CATEGORY is any of the category or category/subcategory available:
$ curl http://169.254.169.254/latest/meta-data/CATEGORY
You can also type the address |
CATEGORY | Description |
---|---|
|
The ID of the OUTSCALE machine image (OMI) used to create the VM. |
|
The creation index of the VM. For more information, see About VMs > General Information About VMs. |
|
This category contains the following subcategories:
|
|
The primary private DNS of the VM. |
|
The ID of the VM. |
|
The type of VM. |
|
Same as |
|
The primary private IP of the VM. |
|
The primary Media Access Control (MAC) address of the VM. |
|
A list of MAC addresses associated with the VM. |
|
This category contains the following subcategories, where
|
|
This category contains the following subcategories:
|
|
The public DNS of the VM. |
|
The public part of the keypair for the VM. For more information, see About Keypairs. |
|
The ID of the reservation the VM is associated with. |
|
A list of security group names for the VM. For more information, see About Security Groups. |
|
A list of tags associated with the VM. For more information, see About Tags. |
|
The tag Value corresponding to the |
The requested metadata of the VM appears.
Accessing the User Data of a VM
Before you begin: Access the VM whose user data you want to access. For more information, see Accessing Your VMs. |
To access the user data of a VM, type the following command in a terminal of the VM:
$ curl http://169.254.169.254/latest/user-data
You can also type the address |
The user data of the VM appears.
Related Pages