简体   繁体   English

OpenStack中现有虚拟机的ovf

[英]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.

相关问题 从Azure VM到ovf - From Azure VM to ovf 如何从外部网络访问本地计算机上的Openstack? - How to Access Openstack on my local machine from External network? 无法从外部网络 ping OpenStack 机器的实例 - Cannot ping instances of OpenStack machine from external net openstack是哪一个宝库? 数据库即服务解决方案还是虚拟机映像数据库? - Which one trove openstack is? a database as a service solution or a virtual machine image database? 从PHP创建Google Cloud虚拟机 - Create Google Cloud Virtual Machine from PHP 有什么方法可以将 PrivateIP 从主机的机器网络子网分配给 Openstack 实例 - Is there any way I can allocate PrivateIP from my Host's Machine network subnet to an Openstack instance OpenStack + OpenContrail:在将OpenContrail与现有Openstack集成之前,是否需要确保OpenStack网络状态干净? - OpenStack+OpenContrail: Do I need to ensure OpenStack network state is clean before integrate OpenContrail with an existing Openstack? (Python虚拟测试环境)doc openstack - (Python virtual test environment) doc openstack Azure 虚拟机,无法上网 - Azure virtual machine, can't access from internet Azure将vm agent添加到通过特殊VHD创建的虚拟机 - Azure add vm agent to Virtual machine created from special VHD
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM