1.修改浮动ip
mysql> select id,address from floating_ips limit 5;
+-----+--------------+
| id | address |
+-----+--------------+
| 2 | 10.3.0.67 |
| 1 | 10.3.1.66 |
| 10 | 172.24.4.10 |
| 100 | 172.24.4.100 |
| 101 | 172.24.4.101 |
+-----+--------------+
mysql> update floating_ips set address="10.3.1.68" where address="172.24.4.10";
mysql> select id,address from floating_ips limit 5;
+-----+--------------+
| id | address |
+-----+--------------+
| 2 | 10.3.0.67 |
| 1 | 10.3.1.66 |
| 10 | 10.3.1.68 |
| 100 | 172.24.4.100 |
| 101 | 172.24.4.101 |
+-----+--------------+
2
.添加keypair
nova keypair-add mykey > mykey.priv
vim mykey.priv
chmod 600 mykey.priv
mv mykey.priv ~/.ssh/
ssh -i ~/.ssh/mykey.priv fedora@10.3.0.67
mysql> select * from key_pairs;
+---------------------+------------+---------------------+----+-------+----------------------------------+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+
| created_at | updated_at | deleted_at | id | name | user_id | fingerprint | public_key | deleted |
+---------------------+------------+---------------------+----+-------+----------------------------------+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+
| 2014-05-09 08:49:24 | NULL | 2014-05-12 03:12:19 | 1 | kkkk | b02cba4cbca643e59cfea4095854e696 | e8:a8:fd:0e:5a:55:4e:81:01:c0:dd:db:a3:d2:61:15 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3m7CjoIr1jUW4J1KQimB8+dOiNrcsTbUUbXkXF9+EErB2x3iqbTXL9aa9z6CGjghF4mXMBxV4DROb6kep+L1MdomovL0Rj2CUs8/97tTD30hBxnvbapTWwFgXX2dDJJxbjWX3qF9Engtrh5jM2gqqP1flSfM5jno3Ei7V/dn0Y4EFVoIz9OTXL9xi67hMKuNRdRIVzWlhlUYK8xwWdzL6UI4VsZmS5Mf3q+sVKPRKL/BxwQMX3J7TIjRR6yAI4ScP0MuQtXl2uxt7vWDMXA+i9h/n9yWDAh86rJ/mJ+tbK60kxGufUAZEkEID3daGjB5JCS0YNTkzynnP1PfjQ7dVQ== Generated by Nova
| 1 |
| 2014-05-12 03:08:55 | NULL | NULL | 2 | mykey | b02cba4cbca643e59cfea4095854e696 | 3b:7e:a5:bf:f6:01:b1:f9:fd:3f:20:77:08:03:3f:84 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAp8H2xWjLczAIn3yMwphl+5KXmsPC63gFOZzvjdwvA147Nhg/paTpqUgwGtmvj70Ld1e9Eu73ypEmceyQHEwbphY1DZ50xltJW+ccjKRLAx0z+0xJv94BPjGR6gO4K7+FQQ38r72IPCZ8JpbS/CpMEbX9+4uDiJbb/ukrMWSLF8TgJyCC5ARwrppF/IhU1FJ9fNWOzTyKpcKrRCIufyrQHlMPcEhWIwvNp3EEJqA953iaulI+95GOhar77/pYPT02m1BaBdK7iTdLFzxj+D+jYRlvSMtIylDqROARtDHu9OgYnK1ul+aqAh3VmV+jJJhT29eFMjWO1SkAONMnRmVg8Q== Generated by Nova
| 0 |
+---------------------+------------+---------------------+----+-------+----------------------------------+-------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+
3
.添加云硬盘
[fedora@myvm6 ~]$ sudo fdisk -l
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 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
Disklabel type: dos
Disk identifier: 0x000afe8f
Device Boot Start End Blocks Id System
/dev/vda1 * 1953 41942989 20970518+ 83 Linux
Disk /dev/vdb: 1 GiB, 1073741824 bytes, 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
[fedora@myvm6 ~]$ sudo fdisk /dev/vdb
Welcome to fdisk (util-linux 2.24).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xffec15f3.
Command (m for help): p
Disk /dev/vdb: 1 GiB, 1073741824 bytes, 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
Disklabel type: dos
Disk identifier: 0xffec15f3
[fedora@myvm6 ~]$ sudo mkfs.ext4 /dev/vdb
[fedora@myvm6 ~]$ sudo mount /dev/vdb /data
[fedora@myvm6 ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 20G 575M 20G 3% /
devtmpfs 994M 0 994M 0% /dev
tmpfs 1002M 0 1002M 0% /dev/shm
tmpfs 1002M 17M 986M 2% /run
tmpfs 1002M 0 1002M 0% /sys/fs/cgroup
/dev/vdb 976M 1.3M 908M 1% /data
[fedora@myvm6 ~]$ cat /etc/fstab
UUID=d355e4e0-5805-45a4-a04c-cd4675044207 / ext4 defaults,noatime 0 0
/dev/vdb /data ext4 defaults 0 0
4.安全规则对比
|
入口
|
-
|
ICMP
|
-1 (ALL ICMP)
|
0.0.0.0/0 (CIDR)
|
删除 规则
|
|
入口
|
-
|
TCP
|
1 - 65535
|
0.0.0.0/0 (CIDR)
|
删除 规则
|
mysql> select * from security_group_rules;
+---------------------+------------+---------------------+----+-----------------+----------+-----------+---------+-----------+----------+---------+
| created_at | updated_at | deleted_at | id | parent_group_id | protocol | from_port | to_port | cidr | group_id | deleted |
+---------------------+------------+---------------------+----+-----------------+----------+-----------+---------+-----------+----------+---------+
| 2014-04-28 09:00:49 | NULL | 2014-05-09 08:53:16 | 1 | 2 | tcp | 1 | 65535 | 0.0.0.0/0 | NULL | 1 |
| 2014-04-28 09:00:59 | NULL | 2014-05-09 08:53:18 | 2 | 2 | udp | 1 | 65535 | 0.0.0.0/0 | NULL | 2 |
| 2014-04-28 09:01:05 | NULL | 2014-05-09 08:53:20 | 3 | 2 | icmp | -1 | -1 | 0.0.0.0/0 | NULL | 3 |
| 2014-05-09 08:53:47 | NULL | 2014-05-09 08:54:48 | 4 | 2 | icmp | -1 | -1 | NULL | 1 | 4 |
| 2014-05-09 08:55:01 | NULL | 2014-05-12 03:26:58 | 5 | 1 | icmp | -1 | -1 | 0.0.0.0/0 | NULL | 5 |
| 2014-05-09 08:55:15 | NULL | 2014-05-12 03:27:08 | 6 | 1 | icmp | -1 | -1 | NULL | 1 | 6 |
| 2014-05-12 03:27:35 | NULL | 2014-05-12 03:27:44 | 7 | 1 | icmp | -1 | -1 | NULL | 1 | 7 |
| 2014-05-12 03:27:50 | NULL | NULL | 8 | 1 | icmp | -1 | -1 | 0.0.0.0/0 | NULL | 0 |
| 2014-05-12 03:28:00 | NULL | NULL | 9 | 1 | tcp | 1 | 65535 | 0.0.0.0/0 | NULL | 0 |
+---------------------+------------+---------------------+----+-----------------+----------+-----------+---------+-----------+----------+---------+
阅读(1538) | 评论(0) | 转发(0) |