If you are installing windows from iso file by using 'Virtual Machine Manager' in xVM, windows installer will let you put your disk into cdrom when windows restart during installation. xVM won't load iso file into cdrom automatically if you restart your domain. 

If you run 'virsh dumpxml [domain]', you will see that domain's device information like this:

    <disk device='cdrom'>
      <target dev='hdc'/>
      <readonly/>
    </disk>

    <disk type='file' device='disk'>
      <driver name='tap' type='vdisk'/>
      <source file='[raw file]'/>
      <target dev='hda'/>
    </disk>

To solve this windows installation issue, we just need run following command from console:

virsh attach-disk [domain] --type cdrom --driver file --mode readonly [iso file] hdc

Let's check device again:

#virsh dumpxml [domain]

<disk type='file' device='cdrom'> <driver name='file'/> <source file='[iso file]'/> <target dev='hdc'/> <readonly/> </disk> <disk type='file' device='disk'> <driver name='tap' type='vdisk'/> <source file='/export/os/2003tw'/> <target dev='hda'/> </disk>

Now, just back to your windows installer window, clicking 'retry' and installer will continue it's job.

We can use same way to switch difference CD during installation. For example, there have 4 CDs if you install SuSe 10. It's a way for you if you don't have a dvd iso file.

You can click this to get more information about 'virsh' command.

Comments:

Post a Comment:
Comments are closed for this entry.

This blog copyright 2009 by leonfan