Quantcast
Channel: Ask OpenStack: Q&A Site for OpenStack Users and Developers - Individual question feed
Viewing all articles
Browse latest Browse all 7

Comment by dbaxps for Hi, my problem, i got a couple of KVM/Qemu virtual machines running on some old server backed in local lvm storage. In paralell, i got a newly deployed openstack private cloud with cinder/ceph as storage backend. Now i somehow like to migrate these VMs from the old infrastructure to the new. I general it is very easy to just run the VMs on the openstack server, just: dd if=the_lvm_volume | pv | ssh storage_node 'rbd -p my_volume_pool import - new_volume' And then start a VM from this volume, e.g. using virsh. But this way, the volume is not recognized by cinder and the vm not by nova. Therefore i could not manage it with openstack. It worked to import the volume as glance image and then start a machine from this image. But i like to have it as volume not image, especially because some of the VMs i like to migrate have multiple volumes attached to the VM. And doing all via glance is a whole bunch of extra work. I also tried to just create a volume in cinder, same size as the original volume and import to that volume but unfortunately rbd does not allow to import to an existing volume. Would it make sense to create a volume in cinder, delete it with rbd and import to a new volume with the same name? UPDATE: Ok tested this option and it seemed to work. Created a volume (Size of the volume to import) in cinder, get the uuid of the volume then delete the corresponding volume in ceph manually using rbd. Then i did the rbd import with destination of the delete volume and made it bootable. Afterwards i was able to use this volume to start an instance using nova. A litte dirty workaround but it seems to do the job. Is there any other 'recommended' way to import whole VMs to a openstack environment? Thx Stefan

Next: Comment by schegi for Hi, my problem, i got a couple of KVM/Qemu virtual machines running on some old server backed in local lvm storage. In paralell, i got a newly deployed openstack private cloud with cinder/ceph as storage backend. Now i somehow like to migrate these VMs from the old infrastructure to the new. I general it is very easy to just run the VMs on the openstack server, just: dd if=the_lvm_volume | pv | ssh storage_node 'rbd -p my_volume_pool import - new_volume' And then start a VM from this volume, e.g. using virsh. But this way, the volume is not recognized by cinder and the vm not by nova. Therefore i could not manage it with openstack. It worked to import the volume as glance image and then start a machine from this image. But i like to have it as volume not image, especially because some of the VMs i like to migrate have multiple volumes attached to the VM. And doing all via glance is a whole bunch of extra work. I also tried to just create a volume in cinder, same size as the original volume and import to that volume but unfortunately rbd does not allow to import to an existing volume. Would it make sense to create a volume in cinder, delete it with rbd and import to a new volume with the same name? UPDATE: Ok tested this option and it seemed to work. Created a volume (Size of the volume to import) in cinder, get the uuid of the volume then delete the corresponding volume in ceph manually using rbd. Then i did the rbd import with destination of the delete volume and made it bootable. Afterwards i was able to use this volume to start an instance using nova. A litte dirty workaround but it seems to do the job. Is there any other 'recommended' way to import whole VMs to a openstack environment? Thx Stefan
Previous: Comment by dbaxps for Hi, my problem, i got a couple of KVM/Qemu virtual machines running on some old server backed in local lvm storage. In paralell, i got a newly deployed openstack private cloud with cinder/ceph as storage backend. Now i somehow like to migrate these VMs from the old infrastructure to the new. I general it is very easy to just run the VMs on the openstack server, just: dd if=the_lvm_volume | pv | ssh storage_node 'rbd -p my_volume_pool import - new_volume' And then start a VM from this volume, e.g. using virsh. But this way, the volume is not recognized by cinder and the vm not by nova. Therefore i could not manage it with openstack. It worked to import the volume as glance image and then start a machine from this image. But i like to have it as volume not image, especially because some of the VMs i like to migrate have multiple volumes attached to the VM. And doing all via glance is a whole bunch of extra work. I also tried to just create a volume in cinder, same size as the original volume and import to that volume but unfortunately rbd does not allow to import to an existing volume. Would it make sense to create a volume in cinder, delete it with rbd and import to a new volume with the same name? UPDATE: Ok tested this option and it seemed to work. Created a volume (Size of the volume to import) in cinder, get the uuid of the volume then delete the corresponding volume in ceph manually using rbd. Then i did the rbd import with destination of the delete volume and made it bootable. Afterwards i was able to use this volume to start an instance using nova. A litte dirty workaround but it seems to do the job. Is there any other 'recommended' way to import whole VMs to a openstack environment? Thx Stefan
$
0
0
When loading instance via glance image you have option (in Juno) :-
Launch via image creating volume and it works ( at least for Gluster backend, not sure about "rbd" backend for cinder)

Viewing all articles
Browse latest Browse all 7

Trending Articles