[Libguestfs] windows xp see 'unknow partition'

Richard W.M. Jones rjones at redhat.com
Thu May 31 11:37:36 UTC 2012


On Thu, May 31, 2012 at 02:41:22PM +0800, me,apporc wrote:
> Hi,
> I use guestfs.part_disk to  partition one disk with 'mbr' and formated it
> to ntfs, then attach this disk to one windows xp virtual machine.
> But this windows xp can't recognise that partition, it says 'uknown
> partition'
> 
> Why it is so, and how to solve it? May someone help me with this problem?

Windows won't recognize a partition unless you have the partition type
byte (Linux ignores this byte and just looks at the partition
content).  In guestfish you would have to do:

  part-set-mbr-id /dev/sda 1 0x7

That is for NTFS; use 0xb for VFAT.

For more information see:

https://github.com/libguestfs/libguestfs/blob/3893dc0b9436ebb4dd620c6ca9b1d038eacf83a6/tools/virt-make-fs#L438

Unfortunately at the moment there is no method of setting the UUID of
a GPT partitioned disk.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list