阅读

云主机转移

ubuntu  2019-12-26 14:27

云主机转移

给云主机创建一个快照(得到$snapshot_id)

glance image-create $server_id $snapshot_name

新建一个镜像文件(例如:/root/test.img)

kvm-img create -f qcow2 /root/test.img 20G

下载镜像

glance image-download --file /root/test.img $snapshot_id

将镜像上传到指定的物理机上(例如/home/qy/test.img),然后上传到openstack

glance add name="test" is_public=false disk_format=qcow2 container_format=ovf < /home/qy/test.img


给云主机创建一个快照(得到$snapshot_id)

nova image-create $server_id $snapshot_name

新建一个镜像文件(例如:/root/test.img)

kvm-img create -f qcow2 /root/test.img 20G

下载镜像

glance image-download --file /root/test.img $snapshot_id

将镜像上传到指定的物理机上(例如/home/qy/test.img),然后上传到openstack

glance add name="test" is_public=true disk_format=qcow2 container_format=ovf < /home/qy/test.img