下面是我所遵循的步骤。
$> neutron port-create int-net --mac-address 00:11:22:01:01:01 --name 1_eth0
$> cinder create --display-name disk1 100
$> nova boot --flavor iso_flavor --image iso --security-groups default --nic port-id=$(neutron port-list | grep 1_eth0 | awk '{print $2}') --block-device source=volume,dest=volume,id=$(cinder list | grep disk1 | awk '{print $2}'),bus=virtio,bootindex=1,type=disk ISO_VM
$> nova delete ISO_VM
$> neutron port-create int-net --mac-address 00:11:22:01:01:01 --name 1_eth0
$> nova boot --flavor iso_flavor --security-groups default --nic port-id=$(neutron port-list | grep 1_eth0 | awk '{print $2}') --block-device-mapping vda=$(cinder list | grep disk1 | awk '{print $2}') ISO_FROM_VOLUME
在启动虚拟机后,如果我们触摸文件并重新启动,则更改将不存在。那些东西都丢了。
发布于 2014-11-26 20:28:58
如果你想持久化这些更改,最好使用“从快照启动”。
1)安装和配置操作系统。
2)创建快照使用
nova image-create --poll myInstance myInstanceSnapshot
3)验证依据
nova image-list
4)您可以通过以下方式从快照启动。
nova boot --flavor m1.tiny --image myInstanceSnapshot myNewInstance
https://stackoverflow.com/questions/27141791
复制相似问题