[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] need some help/asdive

On Tuesday 30 June 2009 06:19:46 Daniel P. Berrange wrote:
> On Tue, Jun 30, 2009 at 04:47:31AM -0400, Gene Czarcinski wrote:
> > On Sunday 28 June 2009 11:35:55 Daniel P. Berrange wrote:
> > > > My second question concerns the location of the disk images:  what is
> > > > the "best practical way" to move these out of the root partition?  I
> > > > have come up with these different approaches which could/may work:
> > > >
> > > > 1. change the "path" value in /etc/libvirt/storage/default.xml to
> > > > point to a directory in a different partition.
> > > >
> > > > 2. Use a /etc/fstab entry to "bind mount" a directory in a separate
> > > > partition onto /var/lib/libvirt/images
> > > >
> > > > 3. Just use an /etc/fstab entry to mount a partition on
> > > > /var/lib/libvirt/images or, perhaps, on /var/lib/libvirt. [This could
> > > > be done during system installation]
> > > >
> > > > OK, any comments on these??
> > >
> > > There's no real 'right' answer here, but I'd recommend 1. really.
> >
> > There might not be a right answer but 1 is definitely a wrong answer.
> No it isn't.
> > Changing /etc/libvirt/storage/default.xml to point to a directory in a
> > separate partition with lost of free space was easy.  However, when I
> > tried to create a new guest using virt-manager and the creation "wizard",
> > for the disk image, it still showed the free space available in the root
> > partition (8GB) rather than that of the other partition (120GB),
> Sounds like you didn't reload the configuration after editing it. If you
> edit the file directly you need to send SIGHUP to the daemon. It is better
> to use the 'virsh pool-edit' command which ensures it is immediately
> reloaded.

So we are all working for the same base, I am running Fedora 11 with all 
updates applied as of the date of this message:

selinux-policy-3.6.12-57.fc11.noarch (from updates-testing)

The processor is an AMD Phenom II 940 with 8 GB ram.

OK, I removed my bind-mount (which works) and edited 
/etc/libvirt/storage/default.xml so that "path" points to the directory in a 
separate "extra" partition from root.  Root currently has about 8GB free space 
and the "extra" partition has 120GB free space.  The file context for the 
directory on the "extra" partition has been setup with semanage.

I am not sure just what daemon you are talking about doing a SIGHUP to but I 
did:  "/etc/init.d/libvirtd restart"

When I try to create a new guest, the free space for the disk image is 8GB 
(same as root).

OK, reboot the host! [this should certainly force the configuration to be re-

I try creating a new guest again but, again, the free space for the disk image 
is 8GB (still the same as root).

Now I change the "path" in /etc/libvirt/storage/default.xml back to 
/var/lib/libvirt/images", add the bind-mount entry to /etc/fstab to mount the 
"extra" partition on /var/lib/libvirt/images, reboot ... now when I try to 
create a new guest, the amount of free space for the disk image shows as 

My guess is that "/var/lib/libvirt/images" is hardcoded somewhere in the code.

What am I missing?
* * * * *
BTW, the "virsh pool-edit" may be a great command but when I try it, it says 
it requires the "<pool>" option.

Also, when I do "virsh -h", a large number of commands are listed none of 
which I can find any documentation on through google (let alone on any man 
* * * * *

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]