Tags:
create new tag
,
view all tags
---+!! Gestione delle istanze virtuali %TOC% ---+ Creazione di un'istanza * Per lanciare un'istanza è necessario specificare il flavor (tipo) che indica la dimensione dell'istanza. Per vedere i flavor disponibili usare il seguente comando: <verbatim> # nova flavor-list +----+-----------+-----------+------+-----------+------+-------+-------------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | +----+-----------+-----------+------+-----------+------+-------+-------------+ | 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | | 2 | m1.small | 2048 | 10 | 20 | | 1 | 1.0 | | 3 | m1.medium | 4096 | 10 | 40 | | 2 | 1.0 | | 4 | m1.large | 8192 | 10 | 80 | | 4 | 1.0 | | 5 | m1.xlarge | 16384 | 10 | 160 | | 8 | 1.0 | +----+-----------+-----------+------+-----------+------+-------+-------------+ </verbatim> * E' necessario specificare l'immagine che si vuole usare. Per vedere la lista delle immagini disponibili usare il seguente comando: <verbatim> # nova image-list +--------------------------------------+---------------------+--------+--------+ | ID | Name | Status | Server | +--------------------------------------+---------------------+--------+--------+ | 3db3e2dc-9d2f-40ff-8519-af7d04f8146a | tty-linux-ramdisk | ACTIVE | | | 8393828d-b226-434c-b0ea-179674fa4329 | tty-linux-kernel | ACTIVE | | | ba70321b-7bb9-4fc5-a2d4-406fdd8d589d | cirros-0.3.0-x86_64 | ACTIVE | | | df3422c6-58f5-4d3d-8de2-b1b522ab4152 | tty-linux | ACTIVE | | +--------------------------------------+---------------------+--------+--------+ </verbatim> * Per lanciare un'istanza usare il comando: <verbatim> # nova boot --flavor <FLAVOR_ID> --image <IMAGE_ID> --security_group <SECURITY_GROUP_NAME> <INSTANCE_NAME> </verbatim> Dove: * <FLAVOR_ID> è l'ID del flavor scelto * <IMAGE_ID> è l'ID dell'immagine scelta * <SECURITY_GROUP_NAME> è il nome del security group a cui far appartenere l'istanza * <INSTANCE_NAME> è il nome che si vuole assegnare all'istanza * Ad esempio: <verbatim> # nova boot --flavor 2 --image ba70321b-7bb9-4fc5-a2d4-406fdd8d589d --security_group default cirros +-------------------------------------+--------------------------------------+ | Property | Value | +-------------------------------------+--------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-SRV-ATTR:host | None | | OS-EXT-SRV-ATTR:hypervisor_hostname | None | | OS-EXT-SRV-ATTR:instance_name | instance-00000001 | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | accessIPv4 | | | accessIPv6 | | | adminPass | butvH8mKppBF | | config_drive | | | created | 2012-08-31T13:36:54Z | | flavor | m1.small | | hostId | | | id | e527c23d-15c4-4316-85c4-65b6db120f17 | | image | cirros-0.3.0-x86_64 | | key_name | | | metadata | {} | | name | cirros | | progress | 0 | | status | BUILD | | tenant_id | c10d9c9f296b47f8a1212dd7a98357e0 | | updated | 2012-08-31T13:36:54Z | | user_id | b0305faa3ace4671bc0399e71a0a1cc1 | +-------------------------------------+--------------------------------------+ </verbatim> * Per visualizzare lo stato dell'istanza creata: * Comando di KVM: <verbatim> # virsh list Id Name State ---------------------------------------------------- 1 instance-00000001 running </verbatim> * Comando di Nova: <verbatim> # nova list +--------------------------------------+--------+--------+----------+ | ID | Name | Status | Networks | +--------------------------------------+--------+--------+----------+ | e527c23d-15c4-4316-85c4-65b6db120f17 | cirros | ACTIVE | | +--------------------------------------+--------+--------+----------+ </verbatim> <br /> ---+ Assegnazione di un IP Floating a una istanza * Per assegnare un IP a una istanza sono necessari 2 step: 1. Allocazione di un IP dalla lista <verbatim> # nova floating-ip-create </verbatim> 1. Assegnazione un IP allocato ad una istanza <verbatim> # nova add-floating-ip <INSTANCE_ID> <ALLOCATED_IP> </verbatim> Dove <INSTANCE_ID> è l'id dell'istanza a cui si vuole associare l'IP e <ALLOCATED_IP> è l'IP allocato che si vuole assegnare (output del comando precedente). * Se necessario, rimuovere l'IP dall'istanza e deallocarlo <verbatim> # nova remove-floating-ip <INSTANCE_ID> <INSTANCE_IP> # nova floating-ip-delete <INSTANCE_IP> </verbatim> Dove <INSTANCE_IP> è l'IP precedentemente assegnato all'istanza. ---+++ Assegnazione automatica di IP Floating Il servizio =nova-network= può essere configurato per allocare automaticamente un IP ed assegnarlo ad una istanza quando questa viene lanciata. * Per abilitare questa opzione, aggiungere la seguente riga nel =nova.conf= e far ripartire il servizio =nova-network= : <verbatim> auto_assign_floating_ip=True </verbatim> *Nota bene:* se questa opzione è abilitata e gli indirizzi IP della lista di Nova sono già stati tutti assegnati, il comando =nova boot= non andrà a buon fine e restituirà un errore. <br /> -- Main.PaoloVeronesi - 2012-08-31
E
dit
|
A
ttach
|
PDF
|
H
istory
: r6
<
r5
<
r4
<
r3
<
r2
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
Topic revision: r6 - 2012-10-22
-
EnricoFattibene
Home
Site map
CEMon web
CREAM web
Cloud web
Cyclops web
DGAS web
EgeeJra1It web
Gows web
GridOversight web
IGIPortal web
IGIRelease web
MPI web
Main web
MarcheCloud web
MarcheCloudPilotaCNAF web
Middleware web
Operations web
Sandbox web
Security web
SiteAdminCorner web
TWiki web
Training web
UserSupport web
VOMS web
WMS web
WMSMonitor web
WeNMR web
MarcheCloudPilotaCNAF Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback