WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Using virt-install on LV

Paola Salviato wrote:


John Haxby wrote:
Paola Salviato wrote:
I have no problems in creating VMs on image file with virt-install, but despite my efforts to install a domU on a logical volume, I haven't succeeded so far. Virt-install seems to be able to crate VMs only on image files. I have tried to create the domU on a logical volume by cloning the host (I'm using a red-hat), and failed (more than once.

Why doesn't  "virt-install -file /dev/volgroup/logvol" work for you?

jch
What exactly is "-file" supposed to be?
(probably it's a stupid question, but... )

You're probably expecting some magic that's not there and not needed. The "-file" option to virt-install simply names the file that's going to be used for the guest's disk image. Don't forget that a logical volume _is_ a file, you can cat it, cp it, run wc on it. You can even edit it with emacs. There are a few things that are different to files in a file system: for instance if you copy /etc/passwd to it then it doesn't get truncated and, of course, you can run the various lv* commands on a logical volume and you can't on /etc/passwd.

Were you perhaps expecting virt-install to create the logical volume for you? It doesn't: you need to create it yourself first with lvcreate.

But, really, the only magic is when virt-install comes to creating the guest's config. If the file looks enough like a logical volume or a partition then it goes in the config as phy:... rather than file:... (I don't remember exactly, but it's quite possible that the name just needs to begin "/dev/" for it to go have a phy: back end.)

So I'll come back to my original question: why doesn't "virt-install -file /dev/volgroup/logvol" work for you?

jch

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users