Jump to content

Physical to VM conversion Windows drive letters


alaw005

Recommended Posts

I am a problem where I have converted a physical Windows 10 machine, with a C drive and a D drive to a virtual machine. The immediate problem is that the original D drive has been assigned to the E drive (with the virtio iso as cd on D drive) and I cannot open Disk Management or DISKPART within the new Windows VM to change back. They start opening but never finish loading. The VM disks are configured as follows:

 

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/user/isos/virtio-win-0.1.118-2.iso'/>

      <target dev='hdb' bus='ide'/>

      <readonly/>

      <address type='drive' controller='0' bus='0' target='0' unit='1'/>

    </disk>

    <disk type='file' device='disk'>

      <driver name='qemu' type='raw' cache='writeback'/>

      <source file='/mnt/user/domains/Monsterblack/vdisk1.img'/>

      <target dev='hdc' bus='ide'/>

      <boot order='1'/>

      <address type='drive' controller='0' bus='1' target='0' unit='0'/>

    </disk>

    <disk type='file' device='disk'>

      <driver name='qemu' type='raw' cache='writeback'/>

      <source file='/mnt/user/vdisks/monsterblack/vdisk2.img'/>

      <target dev='hdd' bus='ide'/>

      <address type='drive' controller='0' bus='1' target='0' unit='1'/>

    </disk>

 

Does anyone have any suggestions? I am a newbie to unRAID and still trialing before committing ... if I can't get to work or get good enough performance I'll just have to go back to using Windows as I need this for work and games.

 

I followed the process set out in

https://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Physical_to_Virtual_Machine_Conversion_Process. This was a straight forward process and worked straight away although performance is not very good, even with what I consider a reasonable rig. For example the VM uses up all the allocated memory (24GB) straight away and is very sluggish even with teh C drive on the SSD cache.

 

M/B: Gigabyte Technology Co., Ltd. - B85M-D3H-A

CPU: Intel® Xeon® CPU E3-1246 v3 @ 3.50GHz

HVM: Enabled

IOMMU: Enabled

Cache: 256 kB, 1024 kB, 8192 kB

Memory: 32 GB (max. installable capacity 32 GB)

GPU: Geforce GTX 750ti

 

 

 

 

Link to comment

Try changing your XML to be like this:

 

   <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.118-2.iso'/>
      <target dev='hdd' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Monsterblack/vdisk1.img'/>
      <target dev='hdb' bus='ide'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/vdisks/monsterblack/vdisk2.img'/>
      <target dev='hdc' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>

What I changed was the "bus='?'" values if that isn't obvious to you.

 

Edit: realized you may nee to change "target dev as well so updated above.

Link to comment

Great thank you. I've popped out but will try that when get back. Is the idea that the disks on bus 0 get loaded first then bus 1 etc?

They should show up in Device manager before those on bus 1 but I believe the target dev is like setting a bios setting.  So even if a drive would be listed in Device Manager first - Windows would BOOT from a later device.
Link to comment

No luck unfortunately. I've tried: 1) just changing the bus numbers, 2) also changing the target dev, and 3) also changing the order in which devices listed. The following is the config tested. I even tried removing the cdrom device altogether but the second disk was still E rather than D.

 

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Monsterblack/vdisk1.img'/>
      <target dev='hda' bus='ide'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/vdisks/monsterblack/vdisk2.img'/>
      <target dev='hdb' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/virtio-win-0.1.118-2.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>

 

I suspect that windows may have already decided the order when I first created the VM? And maybe diskpart doesn't run on virtual drives?  I'm going to see if there is a windows registry hack to change the drive letter ... will post back shortly.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...