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

Daniel P. Berrange berrange at redhat.com
Fri Apr 17 08:40:49 UTC 2009


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. This all just
ends up duplicating stuff that the guest OS installer can do in a far
easier manner

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the Fedora-virt mailing list