Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
- Original Message - Le 14/02/2013 16:43, Itamar Heim a écrit : That is exactly the case : it is indeed a pure data disk with an ext3 filesystem (no LVM, no nothing). I intend to attach it to some existing VM. I know how to convert it into qcow2 or whatever. I know how to create an additionnal disk in oVirt. I know I could trick the system by creating a disk in oVirt, then replace its content by playing with dd, or exploring LVs indide my domain master LUN. But I must admit I was dreaming of some 'official' way to do that. keith - any thoughts on ovirt-image-uploader being able to uplaod a single disk? ayal - on being able to import floating disks from the export domain rather than VMs This is indeed the ways I was expecting ovirt experts to follow :) Actually there is work being done on importing floating disks that are created directly on data domains: http://gerrit.ovirt.org/#/c/11783/ Using this method you'd be able to also avoid the double copy of the data (first to export domain then to data domain). I'm hoping this will be merged in the next few days. This too however relies on you being able to push such a disk directly into the domain (this is being done to support storage array cloning). Wrt importing a single disk, it sounds reasonable. Would you be interested in implementing this? if so we would be more than happy to guide you on where and how. If not, we'll add it to our list. -- Nicolas Ecarnot ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
In the mean time I can share my successful one-shot experience with a WIndows XP VM. Coming from Fedora 16 with Qemu/KVM as in its virt-preview repo qemu-kvm-0.15.1-8.fc16.x86_64 Windows XP ran as a VM, managed by virt-manager and already configured with virtio disk and network and qxl video adapter, accessed from F16 with virt-viewer (0.4.1-3.fc16.x86_64) I bought a 64Gb SSD disk that I put as the boot disk of a so newly installed and now flying Fedora 18. The original and old SATA first disk is now the second one. Cpu is AMD Athlon(tm) II X4 630 Processor memory is 6Gb Installed oVirt 3.2 beta in all-in-one configuration. /DATA is an oVirt local storage domain on the SSD disk root file system /data is a mount point on the old SATA disk. Under /data/virtstoragef16 I had the original storage pool for Qemu/KVM on fedora 16 - winxp original source disk # qemu-img info /data/virtstoragef16/winxp.img image: /data/virtstoragef16/winxp.img file format: raw virtual size: 11G (11811160064 bytes) disk size: 10G - In oVirt I create a winxp desktop with one 11G virtio disk configured as preallocated and a virtio nic. Display configured with spice. I don't boot it I notice during disk creation the oVirt managed dd command vdsm 5909 1661 4 00:03 ?00:00:01 /usr/bin/dd if=/dev/zero of=/rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 bs=1048576 seek=0 skip=0 conv=notrunc count=11264 oflag=direct At the end: # qemu-img info /DATA/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 image: /DATA/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 file format: raw virtual size: 11G (11811160064 bytes) disk size: 11G - I create a time reference file This because in the disk image oVirt directory there are also metadata files # ll /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/ total 11535368 -rw-rw. 1 vdsm kvm 11811160064 Feb 16 00:04 e8ffd032-c159-4df9-a552-015b3f748482 -rw-rw. 1 vdsm kvm 1048576 Feb 16 00:04 e8ffd032-c159-4df9-a552-015b3f748482.lease -rw-r--r--. 1 vdsm kvm 274 Feb 16 00:04 e8ffd032-c159-4df9-a552-015b3f748482.meta # touch -r /DATA/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 /tmp/testfile I don't know if this is important, but just for consistence - copy source to target /usr/bin/dd if=/data/virtstoragef16/winxp.img of=/rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 bs=1048576 seek=0 skip=0 conv=notrunc oflag=direct - change timestamp of the overwritten disk touch -r /tmp/testfile /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 - verify # qemu-img info /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 image: /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 file format: raw virtual size: 11G (11811160064 bytes) disk size: 11G - start vm On webadmin: VM winxp is down. Exit message: [Errno 16] Device or resource busy: '/tmp/tmpxqZZDI'. [root@tekkaman ~]# ll /tmp/tmpxqZZDI/ total 0 Probably locked even if I never started the Windows XP VM yet... - reboot of my pc - activate ISO_DOMAIN and on this one I put an iso with spice-guest-tools-0.3.exe - start VM I'm able to connect to spice console from webadmin and I suddenly get hw discovery / change hw window asking for drivers I leave the windows there and instead I connect the CD and run spice-guest-tools-0.3.exe All goes well and I reboot my VM In device manager I don't get any ? or problems related to devices. Video resolution is ok at 1680x1050 as it is the max in my monitor Audio is ok, tried with the already installed skype btw asking for an update, so the virtio network is also ok. So for one shot migration it works, at least with my start and end environments. Gianluca ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
Thanks for the comprehensive answer! One small nit - I would create the disk thin and not preallocated on nfs to avoid the lengthy 'dd'. - Original Message - In the mean time I can share my successful one-shot experience with a WIndows XP VM. Coming from Fedora 16 with Qemu/KVM as in its virt-preview repo qemu-kvm-0.15.1-8.fc16.x86_64 Windows XP ran as a VM, managed by virt-manager and already configured with virtio disk and network and qxl video adapter, accessed from F16 with virt-viewer (0.4.1-3.fc16.x86_64) I bought a 64Gb SSD disk that I put as the boot disk of a so newly installed and now flying Fedora 18. The original and old SATA first disk is now the second one. Cpu is AMD Athlon(tm) II X4 630 Processor memory is 6Gb Installed oVirt 3.2 beta in all-in-one configuration. /DATA is an oVirt local storage domain on the SSD disk root file system /data is a mount point on the old SATA disk. Under /data/virtstoragef16 I had the original storage pool for Qemu/KVM on fedora 16 - winxp original source disk # qemu-img info /data/virtstoragef16/winxp.img image: /data/virtstoragef16/winxp.img file format: raw virtual size: 11G (11811160064 bytes) disk size: 10G - In oVirt I create a winxp desktop with one 11G virtio disk configured as preallocated and a virtio nic. Display configured with spice. I don't boot it I notice during disk creation the oVirt managed dd command vdsm 5909 1661 4 00:03 ?00:00:01 /usr/bin/dd if=/dev/zero of=/rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 bs=1048576 seek=0 skip=0 conv=notrunc count=11264 oflag=direct At the end: # qemu-img info /DATA/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 image: /DATA/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 file format: raw virtual size: 11G (11811160064 bytes) disk size: 11G - I create a time reference file This because in the disk image oVirt directory there are also metadata files # ll /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/ total 11535368 -rw-rw. 1 vdsm kvm 11811160064 Feb 16 00:04 e8ffd032-c159-4df9-a552-015b3f748482 -rw-rw. 1 vdsm kvm 1048576 Feb 16 00:04 e8ffd032-c159-4df9-a552-015b3f748482.lease -rw-r--r--. 1 vdsm kvm 274 Feb 16 00:04 e8ffd032-c159-4df9-a552-015b3f748482.meta # touch -r /DATA/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 /tmp/testfile I don't know if this is important, but just for consistence - copy source to target /usr/bin/dd if=/data/virtstoragef16/winxp.img of=/rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 bs=1048576 seek=0 skip=0 conv=notrunc oflag=direct - change timestamp of the overwritten disk touch -r /tmp/testfile /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 - verify # qemu-img info /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 image: /rhev/data-center/65c9777e-23f1-4f04-8cea-e7c8871dc88b/0a8035e6-e41d-40ff-a154-e0a374f264b2/images/3b0d1e0f-d31a-4828-bb6c-8238ccc077ae/e8ffd032-c159-4df9-a552-015b3f748482 file format: raw virtual size: 11G (11811160064 bytes) disk size: 11G - start vm On webadmin: VM winxp is down. Exit message: [Errno 16] Device or resource busy: '/tmp/tmpxqZZDI'. [root@tekkaman ~]# ll /tmp/tmpxqZZDI/ total 0 Probably locked even if I never started the Windows XP VM yet... - reboot of my pc - activate ISO_DOMAIN and on this one I put an iso with spice-guest-tools-0.3.exe - start VM I'm able to connect to spice console from webadmin and I suddenly get hw discovery / change hw window asking for drivers I leave the windows there and instead I connect the CD and run spice-guest-tools-0.3.exe All goes well and I reboot my VM In device manager I don't get any ? or problems related to devices. Video resolution is ok at 1680x1050 as it is the max in my monitor Audio is ok, tried with the already installed skype btw asking for an update, so the virtio network is also ok. So for one shot migration it works, at least with my start and end environments. Gianluca ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
On Mon, Feb 11, 2013 at 04:14:38PM +0100, Nicolas Ecarnot wrote: Hi, I find it hard to find any information about the way I have to follow to convert/import a vmdk/qcow/raw/etc... single disk into an oVirt disks list. I know how to use virt-v2v to import complete VMs (disk AND config), but don't know how to handle a single data disk. Assuming it's a data disk with no operating system on it, then it's very likely the internal filesystem requires no conversion at all, so it's outside the scope of virt-v2v. However the disk format might need to be converted, eg. from VMDK to qcow2. You can do this using 'qemu-img convert' or VMware's vdiskmanager program. I'm not sure about how you would import a disk into oVirt. I guess that copying it onto the Export Storage Domain won't work because oVirt will expect a full guest config. Do you intend to attach this data disk to some existing VM? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
Le 14/02/2013 15:05, Richard W.M. Jones a écrit : On Mon, Feb 11, 2013 at 04:14:38PM +0100, Nicolas Ecarnot wrote: Hi, I find it hard to find any information about the way I have to follow to convert/import a vmdk/qcow/raw/etc... single disk into an oVirt disks list. I know how to use virt-v2v to import complete VMs (disk AND config), but don't know how to handle a single data disk. Assuming it's a data disk with no operating system on it, then it's very likely the internal filesystem requires no conversion at all, so it's outside the scope of virt-v2v. However the disk format might need to be converted, eg. from VMDK to qcow2. You can do this using 'qemu-img convert' or VMware's vdiskmanager program. I'm not sure about how you would import a disk into oVirt. I guess that copying it onto the Export Storage Domain won't work because oVirt will expect a full guest config. Do you intend to attach this data disk to some existing VM? Rich. That is exactly the case : it is indeed a pure data disk with an ext3 filesystem (no LVM, no nothing). I intend to attach it to some existing VM. I know how to convert it into qcow2 or whatever. I know how to create an additionnal disk in oVirt. I know I could trick the system by creating a disk in oVirt, then replace its content by playing with dd, or exploring LVs indide my domain master LUN. But I must admit I was dreaming of some 'official' way to do that. -- Nicolas Ecarnot ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
On 14/02/2013 16:56, Nicolas Ecarnot wrote: Le 14/02/2013 15:05, Richard W.M. Jones a écrit : On Mon, Feb 11, 2013 at 04:14:38PM +0100, Nicolas Ecarnot wrote: Hi, I find it hard to find any information about the way I have to follow to convert/import a vmdk/qcow/raw/etc... single disk into an oVirt disks list. I know how to use virt-v2v to import complete VMs (disk AND config), but don't know how to handle a single data disk. Assuming it's a data disk with no operating system on it, then it's very likely the internal filesystem requires no conversion at all, so it's outside the scope of virt-v2v. However the disk format might need to be converted, eg. from VMDK to qcow2. You can do this using 'qemu-img convert' or VMware's vdiskmanager program. I'm not sure about how you would import a disk into oVirt. I guess that copying it onto the Export Storage Domain won't work because oVirt will expect a full guest config. Do you intend to attach this data disk to some existing VM? Rich. That is exactly the case : it is indeed a pure data disk with an ext3 filesystem (no LVM, no nothing). I intend to attach it to some existing VM. I know how to convert it into qcow2 or whatever. I know how to create an additionnal disk in oVirt. I know I could trick the system by creating a disk in oVirt, then replace its content by playing with dd, or exploring LVs indide my domain master LUN. But I must admit I was dreaming of some 'official' way to do that. keith - any thoughts on ovirt-image-uploader being able to uplaod a single disk? ayal - on being able to import floating disks from the export domain rather than VMs ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] Move single vmdk (or else) disk into oVirt/RHEV
Le 14/02/2013 16:43, Itamar Heim a écrit : That is exactly the case : it is indeed a pure data disk with an ext3 filesystem (no LVM, no nothing). I intend to attach it to some existing VM. I know how to convert it into qcow2 or whatever. I know how to create an additionnal disk in oVirt. I know I could trick the system by creating a disk in oVirt, then replace its content by playing with dd, or exploring LVs indide my domain master LUN. But I must admit I was dreaming of some 'official' way to do that. keith - any thoughts on ovirt-image-uploader being able to uplaod a single disk? ayal - on being able to import floating disks from the export domain rather than VMs This is indeed the ways I was expecting ovirt experts to follow :) -- Nicolas Ecarnot ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users