Nova image create
来源:互联网 发布:淘宝网站经营管理 编辑:程序博客网 时间:2024/06/15 20:00
QCOW2 (qemu copy-on-write)
Is one of the disk image formats supported by the QEMUprocessor emulator. It is a representation of a fixed size block device in afile. Benefits it offers over using raw dump representation include:
1. Smaller file size, even on filesystems whichdon't support holes (i.e. sparse files)
2. Copy-on-write support, where the image onlyrepresents changes made to an underlying disk image
3. Snapshot support, where the image can containmultiple snapshots of the images history
4. Optional zlib based compression
5. Optional AES encryption
The qemu-img command is the most common way of manipulatingthese images e.g.
$> qemu-imgcreate -f qcow2 test.qcow2 4G
Formating'test.qcow2', fmt=qcow2, size=4194304 kB
$> qemu-imgconvert test.qcow2 -O raw test.img
QCOW2 backing files and overlays
qcow2(qemu copy-on-write)具有创建一个base-image,以及在base-image(即backingfile)
的基础上创建多个copy-on-write overlays镜像(image)的能力.backingfiles和overlays十分有用,可以迅速的创建瘦装备虚拟机的实例,特别是在开发测试的时候可以迅速的回滚到之前的某个已知状态,丢弃overlay.如图1所示,Base_image是Snap_1的backingfile,反过来Snap_1是Base_image的overlay。
QCOW2在Openstack中的实际应用
多个VM的root disk image是基于同一个base image (backing file),公共的base image为只读的。
nova image-create
Create a new image by taking a snapshot of a running server (VM instance), and upload the newimage file to Glance.
Step1: create imagebased on Base_image: “/var/lib/nova/instances/
_base/020496fa009f00d1b1d69de8d42222b56afd9ec8”
# qemu-img create -fqcow2 backing_file=’/var/lib/nova/instances/_base/
020496fa009f00d1b1d69de8d42222b56afd9ec8’/var/lib/nova/instances/snapshots/tmpOEeP4A/2bf3a7f8d7094360824b9e14f2f48338
Step2: blockRebase cannotbe executed on persistent domains, so we need to temporarily undefine it. domain.undefine().
Step3: blockRebase();pull the entire source chain into the destination file ‘New_image(v1)’ .
Step4: convert format
# qemu-img convert -f qcow2 -O qcow2 -s 2bf3a7f8d7094360824b9e14f2f48338/var/lib/nova/instances/7bf40411-88ac-43d1-8e38-382d8af1915b/disk/var/lib/nova/instances/snapshots/tmpOEeP4A/2bf3a7f8d7094360824b9e14f2f48338
Step5: Upload toGlance
- Nova image create流程
- Nova image create
- nova create
- Nova create instnace
- Openstack Nova 源码分析 — Create instances (nova-conductor阶段)
- Create Swing Image Button
- Create Image with Reflection
- xen-create-image详解
- Create a Base Image
- Create a base image
- nova image-list 和 glance image-list 有什么区别
- create-lsb-image 错误总结
- GraphicsImg := TGPGraphics.Create(Image);
- How to create recovery image
- Create Image with useful softwares
- failed to create framebuffer image
- Docker: Create Image from Container
- nova 创建qcow2的kernel image的过程
- mysql中有外键的嵌套查询
- MLDN魔乐科技ANDROID学习笔记之【对话框】——对话框的类介绍及其学习
- Android微信分享,无响应
- 老曹的博客开始之旅
- 学硕和专硕的区别
- Nova image create
- Python中time模块详解
- 【水模拟】#67 A. Life Without Zeros
- 算法小节(一)——斐波那契数列(java实现)
- C++ 经典算法
- 第一个响应式布局的简单页面
- 结构型模式--桥模式
- 【LeetCode】Pascal's Triangle & II 解题报告
- liunx下直接通过Service重启tomcat