[fedora-virt] "YOU WILL LOSE ALL DATA ON THIS DRIVE", but the drive is wrong.

Eduardo Habkost ehabkost at redhat.com
Fri Apr 17 13:22:19 UTC 2009


On Fri, Apr 17, 2009 at 09:40:49AM +0100, Daniel P. Berrange wrote:
> On Thu, Apr 16, 2009 at 04:36:33PM -0300, Eduardo Habkost wrote:
> > On Thu, Apr 16, 2009 at 08:03:38PM +0100, Daniel P. Berrange wrote:
> > > On Thu, Apr 16, 2009 at 01:56:11PM -0300, Eduardo Habkost wrote:
> > > > On Thu, Apr 16, 2009 at 05:49:51PM +0100, Mark McLoughlin wrote:
> > > > > On Wed, 2009-04-15 at 18:28 -0400, Robert P. J. Day wrote:
> > > > > > from earlier, i'm test installing a f11 beta x86_64 guest on a f11
> > > > > > beta x86_64 host, and i got to the warning dialog:
> > > > > > 
> > > > > > Error processing drive sda.
> > > > > > Maybe it needs to be
> > > > > > reinitialized.  YOU WILL LOSE ALL
> > > > > > DATA ON THIS DRIVE!
> > > > > > 
> > > > > >   i can see from this BZ report:
> > > > > > 
> > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=492082
> > > > > > 
> > > > > > i'm assuming, from what i read there, that this is a normal event and
> > > > > > that, for a new (blank) disk image, one should do the initialization,
> > > > > > right?
> > > > > 
> > > > > Yes. It really sucks that we can't remove this warning for this case -
> > > > > every single user who creates a virtual machine will see it. And it is a
> > > > > wholly terrifying dialog.
> > > > 
> > > > Couldn't virt-install initialize an empty partition table on the disk
> > > > image before launching the guest? It would probably make many OS
> > > > installers happier.
> > > 
> > > No, its not that simple. We can't know what partition table the guest
> > > OS prefers, nor is it practical for non-raw disk formats. We could
> > > trivially pass a flag to anaconda on its boot command line to tell it
> > > to initialize the guest, but anaconda devs rejected this useful idea
> > > as too complicated to implement. Go figure. 
> > 
> > I agree that passing a flag to Anaconda would be even better. But just
> > creating an empty MS-DOS partition table wouldn't hurt, and would work
> > for other OSes also. We can't be sure if the guest OS prefers it, but
> > it's better than a zeroed disk for common use cases. But, yes, the
> > non-raw disk formats make it more complicated to implement.
> 
> It gets more complicated than that. The disk in question may already
> have an OS install, so from the host we'd need to also probe to see
> if a partition table already exists before creating one.

Just do that when virt-install itself creates the disk image. No need to
do anything for existing images. For existing images the warning makes
sense anyway (because the user may have existing data on the image).


> This all just
> ends up duplicating stuff that the guest OS installer can do in a far
> easier manner

I disagree. Fedora is not the only guest we users will run. We don't
have control of all guest OSes. Fixing it on Fedora won't fix it for all
other Linux distributions that don't use Anaconda, or all other OSes.

What you propose is to create a new host->guest protocol to tell the
guest that there is no data on the disk, and expect all guest OSes to
understand protocol. Instead of doing that we reuse an existing protocol
for that that lots of OSes already understand, that is having an empty
partition table.

-- 
Eduardo




More information about the Fedora-virt mailing list