Maxim Perevedentsev
2015-Dec-10 13:34 UTC
Re: [Libguestfs] Bug: windows server 2012R2 fails to start after virt-resize
On 12/10/2015 02:55 PM, Pino Toscano wrote:> On Thursday 10 December 2015 13:55:26 Maxim Perevedentsev wrote: >> Hello everyone! >> >> After I ran virt-resize (v1.31.28) on my disk with win2012R2 >> (partition table [GPT]: VFAT (100M), unknown (128M), NTFS (64G)) >> My VM fails to boot: black screen informing that >> >> Windows failed to start... >> Status: 0xc000000e >> Info: an unexpected error has occured. >> >> After some investigations, I realized that Windows remembers the GUID of >> disk it is installed to. >> If I execute >> >> >guestfish -a win2012.hdd -v >> ... >> ><fs> debug sh 'sgdisk -p /dev/sda' >> guestfsd: main_loop: new request, len 0x54 >> /bin/sh -c sgdisk -p /dev/sda >> Disk /dev/sda: 136314880 sectors, 65.0 GiB >> Logical sector size: 512 bytes >> Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 >> Partition table holds up to 128 entries >> First usable sector is 34, last usable sector is 136314846 >> Partitions will be aligned on 2048-sector boundaries >> Total free space is 2101181 sectors (1.0 GiB) >> >> Number Start (sector) End (sector) Size Code Name >> 1 2048 206847 100.0 MiB EF00 EFI >> 2 206848 468991 128.0 MiB 0C01 Microsoft >> 3 468992 134215679 63.8 GiB 0700 Basic >> guestfsd: main_loop: proc 76 (debug) took 0.00 seconds >> >> *set the GUID of original disk* >> ><fs> debug sh 'sgdisk -U ADAA2225-3F89-4F2C-91DF-02F3E0C2ED67 /dev/sda' >> guestfsd: main_loop: new request, len 0x7c >> /bin/sh -c sgdisk -U ADAA2225-3F89-4F2C-91DF-02F3E0C2ED67 /dev/sda >> [ 70.170139] sda: sda1 sda2 sda3 >> The operation has completed successfully. >> guestfsd: main_loop: proc 76 (debug) took 1.02 seconds >> The operation has completed successfully. >> >> After that Windows successfully boots from resized image. >> >> I suggest adding get/set disk GUID to API and to virt-resize as well. >> Otherwise it is impossible to resize disks with this particular OS (not >> only this one, possibly). > This is supposed to be done already, see > https://bugzilla.redhat.com/show_bug.cgi?id=1189284 > (and the commits linked to its comment #9).This is another bug: the fixed one was about partition GUIDs. Now partition GUIDs are preserved, but the OS refuses to boot because of changed *disk* GUID.> > Please provide a full log of virt-resize with -v -x.OK, attached.> > > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs-- Your sincerely, Maxim Perevedentsev
Maxim Perevedentsev
2015-Dec-11 10:32 UTC
[Libguestfs] Fwd: Re: Bug: windows server 2012R2 fails to start after virt-resize
Re-send because it looks like this message was buried in archive and not sent to subscribers. -------- Forwarded Message -------- Subject: Re: [Libguestfs] Bug: windows server 2012R2 fails to start after virt-resize Date: Thu, 10 Dec 2015 16:34:01 +0300 From: Maxim Perevedentsev <mperevedentsev@virtuozzo.com> To: libguestfs@redhat.com On 12/10/2015 02:55 PM, Pino Toscano wrote:> On Thursday 10 December 2015 13:55:26 Maxim Perevedentsev wrote: >> Hello everyone! >> >> After I ran virt-resize (v1.31.28) on my disk with win2012R2 >> (partition table [GPT]: VFAT (100M), unknown (128M), NTFS (64G)) >> My VM fails to boot: black screen informing that >> >> Windows failed to start... >> Status: 0xc000000e >> Info: an unexpected error has occured. >> >> After some investigations, I realized that Windows remembers the GUID of >> disk it is installed to. >> If I execute >> >> >guestfish -a win2012.hdd -v >> ... >> ><fs> debug sh 'sgdisk -p /dev/sda' >> guestfsd: main_loop: new request, len 0x54 >> /bin/sh -c sgdisk -p /dev/sda >> Disk /dev/sda: 136314880 sectors, 65.0 GiB >> Logical sector size: 512 bytes >> Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 >> Partition table holds up to 128 entries >> First usable sector is 34, last usable sector is 136314846 >> Partitions will be aligned on 2048-sector boundaries >> Total free space is 2101181 sectors (1.0 GiB) >> >> Number Start (sector) End (sector) Size Code Name >> 1 2048 206847 100.0 MiB EF00 EFI >> 2 206848 468991 128.0 MiB 0C01 Microsoft >> 3 468992 134215679 63.8 GiB 0700 Basic >> guestfsd: main_loop: proc 76 (debug) took 0.00 seconds >> >> *set the GUID of original disk* >> ><fs> debug sh 'sgdisk -U ADAA2225-3F89-4F2C-91DF-02F3E0C2ED67 /dev/sda' >> guestfsd: main_loop: new request, len 0x7c >> /bin/sh -c sgdisk -U ADAA2225-3F89-4F2C-91DF-02F3E0C2ED67 /dev/sda >> [ 70.170139] sda: sda1 sda2 sda3 >> The operation has completed successfully. >> guestfsd: main_loop: proc 76 (debug) took 1.02 seconds >> The operation has completed successfully. >> >> After that Windows successfully boots from resized image. >> >> I suggest adding get/set disk GUID to API and to virt-resize as well. >> Otherwise it is impossible to resize disks with this particular OS (not >> only this one, possibly). > This is supposed to be done already, see > https://bugzilla.redhat.com/show_bug.cgi?id=1189284 > (and the commits linked to its comment #9).This is another bug: the fixed one was about partition GUIDs. Now partition GUIDs are preserved, but the OS refuses to boot because of changed *disk* GUID.> Please provide a full log of virt-resize with -v -x.OK, attached.> > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs-- Your sincerely, Maxim Perevedentsev
Maxim Perevedentsev
2015-Dec-16 12:25 UTC
Re: [Libguestfs] Bug: windows server 2012R2 fails to start after virt-resize
Just to remind: I am waiting for reaction on this issue. I will create a patch for part_get/set_disk_guid, if you agree this feature is useful. Thanks! On 12/10/2015 04:34 PM, Maxim Perevedentsev wrote:> On 12/10/2015 02:55 PM, Pino Toscano wrote: >> On Thursday 10 December 2015 13:55:26 Maxim Perevedentsev wrote: >>> Hello everyone! >>> >>> After I ran virt-resize (v1.31.28) on my disk with win2012R2 >>> (partition table [GPT]: VFAT (100M), unknown (128M), NTFS (64G)) >>> My VM fails to boot: black screen informing that >>> >>> Windows failed to start... >>> Status: 0xc000000e >>> Info: an unexpected error has occured. >>> >>> After some investigations, I realized that Windows remembers the GUID of >>> disk it is installed to. >>> If I execute >>> >>> >guestfish -a win2012.hdd -v >>> ... >>> ><fs> debug sh 'sgdisk -p /dev/sda' >>> guestfsd: main_loop: new request, len 0x54 >>> /bin/sh -c sgdisk -p /dev/sda >>> Disk /dev/sda: 136314880 sectors, 65.0 GiB >>> Logical sector size: 512 bytes >>> Disk identifier (GUID): B3108127-1775-47B7-ABC1-A56D6761C894 >>> Partition table holds up to 128 entries >>> First usable sector is 34, last usable sector is 136314846 >>> Partitions will be aligned on 2048-sector boundaries >>> Total free space is 2101181 sectors (1.0 GiB) >>> >>> Number Start (sector) End (sector) Size Code Name >>> 1 2048 206847 100.0 MiB EF00 EFI >>> 2 206848 468991 128.0 MiB 0C01 Microsoft >>> 3 468992 134215679 63.8 GiB 0700 Basic >>> guestfsd: main_loop: proc 76 (debug) took 0.00 seconds >>> >>> *set the GUID of original disk* >>> ><fs> debug sh 'sgdisk -U ADAA2225-3F89-4F2C-91DF-02F3E0C2ED67 /dev/sda' >>> guestfsd: main_loop: new request, len 0x7c >>> /bin/sh -c sgdisk -U ADAA2225-3F89-4F2C-91DF-02F3E0C2ED67 /dev/sda >>> [ 70.170139] sda: sda1 sda2 sda3 >>> The operation has completed successfully. >>> guestfsd: main_loop: proc 76 (debug) took 1.02 seconds >>> The operation has completed successfully. >>> >>> After that Windows successfully boots from resized image. >>> >>> I suggest adding get/set disk GUID to API and to virt-resize as well. >>> Otherwise it is impossible to resize disks with this particular OS (not >>> only this one, possibly). >> This is supposed to be done already, see >> https://bugzilla.redhat.com/show_bug.cgi?id=1189284 >> (and the commits linked to its comment #9). > This is another bug: the fixed one was about partition GUIDs. > Now partition GUIDs are preserved, but the OS refuses to boot because of > changed *disk* GUID. >> Please provide a full log of virt-resize with -v -x. > OK, attached. >> >> >> _______________________________________________ >> Libguestfs mailing list >> Libguestfs@redhat.com >> https://www.redhat.com/mailman/listinfo/libguestfs > > -- > Your sincerely, > Maxim Perevedentsev > > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs-- Your sincerely, Maxim Perevedentsev
Richard W.M. Jones
2015-Dec-16 14:43 UTC
Re: [Libguestfs] Bug: windows server 2012R2 fails to start after virt-resize
On Wed, Dec 16, 2015 at 03:25:57PM +0300, Maxim Perevedentsev wrote:> Just to remind: I am waiting for reaction on this issue.Been on holiday for the last week, and just a heads up that I'm soon going on holiday again until the beginning of January.> I will create a patch for part_get/set_disk_guid, if you agree this > feature is useful.Yes it sounds as if we should be preserving the disk GUID as well, so patches welcome. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Apparently Analagous Threads
- Re: Bug: windows server 2012R2 fails to start after virt-resize
- Re: Bug: windows server 2012R2 fails to start after virt-resize
- Bug: windows server 2012R2 fails to start after virt-resize
- Re: [PATCHv2] New API: part_expand_gpt.
- [PATCHv2] New API: part_expand_gpt.