- Create two new flavors
- Flavor 1 (initial instance size):
- RAM disk: 111MB
- Root disk: 1GB
- fdisk:
Disk /dev/vda: 1073 MB, 1073741824 bytes
- lsblk:
vda 253:0 0 1073741824 0 disk /
- Ephemeral disk: 1GB
- fdisk:
Disk /dev/vdb: 1073 MB, 1073741824 bytes
- lsblk:
vdb 253:16 0 1073741824 0 disk /mnt
- Swap disk: 111MB
- fdisk:
Disk /dev/vdc: 116 MB, 116391936 bytes
- lsblk:
vdc 253:32 0 116391936 0 disk
- Flavor 2 (resize instance to this):
- RAM disk: 222MB
- Root disk: 2GB
- fdisk:
Disk /dev/vda: 2147 MB, 2147483648 bytes
- lsblk:
vda 253:0 0 2147483648 0 disk /
- Ephemeral disk: 2GB <------------------- DID NOT RESIZE
- fdisk:
Disk /dev/vdb: 1073 MB, 1073741824 bytes
- lsblk:
vdb 253:16 0 1073741824 0 disk /mnt
- Swap disk: 222MB
- fdisk:
Disk /dev/vdc: 232 MB, 232783872 bytes
- lsblk:
vdc 253:32 0 232783872 0 disk
$ nova flavor-show flavor-1
+----------------------------+--------------------------------------+
| Property | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 1 |
| disk | 1 |
| extra_specs | {} |
| id | 8aa3405c-4d3e-491d-8763-7c5599819f43 |
| name | flavor-1 |
| os-flavor-access:is_public | True |
| ram | 111 |
| rxtx_factor | 1.0 |
| swap | 111 |
| vcpus | 1 |
+----------------------------+--------------------------------------+
$ nova flavor-show flavor-2
+----------------------------+--------------------------------------+
| Property | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 2 |
| disk | 2 |
| extra_specs | {} |
| id | 8f94704f-8b88-48db-9de5-51658aa10bab |
| name | flavor-2 |
| os-flavor-access:is_public | True |
| ram | 222 |
| rxtx_factor | 1.0 |
| swap | 222 |
| vcpus | 1 |
+----------------------------+--------------------------------------+
$ nova list
+--------------------------------------+------------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+--------+------------+-------------+------------------+
| 43b61227-03f0-4efc-b082-e93f48fd7a7b | instance-1 | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------+-------------+------------------+
$ nova show instance-1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-0e0gnanq |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-04-15T21:38:12.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-15T21:37:36Z |
| description | instance-1 |
| flavor | flavor-1 (8aa3405c-4d3e-491d-8763-7c5599819f43) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 43b61227-03f0-4efc-b082-e93f48fd7a7b |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-1 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.2 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-15T21:38:12Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
$ ls -1 /opt/stack/data/nova/instances/
43b61227-03f0-4efc-b082-e93f48fd7a7b
_base
compute_nodes
locks
$ ls -lah /opt/stack/data/nova/instances/_base/
total 65M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 16:37 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 16:38 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 15 16:37 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 15 16:37 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 15 16:37 eba9647fc092586c584b809eb350f030751d9460
-rw-r--r--. 1 qemu qemu 1.0G Apr 15 16:37 ephemeral_1_40d1d2c
-rw-r--r--. 1 qemu qemu 111M Apr 15 16:37 swap_111
$ ls -lah /opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 16:38 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 16:38 ..
-rw-rw----. 1 qemu qemu 20K Apr 15 16:38 console.log
-rw-r--r--. 1 qemu qemu 11M Apr 15 16:39 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 15 16:38 disk.config
-rw-r--r--. 1 qemu qemu 384K Apr 15 16:38 disk.eph0
-rw-r--r--. 1 diana libvirtd 527 Apr 15 16:38 disk.info
-rw-r--r--. 1 qemu qemu 193K Apr 15 16:37 disk.swap
-rw-rw-r--. 1 qemu qemu 4.8M Apr 15 16:37 kernel
-rw-rw-r--. 1 diana libvirtd 3.5K Apr 15 16:38 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 15 16:37 ramdisk
$ cat /opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.info | python -m json.tool
{
"/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk": "qcow2",
"/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.config": "raw",
"/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.eph0": "qcow2",
"/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.swap": "qcow2",
"/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/kernel": "raw",
"/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/ramdisk": "raw"
}
$ cat /opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/libvirt.xml
<domain type="qemu">
<uuid>43b61227-03f0-4efc-b082-e93f48fd7a7b</uuid>
<name>instance-00000001</name>
<memory>113664</memory>
<vcpu>1</vcpu>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="13.0.1"/>
<nova:name>instance-1</nova:name>
<nova:creationTime>2016-04-15 21:38:09</nova:creationTime>
<nova:flavor name="flavor-1">
<nova:memory>111</nova:memory>
<nova:disk>1</nova:disk>
<nova:swap>111</nova:swap>
<nova:ephemeral>1</nova:ephemeral>
<nova:vcpus>1</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="d83e39dacfc549449c58987c3c99d379">admin</nova:user>
<nova:project uuid="162df2e9319041029c8886f07911e9c7">admin</nova:project>
</nova:owner>
<nova:root type="image" uuid="ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a"/>
</nova:instance>
</metadata>
<sysinfo type="smbios">
<system>
<entry name="manufacturer">OpenStack Foundation</entry>
<entry name="product">OpenStack Nova</entry>
<entry name="version">13.0.1</entry>
<entry name="serial">5cd17f94-687c-43ff-9ed2-733913575a4e</entry>
<entry name="uuid">43b61227-03f0-4efc-b082-e93f48fd7a7b</entry>
<entry name="family">Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type>hvm</type>
<kernel>/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/kernel</kernel>
<initrd>/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/ramdisk</initrd>
<cmdline>root=/dev/vda console=tty0 console=ttyS0 no_timer_check</cmdline>
<smbios mode="sysinfo"/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cputune>
<shares>1024</shares>
</cputune>
<clock offset="utc"/>
<cpu match="exact">
<topology sockets="1" cores="1" threads="1"/>
</cpu>
<devices>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk"/>
<target bus="virtio" dev="vda"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.eph0"/>
<target bus="virtio" dev="vdb"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.swap"/>
<target bus="virtio" dev="vdc"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.config"/>
<target bus="ide" dev="hdd"/>
</disk>
<interface type="bridge">
<mac address="fa:16:3e:b2:31:d5"/>
<model type="virtio"/>
<driver name="qemu"/>
<source bridge="br100"/>
<filterref filter="nova-instance-instance-00000001-fa163eb231d5"/>
</interface>
<serial type="file">
<source path="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/console.log"/>
</serial>
<serial type="pty"/>
<graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/>
<video>
<model type="cirrus"/>
</video>
<memballoon model="virtio">
<stats period="10"/>
</memballoon>
</devices>
</domain>
$ ssh [email protected]
$ sudo fdisk -l
Disk /dev/vda: 1073 MB, 1073741824 bytes
16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vda doesn't contain a valid partition table
Disk /dev/vdb: 1073 MB, 1073741824 bytes
16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vdb doesn't contain a valid partition table
Disk /dev/vdc: 116 MB, 116391936 bytes
16 heads, 63 sectors/track, 225 cylinders, total 227328 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vdc doesn't contain a valid partition table
$ lsblk -lab
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
ram0 1:0 0 67108864 0 disk
ram1 1:1 0 67108864 0 disk
ram2 1:2 0 67108864 0 disk
ram3 1:3 0 67108864 0 disk
ram4 1:4 0 67108864 0 disk
ram5 1:5 0 67108864 0 disk
ram6 1:6 0 67108864 0 disk
ram7 1:7 0 67108864 0 disk
ram8 1:8 0 67108864 0 disk
ram9 1:9 0 67108864 0 disk
ram10 1:10 0 67108864 0 disk
ram11 1:11 0 67108864 0 disk
ram12 1:12 0 67108864 0 disk
ram13 1:13 0 67108864 0 disk
ram14 1:14 0 67108864 0 disk
ram15 1:15 0 67108864 0 disk
loop0 7:0 0 0 loop
loop1 7:1 0 0 loop
loop2 7:2 0 0 loop
loop3 7:3 0 0 loop
loop4 7:4 0 0 loop
loop5 7:5 0 0 loop
loop6 7:6 0 0 loop
loop7 7:7 0 0 loop
vda 253:0 0 1073741824 0 disk /
vdb 253:16 0 1073741824 0 disk /mnt
vdc 253:32 0 116391936 0 disk
sr0 11:0 1 432128 0 rom
MariaDB [nova]> select * from block_device_mapping\G
*************************** 1. row ***************************
created_at: 2016-04-15 21:37:36
updated_at: 2016-04-15 21:37:39
deleted_at: NULL
id: 1
device_name: /dev/vda
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: NULL
no_device: 0
connection_info: NULL
instance_uuid: 43b61227-03f0-4efc-b082-e93f48fd7a7b
deleted: 0
source_type: image
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: NULL
boot_index: 0
image_id: ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a
tag: NULL
*************************** 2. row ***************************
created_at: 2016-04-15 21:37:36
updated_at: 2016-04-15 21:37:39
deleted_at: NULL
id: 2
device_name: /dev/vdb
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: 1
no_device: 0
connection_info: NULL
instance_uuid: 43b61227-03f0-4efc-b082-e93f48fd7a7b
deleted: 0
source_type: blank
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: virtio
boot_index: -1
image_id: NULL
tag: NULL
*************************** 3. row ***************************
created_at: 2016-04-15 21:37:36
updated_at: 2016-04-15 21:37:39
deleted_at: NULL
id: 3
device_name: /dev/vdc
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: 111
no_device: 0
connection_info: NULL
instance_uuid: 43b61227-03f0-4efc-b082-e93f48fd7a7b
deleted: 0
source_type: blank
destination_type: local
guest_format: swap
device_type: disk
disk_bus: virtio
boot_index: -1
image_id: NULL
tag: NULL
3 rows in set (0.00 sec)
$ nova resize instance-1 flavor-2 --poll
Server resizing... 100% complete
Finished
$ nova list
+--------------------------------------+------------+---------------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+---------------+------------+-------------+------------------+
| 43b61227-03f0-4efc-b082-e93f48fd7a7b | instance-1 | VERIFY_RESIZE | - | Running | private=10.0.0.2 |
+--------------------------------------+------------+---------------+------------+-------------+------------------+
$ nova show instance-1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-0e0gnanq |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | resized |
| OS-SRV-USG:launched_at | 2016-04-15T21:51:13.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-15T21:37:36Z |
| description | instance-1 |
| flavor | flavor-2 (8f94704f-8b88-48db-9de5-51658aa10bab) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 43b61227-03f0-4efc-b082-e93f48fd7a7b |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-1 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.2 |
| progress | 0 |
| security_groups | default |
| status | VERIFY_RESIZE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-15T21:51:13Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
$ nova resize-confirm instance-1
$ nova list
+--------------------------------------+------------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+--------+------------+-------------+------------------+
| 43b61227-03f0-4efc-b082-e93f48fd7a7b | instance-1 | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+------------+--------+------------+-------------+------------------+
$ nova show instance-1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-0e0gnanq |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-04-15T21:51:13.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-15T21:37:36Z |
| description | instance-1 |
| flavor | flavor-2 (8f94704f-8b88-48db-9de5-51658aa10bab) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 43b61227-03f0-4efc-b082-e93f48fd7a7b |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-1 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.2 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-15T21:53:13Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
$ ssh [email protected]
[email protected]'s password:
$ sudo fdisk -l
Disk /dev/vda: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders, total 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vda doesn't contain a valid partition table
Disk /dev/vdb: 1073 MB, 1073741824 bytes
16 heads, 63 sectors/track, 2080 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vdb doesn't contain a valid partition table
Disk /dev/vdc: 232 MB, 232783872 bytes
16 heads, 63 sectors/track, 451 cylinders, total 454656 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vdc doesn't contain a valid partition table
$ lsblk -lab
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
ram0 1:0 0 67108864 0 disk
ram1 1:1 0 67108864 0 disk
ram2 1:2 0 67108864 0 disk
ram3 1:3 0 67108864 0 disk
ram4 1:4 0 67108864 0 disk
ram5 1:5 0 67108864 0 disk
ram6 1:6 0 67108864 0 disk
ram7 1:7 0 67108864 0 disk
ram8 1:8 0 67108864 0 disk
ram9 1:9 0 67108864 0 disk
ram10 1:10 0 67108864 0 disk
ram11 1:11 0 67108864 0 disk
ram12 1:12 0 67108864 0 disk
ram13 1:13 0 67108864 0 disk
ram14 1:14 0 67108864 0 disk
ram15 1:15 0 67108864 0 disk
loop0 7:0 0 0 loop
loop1 7:1 0 0 loop
loop2 7:2 0 0 loop
loop3 7:3 0 0 loop
loop4 7:4 0 0 loop
loop5 7:5 0 0 loop
loop6 7:6 0 0 loop
loop7 7:7 0 0 loop
vda 253:0 0 2147483648 0 disk /
vdb 253:16 0 1073741824 0 disk /mnt
vdc 253:32 0 232783872 0 disk
sr0 11:0 1 432128 0 rom
$ ls -lah /opt/stack/data/nova/instances/_base/
total 65M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 16:51 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 16:53 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 15 16:37 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 15 16:51 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 15 16:51 eba9647fc092586c584b809eb350f030751d9460
-rw-r--r--. 1 qemu qemu 1.0G Apr 15 16:37 ephemeral_1_40d1d2c
-rw-r--r--. 1 qemu qemu 111M Apr 15 16:37 swap_111
-rw-r--r--. 1 qemu qemu 222M Apr 15 16:51 swap_222
$ ls -lah /opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 16:51 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 16:53 ..
-rw-rw----. 1 qemu qemu 20K Apr 15 16:51 console.log
-rw-r--r--. 1 qemu qemu 11M Apr 15 17:02 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 15 16:51 disk.config
-rw-r--r--. 1 qemu qemu 384K Apr 15 16:51 disk.eph0
-rw-r--r--. 1 diana libvirtd 527 Apr 15 16:51 disk.info
-rw-r--r--. 1 qemu qemu 193K Apr 15 16:51 disk.swap
-rw-rw-r--. 1 qemu qemu 4.8M Apr 15 16:51 kernel
-rw-rw-r--. 1 diana libvirtd 3.5K Apr 15 16:51 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 15 16:51 ramdisk
$ cat /opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/libvirt.xml
<domain type="qemu">
<uuid>43b61227-03f0-4efc-b082-e93f48fd7a7b</uuid>
<name>instance-00000001</name>
<memory>227328</memory>
<vcpu>1</vcpu>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="13.0.1"/>
<nova:name>instance-1</nova:name>
<nova:creationTime>2016-04-15 21:51:11</nova:creationTime>
<nova:flavor name="flavor-2">
<nova:memory>222</nova:memory>
<nova:disk>2</nova:disk>
<nova:swap>222</nova:swap>
<nova:ephemeral>2</nova:ephemeral>
<nova:vcpus>1</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="d83e39dacfc549449c58987c3c99d379">admin</nova:user>
<nova:project uuid="162df2e9319041029c8886f07911e9c7">admin</nova:project>
</nova:owner>
<nova:root type="image" uuid="ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a"/>
</nova:instance>
</metadata>
<sysinfo type="smbios">
<system>
<entry name="manufacturer">OpenStack Foundation</entry>
<entry name="product">OpenStack Nova</entry>
<entry name="version">13.0.1</entry>
<entry name="serial">5cd17f94-687c-43ff-9ed2-733913575a4e</entry>
<entry name="uuid">43b61227-03f0-4efc-b082-e93f48fd7a7b</entry>
<entry name="family">Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type>hvm</type>
<kernel>/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/kernel</kernel>
<initrd>/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/ramdisk</initrd>
<cmdline>root=/dev/vda console=tty0 console=ttyS0 no_timer_check</cmdline>
<smbios mode="sysinfo"/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cputune>
<shares>1024</shares>
</cputune>
<clock offset="utc"/>
<cpu match="exact">
<topology sockets="1" cores="1" threads="1"/>
</cpu>
<devices>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk"/>
<target bus="virtio" dev="vda"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.eph0"/>
<target bus="virtio" dev="vdb"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.swap"/>
<target bus="virtio" dev="vdc"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw" cache="none"/>
<source file="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/disk.config"/>
<target bus="ide" dev="hdd"/>
</disk>
<interface type="bridge">
<mac address="fa:16:3e:b2:31:d5"/>
<model type="virtio"/>
<driver name="qemu"/>
<source bridge="br100"/>
<filterref filter="nova-instance-instance-00000001-fa163eb231d5"/>
</interface>
<serial type="file">
<source path="/opt/stack/data/nova/instances/43b61227-03f0-4efc-b082-e93f48fd7a7b/console.log"/>
</serial>
<serial type="pty"/>
<graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/>
<video>
<model type="cirrus"/>
</video>
<memballoon model="virtio">
<stats period="10"/>
</memballoon>
</devices>
</domain>
MariaDB [nova]> select * from block_device_mapping\G
*************************** 1. row ***************************
created_at: 2016-04-15 21:37:36
updated_at: 2016-04-15 21:37:39
deleted_at: NULL
id: 1
device_name: /dev/vda
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: NULL
no_device: 0
connection_info: NULL
instance_uuid: 43b61227-03f0-4efc-b082-e93f48fd7a7b
deleted: 0
source_type: image
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: NULL
boot_index: 0
image_id: ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a
tag: NULL
*************************** 2. row ***************************
created_at: 2016-04-15 21:37:36
updated_at: 2016-04-15 21:37:39
deleted_at: NULL
id: 2
device_name: /dev/vdb
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: 1
no_device: 0
connection_info: NULL
instance_uuid: 43b61227-03f0-4efc-b082-e93f48fd7a7b
deleted: 0
source_type: blank
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: virtio
boot_index: -1
image_id: NULL
tag: NULL
*************************** 3. row ***************************
created_at: 2016-04-15 21:37:36
updated_at: 2016-04-15 21:37:39
deleted_at: NULL
id: 3
device_name: /dev/vdc
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: 111
no_device: 0
connection_info: NULL
instance_uuid: 43b61227-03f0-4efc-b082-e93f48fd7a7b
deleted: 0
source_type: blank
destination_type: local
guest_format: swap
device_type: disk
disk_bus: virtio
boot_index: -1
image_id: NULL
tag: NULL
3 rows in set (0.00 sec)
- Create two new flavors
- Flavor 1 (initial instance size):
- RAM disk: 111MB
- guest:
can't see from guest
- host:
-rw-rw-r--. 1 qemu qemu 3.6M Apr 22 02:46 ramdisk
- info:
"../instances/UUID/ramdisk": "raw"
- Root disk: 2GB
- guest:
/dev/vda 23.2M 9.6M 12.4M 44% /
- host:
-rw-r--r--. 1 qemu qemu 11M Apr 22 02:47 disk
- info:
"../instances/UUID/disk": "qcow2"
- xml:
<target bus="virtio" dev="vda"/>
- fdisk:
Disk /dev/vda: 2147 MB, 2147483648 bytes
- lsblk:
vda 253:0 0 2147483648 0 disk /
- Ephemeral disk: 3GB
- guest:
/dev/vdb 3.0G 68.5M 2.7G 2% /mnt
- host:
-rw-r--r--. 1 qemu qemu 384K Apr 22 02:47 disk.eph0
- cache:
-rw-r--r--. 1 qemu qemu 3.0G Apr 22 02:46 ephemeral_3_40d1d2c
- info:
"../instances/UUID/disk.eph0": "qcow2"
- xml:
<target bus="virtio" dev="vdb"/>
- fdisk:
Disk /dev/vdb: 3221 MB, 3221225472 bytes
- lsblk:
vdb 253:16 0 3221225472 0 disk /mnt
- Swap disk: 444MB
- guest:
???
- host:
-rw-r--r--. 1 qemu qemu 193K Apr 22 02:46 disk.swap
- cache:
-rw-r--r--. 1 qemu qemu 444M Apr 22 02:46 swap_444
- info:
"../instances/UUID/disk.swap": "qcow2"
- xml:
<target bus="virtio" dev="vdc"/>
- fdisk:
Disk /dev/vdc: 465 MB, 465567744 bytes
- lsblk:
vdc 253:32 0 465567744 0 disk
- Flavor 2 (resize instance to this):
- RAM disk: 222MB
- Root disk: 3GB
- Ephemeral disk: 4GB
- Swap disk: 555MB
$ nova flavor-show flavor-1
+----------------------------+--------------------------------------+
| Property | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 3 |
| disk | 2 |
| extra_specs | {} |
| id | 121c5011-fc2a-4abf-a21e-894c46298ffb |
| name | flavor-1 |
| os-flavor-access:is_public | True |
| ram | 111 |
| rxtx_factor | 1.0 |
| swap | 444 |
| vcpus | 1 |
+----------------------------+--------------------------------------+
$ nova flavor-show flavor-2
+----------------------------+--------------------------------------+
| Property | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 4 |
| disk | 3 |
| extra_specs | {} |
| id | d1f08454-279d-40ea-97eb-342d2bf997d5 |
| name | flavor-2 |
| os-flavor-access:is_public | True |
| ram | 222 |
| rxtx_factor | 1.0 |
| swap | 555 |
| vcpus | 1 |
+----------------------------+--------------------------------------+
- The image cache is currently missing (b/c I deleted it)
$ ls -1 /opt/stack/data/nova/instances/
compute_nodes
locks
snapshots
- Create a new instance with
flavor-1
$ nova show instance-1
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000079 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-wp6lun9q |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-04-22T07:46:49.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-22T07:46:34Z |
| description | instance-1 |
| flavor | flavor-1 (121c5011-fc2a-4abf-a21e-894c46298ffb) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 738793f8-e18a-4a1e-abba-d35a839a3ab8 |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-1 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.115 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-22T07:46:49Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
$ ls -1 /opt/stack/data/nova/instances/
738793f8-e18a-4a1e-abba-d35a839a3ab8
_base
compute_nodes
locks
snapshots
$ ls -lah /opt/stack/data/nova/instances/_base/
total 98M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 22 02:46 .
drwxr-xr-x. 7 diana root 4.0K Apr 22 02:46 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 22 02:46 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 22 02:46 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 22 02:46 eba9647fc092586c584b809eb350f030751d9460
-rw-r--r--. 1 qemu qemu 3.0G Apr 22 02:46 ephemeral_3_40d1d2c
-rw-r--r--. 1 qemu qemu 444M Apr 22 02:46 swap_444
$ ls -lah /opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 22 02:46 .
drwxr-xr-x. 7 diana root 4.0K Apr 22 02:46 ..
-rw-rw----. 1 qemu qemu 20K Apr 22 02:47 console.log
-rw-r--r--. 1 qemu qemu 11M Apr 22 02:47 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 22 02:46 disk.config
-rw-r--r--. 1 qemu qemu 384K Apr 22 02:47 disk.eph0
-rw-r--r--. 1 diana libvirtd 527 Apr 22 02:46 disk.info
-rw-r--r--. 1 qemu qemu 193K Apr 22 02:46 disk.swap
-rw-rw-r--. 1 qemu qemu 4.8M Apr 22 02:46 kernel
-rw-rw-r--. 1 diana libvirtd 3.5K Apr 22 02:46 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 22 02:46 ramdisk
$ cat /opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.info | python -m json.tool
{
"/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk": "qcow2",
"/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.config": "raw",
"/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.eph0": "qcow2",
"/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.swap": "qcow2",
"/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/kernel": "raw",
"/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/ramdisk": "raw"
}
$ cat /opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/libvirt.xml
<domain type="qemu">
<uuid>738793f8-e18a-4a1e-abba-d35a839a3ab8</uuid>
<name>instance-00000079</name>
<memory>113664</memory>
<vcpu>1</vcpu>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="13.0.1"/>
<nova:name>instance-1</nova:name>
<nova:creationTime>2016-04-22 07:46:45</nova:creationTime>
<nova:flavor name="flavor-1">
<nova:memory>111</nova:memory>
<nova:disk>2</nova:disk>
<nova:swap>444</nova:swap>
<nova:ephemeral>3</nova:ephemeral>
<nova:vcpus>1</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="d83e39dacfc549449c58987c3c99d379">admin</nova:user>
<nova:project uuid="162df2e9319041029c8886f07911e9c7">admin</nova:project>
</nova:owner>
<nova:root type="image" uuid="ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a"/>
</nova:instance>
</metadata>
<sysinfo type="smbios">
<system>
<entry name="manufacturer">OpenStack Foundation</entry>
<entry name="product">OpenStack Nova</entry>
<entry name="version">13.0.1</entry>
<entry name="serial">5cd17f94-687c-43ff-9ed2-733913575a4e</entry>
<entry name="uuid">738793f8-e18a-4a1e-abba-d35a839a3ab8</entry>
<entry name="family">Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type>hvm</type>
<kernel>/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/kernel</kernel>
<initrd>/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/ramdisk</initrd>
<cmdline>root=/dev/vda console=tty0 console=ttyS0 no_timer_check</cmdline>
<smbios mode="sysinfo"/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cputune>
<shares>1024</shares>
</cputune>
<clock offset="utc"/>
<cpu match="exact">
<topology sockets="1" cores="1" threads="1"/>
</cpu>
<devices>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk"/>
<target bus="virtio" dev="vda"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.eph0"/>
<target bus="virtio" dev="vdb"/>
</disk>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.swap"/>
<target bus="virtio" dev="vdc"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw" cache="none"/>
<source file="/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/disk.config"/>
<target bus="ide" dev="hdd"/>
</disk>
<interface type="bridge">
<mac address="fa:16:3e:f6:ce:06"/>
<model type="virtio"/>
<driver name="qemu"/>
<source bridge="br100"/>
<filterref filter="nova-instance-instance-00000079-fa163ef6ce06"/>
</interface>
<serial type="file">
<source path="/opt/stack/data/nova/instances/738793f8-e18a-4a1e-abba-d35a839a3ab8/console.log"/>
</serial>
<serial type="pty"/>
<graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/>
<video>
<model type="cirrus"/>
</video>
<memballoon model="virtio">
<stats period="10"/>
</memballoon>
</devices>
</domain>
$ ssh [email protected]
$ df -h
Filesystem Size Used Available Use% Mounted on
/dev 44.7M 0 44.7M 0% /dev
/dev/vda 23.2M 9.6M 12.4M 44% /
tmpfs 48.3M 0 48.3M 0% /dev/shm
tmpfs 200.0K 108.0K 92.0K 54% /run
/dev/vdb 3.0G 68.5M 2.7G 2% /mnt
$ ls -lah /dev/vd*
brw------- 1 root root 253, 0 Apr 22 08:46 /dev/vda <--- root
brw------- 1 root root 253, 16 Apr 22 08:46 /dev/vdb <--- eph
brw------- 1 root root 253, 32 Apr 22 08:46 /dev/vdc <--- swap
$ cat /proc/partitions
major minor #blocks name
253 0 2097152 vda
253 16 3145728 vdb
253 32 454656 vdc
11 0 422 sr0
$ sudo blockdev --getsize64 /dev/vda
2147483648
$ sudo blockdev --getsize64 /dev/vdb
3221225472
$ sudo blockdev --getsize64 /dev/vdc
465567744
$ cat /sys/class/block/vda/size
4194304
$ cat /sys/class/block/vdb/size
6291456
$ cat /sys/class/block/vdc/size
909312
$ sudo fdisk -l
Disk /dev/vda: 2147 MB, 2147483648 bytes
16 heads, 63 sectors/track, 4161 cylinders, total 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vda doesn't contain a valid partition table
Disk /dev/vdb: 3221 MB, 3221225472 bytes
16 heads, 63 sectors/track, 6241 cylinders, total 6291456 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vdb doesn't contain a valid partition table
Disk /dev/vdc: 465 MB, 465567744 bytes
16 heads, 63 sectors/track, 902 cylinders, total 909312 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/vdc doesn't contain a valid partition table
$ lsblk -lab
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
ram0 1:0 0 67108864 0 disk
ram1 1:1 0 67108864 0 disk
ram2 1:2 0 67108864 0 disk
ram3 1:3 0 67108864 0 disk
ram4 1:4 0 67108864 0 disk
ram5 1:5 0 67108864 0 disk
ram6 1:6 0 67108864 0 disk
ram7 1:7 0 67108864 0 disk
ram8 1:8 0 67108864 0 disk
ram9 1:9 0 67108864 0 disk
ram10 1:10 0 67108864 0 disk
ram11 1:11 0 67108864 0 disk
ram12 1:12 0 67108864 0 disk
ram13 1:13 0 67108864 0 disk
ram14 1:14 0 67108864 0 disk
ram15 1:15 0 67108864 0 disk
loop0 7:0 0 0 loop
loop1 7:1 0 0 loop
loop2 7:2 0 0 loop
loop3 7:3 0 0 loop
loop4 7:4 0 0 loop
loop5 7:5 0 0 loop
loop6 7:6 0 0 loop
loop7 7:7 0 0 loop
vda 253:0 0 2147483648 0 disk /
vdb 253:16 0 3221225472 0 disk /mnt
vdc 253:32 0 465567744 0 disk
sr0 11:0 1 432128 0 rom
- Interesting database bits
MariaDB [nova]> select * from block_device_mapping where deleted = 0\G
*************************** 1. row ***************************
created_at: 2016-04-15 23:08:53
updated_at: NULL
deleted_at: NULL
id: 27
device_name: NULL
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: NULL
no_device: 0
connection_info: NULL
instance_uuid: 3ef8fd4f-ac12-4aec-9187-611d5137a996
deleted: 0
source_type: image
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: NULL
boot_index: 0
image_id: ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a
tag: NULL
*************************** 2. row ***************************
created_at: 2016-04-15 23:12:39
updated_at: NULL
deleted_at: NULL
id: 46
device_name: NULL
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: NULL
no_device: 0
connection_info: NULL
instance_uuid: 94c69aca-48c5-4913-8904-48af76bdf5c6
deleted: 0
source_type: image
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: NULL
boot_index: 0
image_id: ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a
tag: NULL
*************************** 3. row ***************************
created_at: 2016-04-15 23:40:31
updated_at: NULL
deleted_at: NULL
id: 92
device_name: /dev/vda
delete_on_termination: 1
snapshot_id: f3e80e0a-7891-4692-b0a2-4e14c0828537
volume_id: NULL
volume_size: 1
no_device: 0
connection_info: NULL
instance_uuid: e7b1e882-dabc-4991-a0d5-4bf5259f2818
deleted: 0
source_type: snapshot
destination_type: volume
guest_format: NULL
device_type: disk
disk_bus: virtio
boot_index: 0
image_id: NULL
tag: NULL
*************************** 4. row ***************************
created_at: 2016-04-16 00:02:45
updated_at: NULL
deleted_at: NULL
id: 119
device_name: /dev/vda
delete_on_termination: 1
snapshot_id: 55dea145-1433-406f-915c-72dc614f02ab
volume_id: NULL
volume_size: 1
no_device: 0
connection_info: NULL
instance_uuid: 36bd363f-7109-40b4-ad9c-1861abe5121a
deleted: 0
source_type: snapshot
destination_type: volume
guest_format: NULL
device_type: disk
disk_bus: virtio
boot_index: 0
image_id: NULL
tag: NULL
*************************** 5. row ***************************
created_at: 2016-04-22 07:46:34
updated_at: 2016-04-22 07:46:35
deleted_at: NULL
id: 133
device_name: /dev/vda
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: NULL
no_device: 0
connection_info: NULL
instance_uuid: 738793f8-e18a-4a1e-abba-d35a839a3ab8
deleted: 0
source_type: image
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: NULL
boot_index: 0
image_id: ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a
tag: NULL
*************************** 6. row ***************************
created_at: 2016-04-22 07:46:34
updated_at: 2016-04-22 07:46:35
deleted_at: NULL
id: 134
device_name: /dev/vdb
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: 3
no_device: 0
connection_info: NULL
instance_uuid: 738793f8-e18a-4a1e-abba-d35a839a3ab8
deleted: 0
source_type: blank
destination_type: local
guest_format: NULL
device_type: disk
disk_bus: virtio
boot_index: -1
image_id: NULL
tag: NULL
*************************** 7. row ***************************
created_at: 2016-04-22 07:46:34
updated_at: 2016-04-22 07:46:35
deleted_at: NULL
id: 135
device_name: /dev/vdc
delete_on_termination: 1
snapshot_id: NULL
volume_id: NULL
volume_size: 444
no_device: 0
connection_info: NULL
instance_uuid: 738793f8-e18a-4a1e-abba-d35a839a3ab8
deleted: 0
source_type: blank
destination_type: local
guest_format: swap
device_type: disk
disk_bus: virtio
boot_index: -1
image_id: NULL
tag: NULL
7 rows in set (0.00 sec)
$ nova list
+--------------------------------------+------------+--------+------------+-------------+--------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+--------+------------+-------------+--------------------+
| 16451180-3336-4f78-a04f-aa97c43139c6 | instance-1 | ACTIVE | - | Running | private=10.0.0.111 |
| 75dc9c0b-b78e-475b-a039-f9b950fe83ed | instance-2 | ACTIVE | - | Running | private=10.0.0.112 |
| 4f234773-11fe-4f88-95c9-39e90b0cff7d | instance-3 | ACTIVE | - | Running | private=10.0.0.113 |
+--------------------------------------+------------+--------+------------+-------------+--------------------+
$ nova show 16451180-3336-4f78-a04f-aa97c43139c6
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000075 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-ty7lln6f |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-04-20T09:45:39.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-20T09:45:32Z |
| description | instance-1 |
| flavor | m1.nano (42) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 16451180-3336-4f78-a04f-aa97c43139c6 |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-1 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.111 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-20T09:45:40Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
$ ls -lah /opt/stack/data/nova/instances/
total 36K
drwxr-xr-x. 8 diana root 4.0K Apr 20 04:49 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 18:01 ..
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:45 16451180-3336-4f78-a04f-aa97c43139c6
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:49 4f234773-11fe-4f88-95c9-39e90b0cff7d
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:47 75dc9c0b-b78e-475b-a039-f9b950fe83ed
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 _base
-rw-rw-r--. 1 diana libvirtd 43 Apr 21 02:33 compute_nodes
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 locks
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 19:01 snapshots
$ ls -lah /opt/stack/data/nova/instances/_base/
total 33M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 .
drwxr-xr-x. 8 diana root 4.0K Apr 20 04:49 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 21 02:33 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 21 02:33 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 21 02:33 eba9647fc092586c584b809eb350f030751d9460
$ ls -lah /opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:45 .
drwxr-xr-x. 8 diana root 4.0K Apr 20 04:49 ..
-rw-rw----. 1 qemu qemu 20K Apr 20 04:45 console.log
-rw-r--r--. 1 qemu qemu 11M Apr 21 02:54 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 20 04:45 disk.config
-rw-r--r--. 1 diana libvirtd 347 Apr 20 04:45 disk.info
-rw-rw-r--. 1 qemu qemu 4.8M Apr 20 04:45 kernel
-rw-rw-r--. 1 diana libvirtd 3.0K Apr 20 04:45 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 20 04:45 ramdisk
$ nova flavor-show m1.nano
+----------------------------+---------+
| Property | Value |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 0 |
| extra_specs | {} |
| id | 42 |
| name | m1.nano |
| os-flavor-access:is_public | True |
| ram | 64 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+---------+
$ nova flavor-show m1.tiny
+----------------------------+---------+
| Property | Value |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 1 |
| extra_specs | {} |
| id | 1 |
| name | m1.tiny |
| os-flavor-access:is_public | True |
| ram | 512 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+---------+
$ nova resize instance-1 m1.tiny --poll
Server resizing... 100% complete
Finished
$ nova show 16451180-3336-4f78-a04f-aa97c43139c6
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000075 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-ty7lln6f |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | resized |
| OS-SRV-USG:launched_at | 2016-04-21T08:29:32.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-20T09:45:32Z |
| description | instance-1 |
| flavor | m1.tiny (1) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | 16451180-3336-4f78-a04f-aa97c43139c6 |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-1 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.111 |
| progress | 0 |
| security_groups | default |
| status | VERIFY_RESIZE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-21T08:29:32Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
==========> cirros guest (before & after resize)
$ df -h
Filesystem Size Used Available Use% Mounted on
/dev 21.2M 0 21.2M 0% /dev
/dev/vda 23.2M 9.6M 12.4M 44% /
tmpfs 24.8M 0 24.8M 0% /dev/shm
tmpfs 200.0K 108.0K 92.0K 54% /run
$ ssh [email protected]
[email protected]'s password:
$ df -h
Filesystem Size Used Available Use% Mounted on
/dev 242.2M 0 242.2M 0% /dev
/dev/vda 23.2M 9.6M 12.4M 44% /
tmpfs 245.8M 0 245.8M 0% /dev/shm
tmpfs 200.0K 104.0K 96.0K 52% /run
<==========
$ ls -lah /opt/stack/data/nova/instances/_base/
total 33M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 .
drwxr-xr-x. 9 diana root 4.0K Apr 21 03:29 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 21 03:15 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 21 03:29 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 21 03:29 eba9647fc092586c584b809eb350f030751d9460
$ ls -lah /opt/stack/data/nova/instances
total 40K
drwxr-xr-x. 9 diana root 4.0K Apr 21 03:29 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 18:01 ..
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 03:29 16451180-3336-4f78-a04f-aa97c43139c6
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:45 16451180-3336-4f78-a04f-aa97c43139c6_resize
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:49 4f234773-11fe-4f88-95c9-39e90b0cff7d
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:47 75dc9c0b-b78e-475b-a039-f9b950fe83ed
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 _base
-rw-rw-r--. 1 diana libvirtd 42 Apr 21 03:15 compute_nodes
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 locks
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 19:01 snapshots
$ ls -lah /opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6_resize/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:45 .
drwxr-xr-x. 9 diana root 4.0K Apr 21 03:29 ..
-rw-rw----. 1 root root 20K Apr 21 03:29 console.log
-rw-r--r--. 1 root root 11M Apr 21 03:29 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 20 04:45 disk.config
-rw-r--r--. 1 diana libvirtd 347 Apr 20 04:45 disk.info
-rw-rw-r--. 1 qemu qemu 4.8M Apr 20 04:45 kernel
-rw-rw-r--. 1 diana libvirtd 3.0K Apr 20 04:45 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 20 04:45 ramdisk
$ nova list
+--------------------------------------+------------+---------------+------------+-------------+--------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+---------------+------------+-------------+--------------------+
| 16451180-3336-4f78-a04f-aa97c43139c6 | instance-1 | VERIFY_RESIZE | - | Running | private=10.0.0.111 |
| 75dc9c0b-b78e-475b-a039-f9b950fe83ed | instance-2 | ACTIVE | - | Running | private=10.0.0.112 |
| 4f234773-11fe-4f88-95c9-39e90b0cff7d | instance-3 | ACTIVE | - | Running | private=10.0.0.113 |
+--------------------------------------+------------+---------------+------------+-------------+--------------------+
$ nova resize-confirm instance-1
$ nova list
+--------------------------------------+------------+--------+------------+-------------+--------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+--------+------------+-------------+--------------------+
| 16451180-3336-4f78-a04f-aa97c43139c6 | instance-1 | ACTIVE | - | Running | private=10.0.0.111 |
| 75dc9c0b-b78e-475b-a039-f9b950fe83ed | instance-2 | ACTIVE | - | Running | private=10.0.0.112 |
| 4f234773-11fe-4f88-95c9-39e90b0cff7d | instance-3 | ACTIVE | - | Running | private=10.0.0.113 |
+--------------------------------------+------------+--------+------------+-------------+--------------------+
$ ls -lah /opt/stack/data/nova/instances
total 36K
drwxr-xr-x. 8 diana root 4.0K Apr 21 03:59 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 18:01 ..
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 03:29 16451180-3336-4f78-a04f-aa97c43139c6
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:49 4f234773-11fe-4f88-95c9-39e90b0cff7d
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 04:47 75dc9c0b-b78e-475b-a039-f9b950fe83ed
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 _base
-rw-rw-r--. 1 diana libvirtd 44 Apr 21 03:55 compute_nodes
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 locks
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 19:01 snapshots
$ ls -lah /opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 03:29 .
drwxr-xr-x. 8 diana root 4.0K Apr 21 03:59 ..
-rw-rw----. 1 qemu qemu 19K Apr 21 03:29 console.log
-rw-r--r--. 1 qemu qemu 11M Apr 21 03:32 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 21 03:29 disk.config
-rw-r--r--. 1 diana libvirtd 347 Apr 21 03:29 disk.info
-rw-rw-r--. 1 qemu qemu 4.8M Apr 21 03:29 kernel
-rw-rw-r--. 1 diana libvirtd 3.0K Apr 21 03:29 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 21 03:29 ramdisk
$ ls -lah /opt/stack/data/nova/instances/_base/
total 33M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 20 01:11 .
drwxr-xr-x. 8 diana root 4.0K Apr 21 03:59 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 21 03:55 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 21 03:55 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 21 03:55 eba9647fc092586c584b809eb350f030751d9460
$ cat /opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/disk.info
{
"/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/disk": "qcow2",
"/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/disk.config": "raw",
"/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/kernel": "raw",
"/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/ramdisk": "raw"
}
$ cat /opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/libvirt.xml
<domain type="qemu">
<uuid>16451180-3336-4f78-a04f-aa97c43139c6</uuid>
<name>instance-00000075</name>
<memory>524288</memory>
<vcpu>1</vcpu>
<metadata>
<nova:instance xmlns:nova="http://openstack.org/xmlns/libvirt/nova/1.0">
<nova:package version="13.0.1"/>
<nova:name>instance-1</nova:name>
<nova:creationTime>2016-04-21 08:29:29</nova:creationTime>
<nova:flavor name="m1.tiny">
<nova:memory>512</nova:memory>
<nova:disk>1</nova:disk>
<nova:swap>0</nova:swap>
<nova:ephemeral>0</nova:ephemeral>
<nova:vcpus>1</nova:vcpus>
</nova:flavor>
<nova:owner>
<nova:user uuid="d83e39dacfc549449c58987c3c99d379">admin</nova:user>
<nova:project uuid="162df2e9319041029c8886f07911e9c7">admin</nova:project>
</nova:owner>
<nova:root type="image" uuid="ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a"/>
</nova:instance>
</metadata>
<sysinfo type="smbios">
<system>
<entry name="manufacturer">OpenStack Foundation</entry>
<entry name="product">OpenStack Nova</entry>
<entry name="version">13.0.1</entry>
<entry name="serial">5cd17f94-687c-43ff-9ed2-733913575a4e</entry>
<entry name="uuid">16451180-3336-4f78-a04f-aa97c43139c6</entry>
<entry name="family">Virtual Machine</entry>
</system>
</sysinfo>
<os>
<type>hvm</type>
<kernel>/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/kernel</kernel>
<initrd>/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/ramdisk</initrd>
<cmdline>root=/dev/vda console=tty0 console=ttyS0 no_timer_check</cmdline>
<smbios mode="sysinfo"/>
</os>
<features>
<acpi/>
<apic/>
</features>
<cputune>
<shares>1024</shares>
</cputune>
<clock offset="utc"/>
<cpu match="exact">
<topology sockets="1" cores="1" threads="1"/>
</cpu>
<devices>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/disk"/>
<target bus="virtio" dev="vda"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw" cache="none"/>
<source file="/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/disk.config"/>
<target bus="ide" dev="hdd"/>
</disk>
<interface type="bridge">
<mac address="fa:16:3e:2c:48:e9"/>
<model type="virtio"/>
<driver name="qemu"/>
<source bridge="br100"/>
<filterref filter="nova-instance-instance-00000075-fa163e2c48e9"/>
</interface>
<serial type="file">
<source path="/opt/stack/data/nova/instances/16451180-3336-4f78-a04f-aa97c43139c6/console.log"/>
</serial>
<serial type="pty"/>
<graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/>
<video>
<model type="cirrus"/>
</video>
<memballoon model="virtio">
<stats period="10"/>
</memballoon>
</devices>
</domain>
- Now play with swap and ephemeral disks
$ nova flavor-show m1.micro
+----------------------------+--------------------------------------+
| Property | Value |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 3 |
| disk | 2 |
| extra_specs | {} |
| id | a08ce472-c6bf-41bb-8a06-f0c7d54a3d36 |
| name | m1.micro |
| os-flavor-access:is_public | True |
| ram | 128 |
| rxtx_factor | 1.0 |
| swap | 4 |
| vcpus | 1 |
+----------------------------+--------------------------------------+
$ nova list
+--------------------------------------+------------+--------+------------+-------------+--------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+--------+------------+-------------+--------------------+
| 16451180-3336-4f78-a04f-aa97c43139c6 | instance-1 | ACTIVE | - | Running | private=10.0.0.111 |
| f8761e9b-515b-4415-b6da-7300056e4194 | instance-4 | ACTIVE | - | Running | private=10.0.0.114 |
+--------------------------------------+------------+--------+------------+-------------+--------------------+
$ nova show f8761e9b-515b-4415-b6da-7300056e4194
+--------------------------------------+----------------------------------------------------------------+
| Property | Value |
+--------------------------------------+----------------------------------------------------------------+
| OS-DCF:diskConfig | AUTO |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | localhost.localdomain |
| OS-EXT-SRV-ATTR:hostname | instance-4 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | localhost.localdomain |
| OS-EXT-SRV-ATTR:instance_name | instance-00000078 |
| OS-EXT-SRV-ATTR:kernel_id | 08c625c9-e0d8-4197-bf13-e8ec3cbed615 |
| OS-EXT-SRV-ATTR:launch_index | 0 |
| OS-EXT-SRV-ATTR:ramdisk_id | 5e6b021a-2e7d-4193-a0c8-1c6fa298510d |
| OS-EXT-SRV-ATTR:reservation_id | r-0zohcmt9 |
| OS-EXT-SRV-ATTR:root_device_name | /dev/vda |
| OS-EXT-SRV-ATTR:user_data | - |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2016-04-21T10:48:28.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2016-04-21T10:48:16Z |
| description | instance-4 |
| flavor | m1.micro (a08ce472-c6bf-41bb-8a06-f0c7d54a3d36) |
| hostId | 11f262edbfd66aeac438df805e1c53edfb32d0dc451c05eb767c9dbd |
| host_status | UP |
| id | f8761e9b-515b-4415-b6da-7300056e4194 |
| image | cirros-0.3.4-x86_64-uec (ec3cbb5e-0ce8-4faa-96bd-cfa385122d9a) |
| key_name | - |
| locked | False |
| metadata | {} |
| name | instance-4 |
| os-extended-volumes:volumes_attached | [] |
| private network | 10.0.0.114 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 162df2e9319041029c8886f07911e9c7 |
| updated | 2016-04-21T10:48:28Z |
| user_id | d83e39dacfc549449c58987c3c99d379 |
+--------------------------------------+----------------------------------------------------------------+
$ ls -lah /opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/
total 20M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 05:48 .
drwxr-xr-x. 7 diana root 4.0K Apr 21 05:48 ..
-rw-rw----. 1 qemu qemu 20K Apr 21 05:48 console.log
-rw-r--r--. 1 qemu qemu 11M Apr 21 05:49 disk
-rw-rw-r--. 1 qemu qemu 422K Apr 21 05:48 disk.config
-rw-r--r--. 1 qemu qemu 384K Apr 21 05:48 disk.eph0
-rw-r--r--. 1 diana libvirtd 527 Apr 21 05:48 disk.info
-rw-r--r--. 1 qemu qemu 193K Apr 21 05:48 disk.swap
-rw-rw-r--. 1 qemu qemu 4.8M Apr 21 05:48 kernel
-rw-rw-r--. 1 diana libvirtd 3.5K Apr 21 05:48 libvirt.xml
-rw-rw-r--. 1 qemu qemu 3.6M Apr 21 05:48 ramdisk
$ ls -lah /opt/stack/data/nova/instances/_base/
total 98M
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 05:48 .
drwxr-xr-x. 7 diana root 4.0K Apr 21 05:48 ..
-rw-rw-r--. 1 qemu qemu 24M Apr 21 05:48 04faffa97ef02f0459451a02b56cbac0090cef27
-rw-rw-r--. 1 diana libvirtd 4.8M Apr 21 05:48 2a8b2549de39c18ef6f7c895272708afb26a8918
-rw-rw-r--. 1 diana libvirtd 3.6M Apr 21 05:48 eba9647fc092586c584b809eb350f030751d9460
-rw-r--r--. 1 qemu qemu 3.0G Apr 21 05:48 ephemeral_3_40d1d2c
-rw-r--r--. 1 qemu qemu 4.0M Apr 21 05:48 swap_4
$ ls -lah /opt/stack/data/nova/instances/
total 32K
drwxr-xr-x. 7 diana root 4.0K Apr 21 05:48 .
drwxr-xr-x. 5 diana root 4.0K Apr 15 18:01 ..
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 03:29 16451180-3336-4f78-a04f-aa97c43139c6
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 05:48 _base
-rw-rw-r--. 1 diana libvirtd 43 Apr 21 05:16 compute_nodes
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 05:48 f8761e9b-515b-4415-b6da-7300056e4194
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 21 05:48 locks
drwxrwxr-x. 2 diana libvirtd 4.0K Apr 15 19:01 snapshots
$ cat /opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/disk.info | python -m json.tool
{
"/opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/disk": "qcow2",
"/opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/disk.config": "raw",
"/opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/disk.eph0": "qcow2",
"/opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/disk.swap": "qcow2",
"/opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/kernel": "raw",
"/opt/stack/data/nova/instances/f8761e9b-515b-4415-b6da-7300056e4194/ramdisk": "raw"
}
$ ssh [email protected]
$ df -h
Filesystem Size Used Available Use% Mounted on
/dev 53.2M 0 53.2M 0% /dev
/dev/vda 23.2M 9.6M 12.4M 44% /
tmpfs 56.8M 0 56.8M 0% /dev/shm
tmpfs 200.0K 108.0K 92.0K 54% /run
/dev/vdb 3.0G 68.5M 2.7G 2% /mnt