[virt-tools-list] [libvirt] KVM Windows guest: add hard drive

Richard W.M. Jones rjones at redhat.com
Sat Oct 16 14:08:01 UTC 2010


On Sat, Oct 16, 2010 at 06:55:13PM +0530, Tapas Mishra wrote:
> On Tue, Oct 12, 2010 at 11:47 PM, Mihamina Rakotomandimby
> <mihamina at gulfsat.mg> wrote:
> > Manao ahoana, Hello, Bonjour,
> >
> > I installed a Windows (XP and 2003) guest using one partition as hard
> > drive.
> > I used:
> >
> >  sudo virt-install --connect qemu:///system \
> >   --name win2003-01 \
> >   --ram 1024 \
> >   --keymap=fr \
> >   --disk path=/dev/lvm0/win2003-01 \
> >   --cdrom=/home/mihamina/Windows_2003_Server.iso \
> >   --os-type windows \
> >   --os-variant=win2k3 \
> >   --noapic \
> >   --noacpi \
> >   --network=bridge:br0 \
> >   --accelerate \
> >   --vnc \
> >   --force
> >
> > And this works fine. Really fine.
> >
> > The disk section in the definition:
> >
> >    <disk type='block' device='disk'>
> >      <source dev='/dev/lvm0/win2003-01'/>
> >      <target dev='hda' bus='ide'/>
> >    </disk>
> >
> > After installation, people asked me to add another hard drive to this
> > installation, and then, I added another "disk" in the definition:
> >
> >    <disk type='block' device='disk'>
> >      <source dev='/dev/lvm0/win2003-01'/>
> >      <target dev='hda' bus='ide'/>
> >    </disk>
> >    <disk type='block' device='disk'>
> >      <source dev='/dev/lvm0/win2003-01-a'/>
> >      <target dev='hdb' bus='ide'/>
> >    </disk>
> >
>
> I am following this thread for my information want to know is the
> above syntax of adding a disk to vm definition correct?
> I have not tried it hence want to know.

Looks like it.  If you get a specific error message, then
we can help, otherwise we can't.

> On Wed, Oct 13, 2010 at 5:55 PM, Richard W.M. Jones <rjones at redhat.com> wrote:
> > On Wed, Oct 13, 2010 at 05:54:00AM +0300, Mihamina Rakotomandimby wrote:
> >> > acathrow at redhat.com :
> >> > Are you looking for a new driver to appear in 'my computer'
> >>
> >> Yes, that is what I expected.
> >>
> >> > because it wouldn't appear there until you format it. Does it show
> >> > up in device manager?
> >>
> >> I'll try to see in the device manager and see if I can ask for
> >> formatting from somewhere.
> >
> > You could also try partitioning and preformatting the drive before you
> > add it. _Shut down_ the virtual machine, then do:
> >
> > guestfish -a /dev/lvm0/win2003-01-a <<EOF
> > run
> > part-disk /dev/sda mbr
> > mkfs ntfs /dev/sda1
> > EOF
>
> Are you suggesting to erase mbr also?

I was assuming that the new disk was completely blank, in which case
creating a partition table and a filesystem inside that partition
might be helpful.

> The guy is adding another disk to his vm so why does one need to erase
> mbr in vm?
> 
> partdisk is not installed on my system.
> Are you suggesting this utility
> http://support.microsoft.com/kb/896528

No, I'm suggesting this utility:

http://libguestfs.org/guestfish.1.html

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw




More information about the virt-tools-list mailing list