[libvirt-users] Using a Windows partition as libvirt media

I'm running Ubuntu desktop 12.10 with libvirt and virt-manager (gui). I have been led to believe that it is possible to use and existing partition as the disk storage volume for a virtual machine. The windows partition is /dev/sda2, but if I use fs: Pre-formatted Block Device I can select the partion. What I can't figure out is how to tell the vitual machine to use this volume. I tried with virt-manager, but the only options I have are * Local media * Network install * Network Boot * Import Existing Disk Image How can I do this? regards Roland Giesler

Surely there must be someone here that knows how to do this? Maybe someone that has used some other partition type in this way? On Mon, Jun 10, 2013 at 10:06 PM, Roland Giesler <roland@giesler.za.net> wrote:
I'm running Ubuntu desktop 12.10 with libvirt and virt-manager (gui).
I have been led to believe that it is possible to use and existing partition as the disk storage volume for a virtual machine.
The windows partition is /dev/sda2, but if I use fs: Pre-formatted Block Device I can select the partion. What I can't figure out is how to tell the vitual machine to use this volume.
I tried with virt-manager, but the only options I have are
* Local media * Network install * Network Boot * Import Existing Disk Image
How can I do this?
regards
Roland Giesler

On 06/13/2013 08:48 PM, Roland Giesler wrote:
Surely there must be someone here that knows how to do this? Maybe someone that has used some other partition type in this way?
On Mon, Jun 10, 2013 at 10:06 PM, Roland Giesler <roland@giesler.za.net> wrote:
I'm running Ubuntu desktop 12.10 with libvirt and virt-manager (gui).
I have been led to believe that it is possible to use and existing partition as the disk storage volume for a virtual machine.
The windows partition is /dev/sda2, but if I use fs: Pre-formatted Block Device I can select the partion. What I can't figure out is how to tell the vitual machine to use this volume.
If I'm not mistaken, the fact that it is only a partition (and not whole disk), you cannot passthrough it to the guest as a lun, but that shouldn't be a problem for you.
I tried with virt-manager, but the only options I have are
* Local media * Network install * Network Boot * Import Existing Disk Image
You should be able to safely select the last option and virt-{install,manager} will detect that it is a block device and use <disk type='block' device='disk'> for the disk. Martin
How can I do this?
regards
Roland Giesler

On Fri, Jun 14, 2013 at 11:07 AM, Martin Kletzander <mkletzan@redhat.com> wrote:
On 06/13/2013 08:48 PM, Roland Giesler wrote:
Surely there must be someone here that knows how to do this? Maybe someone that has used some other partition type in this way?
On Mon, Jun 10, 2013 at 10:06 PM, Roland Giesler <roland@giesler.za.net> wrote:
I'm running Ubuntu desktop 12.10 with libvirt and virt-manager (gui).
I have been led to believe that it is possible to use and existing partition as the disk storage volume for a virtual machine.
The windows partition is /dev/sda2, but if I use fs: Pre-formatted Block Device I can select the partion. What I can't figure out is how to tell the vitual machine to use this volume.
If I'm not mistaken, the fact that it is only a partition (and not whole disk), you cannot passthrough it to the guest as a lun, but that shouldn't be a problem for you.
I'm not an expert with libvirt, although I have a substantial number of operational systems. I'm not sure I understand exactly how to create this, since I always get prompted for a storage path, not matter which option I choose. As I understand it, there should not be a storage path for a "new device", since I want to just use an existing device. I find the documentation hard to understand: Which option should I use when defining this volume? Also, when does one use a "pool" and when a disk without a pool? I suppose I have to dig into http://wiki.libvirt.org a little deeper to get some understanding of the finer technical aspects of configuring this, but what I'm looking for is not really there. All the options for disk storage are at http://libvirt.org/formatstorage.html, so I'll dig in there as well.
I tried with virt-manager, but the only options I have are
* Local media * Network install * Network Boot * Import Existing Disk Image
You should be able to safely select the last option and virt-{install,manager} will detect that it is a block device and use <disk type='block' device='disk'> for the disk.
No, it doesn't. :-( It wants to create a new storage location in the selected area when I create the machine. Seems I'll have to do this manually. thanks so far. regards Roland
Martin

On 06/18/2013 09:36 AM, Roland Giesler wrote:
On Fri, Jun 14, 2013 at 11:07 AM, Martin Kletzander <mkletzan@redhat.com> wrote:
On 06/13/2013 08:48 PM, Roland Giesler wrote:
On Mon, Jun 10, 2013 at 10:06 PM, Roland Giesler <roland@giesler.za.net> wrote: [...]
I tried with virt-manager, but the only options I have are
* Local media * Network install * Network Boot * Import Existing Disk Image
You should be able to safely select the last option and virt-{install,manager} will detect that it is a block device and use <disk type='block' device='disk'> for the disk.
No, it doesn't. :-( It wants to create a new storage location in the selected area when I create the machine. Seems I'll have to do this manually.
I use it like this: In virt-manager, go through: New -> Import existing disk image -> Forward -> Fill in /dev/sda2 -> 3x Forward -> Finish In case you really want it as a 'lun', not a 'block', you can click "Customize before installation", remove the existing disk, add nex hardware, storage and fill in '/dev/sda2' and select Virtio lun or Virtio SCSI lun or whatever you wish. Is anything from this method missing in your virt-manager version? Martin

On Tue, Jun 18, 2013 at 12:08 PM, Martin Kletzander <mkletzan@redhat.com> wrote:
I use it like this:
In virt-manager, go through: New -> Import existing disk image -> Forward -> Fill in /dev/sda2 -> 3x Forward -> Finish
Ah, this explains why it doesn't work for me. I selected an existing disc pool at step 2 instead of filling in /dev/sda2 or whatever... Let me see what I can get going in this way.
In case you really want it as a 'lun', not a 'block', you can click "Customize before installation", remove the existing disk, add nex hardware, storage and fill in '/dev/sda2' and select Virtio lun or Virtio SCSI lun or whatever you wish.
Is anything from this method missing in your virt-manager version?
Martin
participants (2)
-
Martin Kletzander
-
Roland Giesler