[英]ovf from an existing virtual machine in OpenStack
Is it possible to get a virtual machine container* from OpenStack? 是否可以从OpenStack获取虚拟机容器*? How? 怎么样? I'm specially interested to get the container in ovf format. 我特别想获得ovf格式的容器。
*The container format refers to whether the virtual machine image is in a file format that also contains metadata about the actual virtual machine. *容器格式是指虚拟机映像是否为文件格式,其中还包含有关实际虚拟机的元数据。 ( http://docs.openstack.org/developer/glance/formats.html?highlight=ovf ) ( http://docs.openstack.org/developer/glance/formats.html?highlight=ovf )
ovf doesn't seem to be supported but vdi is, which is the Virtualbox disk image format. 似乎不支持ovf,但支持vdi,这是Virtualbox磁盘映像格式。 So if your goal is to import the openstack virtual machine into Virtualbox you could also probably do the following (Doesn't Virtualbox support qcow2 disk images out of the box?): 因此,如果您的目标是将openstack虚拟机导入Virtualbox,则还可以执行以下操作(Virtualbox是否不支持qcow2磁盘映像?):
I've made the following assumptions: You're not using cinder as storage for the virtual machine you are trying to import into VirtualBox. 我做了以下假设:您没有将cinder用作要导入VirtualBox的虚拟机的存储。
First we need to get the instance name of the virtual machine you want to import: 首先,我们需要获取要导入的虚拟机的实例名称:
nova list
nova show <uuid of instance you want to export>
# Note down the name of the instance which should be something like instance-00000xx
Now we need to go the actual place where the instance is being stored 现在我们需要转到实例存储的实际位置
cd /var/lib/nova/instances/instance-00000xx # change this to actual instance name
qemu-img convert -O vdi disk virtual-box-disk.vdi
Now you can go to Create a new virtual machine and choose use existing disk: virtual-box-disk.vdi. 现在,您可以转到“创建新的虚拟机”,然后选择“使用现有磁盘”:virtual-box-disk.vdi。
Haven't verified yet if this will work. 尚未验证是否可行。 Also the paths may be different if you are in devstack or on a different OS. 另外,如果您在devstack中或在其他OS上,则路径可能会不同。
In Icehouse the steps are slightly different: 在Icehouse中,步骤略有不同:
$ nova list --all-tenants | grep somevm
| 1aa2252f-cc62-4581-94a6-73a836e5491c | somvm | 63ce0c9526474e34b59fbcf6bb8b9cc2 | ACTIVE | - | Running | qalt-net=192.168.122.30, 10.128.13.171 |
You can then take the first field which is the VM's ID and it's present in this directory: /var/lib/nova/instances
. 然后,您可以获取第一个字段,即VM的ID,该字段位于以下目录中: /var/lib/nova/instances
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.