[PLUGIN DEPRECATED] VM Manager (2015.02.24)


dmacias

Recommended Posts

 

FYI, I just removed one of my virtual machines from the KVM GUI and it deleted my .qcow2 file without warning me it was about to delete the .qcow2 file. I just wanted to remove the virtual machine from the KVM tab and keep the .qcow2 file. Luckily I have an older file backed up but this is still inconvenient as I now have to redo all my settings I just spent the last few hours modifying. I would suggest there be a check-box that indicates (Yes/No) to deleting the image file when you click the delete button in the KVM tab.

 

EDIT: Sounds like @jude had the same issue as myself. I saw the same messages as well.

There are two buttons. The yellow/orange minus button for just removing the definition. And per your request I recently added the red X to remove everything, xml, image and folder if empty.  They both pop up with a warning and you have to click ok to proceed. I'll check into it more.  I created and deleted a bunch of vm's last night using both buttons. Let me know.

 

Edit: I'll change it so it's more apparent.  Also wondering if you turned off java popups and if so if the code just continues without warning.

 

Hmm you're correct. I didn't notice the new yellow remove button (oops). So all is good, just user ignorance :)

 

Yeah definitely my bad for not reading the message carefully enough but it is a pretty dramatic and scary event to suddenly realise that your VM image is gone (even with a few day old backup in the wings). I would appreciate something that really jumped out at me, got my attention and required one more consenting click before the VM image was deleted (save me from my distraction).

 

Thanks for all the hard work on making KVM work so well with unRAID. Very cool.

I'll add something to make it more clear. I know what you mean about losing vm images. I use my phone for a lot , programming,  command line and sftp.  With sftp in android's es file explorer it will follow symlinks during deletion instead deleting the symlink only. You can guess what happened. I cancelled it quickly but lost a couple vm's. But I had recent backups. Which is one thing I'd like to add soon.

Link to comment
  • Replies 566
  • Created
  • Last Reply

Top Posters In This Topic

First time VM user here. I am trying to use this plugin but not having much success. I am using the "Create VM" Tab and filling it out all of the necessary boxes but when I press the "Create VM" button nothing happens. What am I missing here? I have attached a screenshot of info I am filling out in the "Create VM" tab. Thanks in advance for your help and time.

Screen_Shot_2015-03-02_at_3_52.23_PM.png.0a25b0a60524acd4da1f8814289a48d4.png

Link to comment

First time VM user here. I am trying to use this plugin but not having much success. I am using the "Create VM" Tab and filling it out all of the necessary boxes but when I press the "Create VM" button nothing happens. What am I missing here? I have attached a screenshot of info I am filling out in the "Create VM" tab. Thanks in advance for your help and time.

 

Looks like I needed to enable the network bridge in "Settings -> Network Settings". Things are moving along nicely now. A big thanks to @jonp for helping me figure out my problem.

 

-Will

Link to comment

First time VM user here. I am trying to use this plugin but not having much success. I am using the "Create VM" Tab and filling it out all of the necessary boxes but when I press the "Create VM" button nothing happens. What am I missing here? I have attached a screenshot of info I am filling out in the "Create VM" tab. Thanks in advance for your help and time.

 

Looks like I needed to enable the network bridge in "Settings -> Network Settings". Things are moving along nicely now. A big thanks to @jonp for helping me figure out my problem.

 

-Will

No problem Will!  Glad I got you all squared away!

Link to comment

Thanks again for such a great plugin! I was able to setup 2 VM's in a matter of minutes without any problems. After a few XML edits, I had added GPU and USB device pass through and was playing around with them.

 

I had experimented with KVM and this plugin back in beta 11 and 12 time period but had some stability issues (BSOD) with Windows VM's, so I put it off until things matured a bit and I had more time. So I spent a good few hours with it tonight and had some fun!

 

Thanks!

 

Gary

Link to comment

Hey dmacias

 

while I figured out why usb passthrough did not work properly for me I came up with a great addition to VM Manager: Attach devices to running vms (this is what I needed to do to solve my problem).

If an usb device gets removed from the host (or even the guest system removes it) it is not recognized by the guest if it is pluged in again. You need to attach it once more doing:

 

Sadly this only works if the device is attached and enabled when the VM is started. The connection will be lost whenever the device is disabled or removed. But you can re-attach it at runtime. Just put the hostdev-definition into it's own file:

 

hostdev-03f0:4217.xml

 

<hostdev mode='subsystem' type='usb'>

  <source>

    <vendor id='0x03f0'/>

    <product id='0x4217'/>

  </source>

</hostdev>

 

And execute the following command when the device is available again:

 

virsh attach-device GUESTNAME /path/to/hostdev-03f0:4217.xml

Source: http://rolandtapken.de/blog/2011-04/how-auto-hotplug-usb-devices-libvirt-vms-update-1

 

Maybe you can add a devices tab where one can attach devices to running vms..? I think this would be a great addition. :)

 

Link to comment

Maybe you can add a devices tab where one can attach devices to running vms..? I think this would be a great addition. :)

+1 from me.  This would be really handy.  It seems like it is close to what you already have for cdrom images.

 

Also, there are no changelog entries for post #1 for the 2015.03.05a release.  Can you tell us what is different?

 

Thanks for the great work!

Link to comment

 

 

Maybe you can add a devices tab where one can attach devices to running vms..? I think this would be a great addition. :)

+1 from me.  This would be really handy.  It seems like it is close to what you already have for cdrom images.

 

Also, there are no changelog entries for post #1 for the 2015.03.05a release.  Can you tell us what is different?

 

Thanks for the great work!

 

Nothing's changed yet, my bad.  Usb is about done.  I tested it out in a windows 7 vm and I was able to attach and detach a usb device. I'm not sure of the impact or haven't tried attaching a device that's already in another running vm.

Link to comment

Hi dmacias,

Maybe I found a bug. When creating a vm using "create VM" and selecting "create a new disk", the disk is not created..it just creates a folder. And inside it puts a .cfg file.

I gues it should create the *.raw file for the virtual disk.

Rgds

EDIT: SOLVED .. I was typing 10GB instead of 10G.

Link to comment

Hello,

 

I have a few issues getting this to work

 

1) After creating a Windows VM for Server 2012, the installation does not detect any hard drives, so I can't install an OS

2) I cant control the VM using a mouse via VNC

 

Here is the XML for the VM that was created:

 

<domain type='kvm' id='2'>
  <name>test4</name>
  <uuid>affa8055-de6d-b2b6-3b86-0fba4593f540</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/vm/test4/test4.img'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/iso/apps/Microsoft.Windows.Server.2012.R2/servr2.iso'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/vm/virtio-win-0.1-100.iso'/>
      <backingStore/>
      <target dev='hdd' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:9f:30:be'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Link to comment

Hello,

 

I have a few issues getting this to work

 

1) After creating a Windows VM for Server 2012, the installation does not detect any hard drives, so I can't install an OS

2) I cant control the VM using a mouse via VNC

 

Here is the XML for the VM that was created:

 

<domain type='kvm' id='2'>
  <name>test4</name>
  <uuid>affa8055-de6d-b2b6-3b86-0fba4593f540</uuid>
  <memory unit='KiB'>2097152</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
    </hyperv>
  </features>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/vm/test4/test4.img'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/iso/apps/Microsoft.Windows.Server.2012.R2/servr2.iso'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/vm/virtio-win-0.1-100.iso'/>
      <backingStore/>
      <target dev='hdd' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:9f:30:be'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

You need to download the virtio drivers.

 

http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/

 

Download the ISO to your server, then when creating a VM using the plugin, select that ISO for the field that says VirtIO drivers.  When installing windows and you get to that part where it can't find any disk drives, there will be an option to load drivers.  Browse the CD-ROM from the windows installer and locate the Win8 folder (I don't think there will be one for 2012, but if so, pick that instead).  Now select the AMD64 folder and click ok (even if you have an intel system, select AMD64).  Then three drivers will come up.  Select them all, click next, and your drivers will load and your virtual disk(s) will be presented to the installer.

 

EDIT:  Looks like you already have them downloaded, you just have to browse for the drivers during the install of windows.

Link to comment

Getting the no hard disks installed error as well.

Using a WinXP SP3 32bit ISO. I'd like to get XP installed so I can run BlueIris.

 

XML as follows:

<domain type='kvm'>
  <name>blueiris</name>
  <uuid>6b9a00a7-6f8a-9335-c086-e7990570bd19</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='i686' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/blueiris/blueiris.qcow2'/>
      <target dev='hda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/apps/kvm/winxpsp3.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:fe:3e:5b'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Link to comment

Getting the no hard disks installed error as well.

Using a WinXP SP3 32bit ISO. I'd like to get XP installed so I can run BlueIris.

 

XML as follows:

<domain type='kvm'>
  <name>blueiris</name>
  <uuid>6b9a00a7-6f8a-9335-c086-e7990570bd19</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='i686' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/blueiris/blueiris.qcow2'/>
      <target dev='hda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/apps/kvm/winxpsp3.iso'/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:fe:3e:5b'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='tablet' bus='usb'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

You too need the virtio drivers I mentioned previously.

Link to comment

Getting the no hard disks installed error as well.

Using a WinXP SP3 32bit ISO. I'd like to get XP installed so I can run BlueIris.

 

You too need the virtio drivers I mentioned previously.

 

Now that I look through my XML, I noticed that the cdrom for virtio-win-0.1-100.iso isn't even listed. I absolutely know I selected the iso when I created the VM from the template. Seems like it just didn't get added to the XML.

 

EDIT: I tried Chrome instead of Safari to create the VM from the template. Looks like the virtio iso is included in the XML. But I'm still seeing the hard disk not found error. There is no option to load drivers, only F3 to reboot. I can press F6 upon boot for loading 3rd party SCSI or RAID, but it when I press "S" to specify the the adapters, it errors and says there isn't a floppy drive attached to load the drivers.

 

XML while the VM is running:

<domain type='kvm' id='2'>
  <name>winxpVM</name>
  <uuid>0b3e191b-b057-e3ab-0d51-d751b8baf445</uuid>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='i686' machine='pc-i440fx-2.1'>hvm</type>
    <boot dev='cdrom'/>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/winxpVM/winxpVM.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/apps/kvm/winxpsp3.iso'/>
      <backingStore/>
      <target dev='hdc' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-0'/>
      <address type='drive' controller='0' bus='1' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/cache/apps/kvm/virtio-win-0.1-100.iso'/>
      <backingStore/>
      <target dev='hdd' bus='ide'/>
      <readonly/>
      <alias name='ide0-1-1'/>
      <address type='drive' controller='0' bus='1' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:c8:73:7a'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/1'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

EDIT2: So it's a problem with the XP installer only looking for a floppy. Any idea on how to trick it into thinking that ISO is a floppy?

 

I say this because I just tested Windows 10 Preview. It booted like a charm and was able to find the hard drive after I loaded the driver from WIN8/AMD64.

Link to comment

spencers,

 

I would think if you made a Win XP iso with the drivers injected using various programs out there that I cannot think of at the moment would work ;)

 

Kryspy

 

So I've tried that, following a tutorial http://www.wikihow.com/Slipstream-Your-SATA-Drivers-Into-a-Windows-XP-Installation-CD-Using-nLite using nLite to load the drivers from the Virtio ISO to my WinXP 32bit ISO, and it still says no hard drive found. At a complete loss here, fellas.

Link to comment

spencers,

 

I would think if you made a Win XP iso with the drivers injected using various programs out there that I cannot think of at the moment would work ;)

 

Kryspy

 

So I've tried that, following a tutorial http://www.wikihow.com/Slipstream-Your-SATA-Drivers-Into-a-Windows-XP-Installation-CD-Using-nLite using nLite to load the drivers from the Virtio ISO to my WinXP 32bit ISO, and it still says no hard drive found. At a complete loss here, fellas.

You may need to skip virtio for now and use an emulated storage controller. Once windows is installed, you may be able to do the old switcheroo back to virtio.

 

To use an emulated controller, change this part of your XML:

 

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/winxpVM/winxpVM.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>

 

To this:

 

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/winxpVM/winxpVM.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
    </disk>

Link to comment

spencers,

 

I would think if you made a Win XP iso with the drivers injected using various programs out there that I cannot think of at the moment would work ;)

 

Kryspy

 

So I've tried that, following a tutorial http://www.wikihow.com/Slipstream-Your-SATA-Drivers-Into-a-Windows-XP-Installation-CD-Using-nLite using nLite to load the drivers from the Virtio ISO to my WinXP 32bit ISO, and it still says no hard drive found. At a complete loss here, fellas.

You may need to skip virtio for now and use an emulated storage controller. Once windows is installed, you may be able to do the old switcheroo back to virtio.

 

To use an emulated controller, change this part of your XML:

 

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/winxpVM/winxpVM.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>

 

To this:

 

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/apps/kvm/winxpVM/winxpVM.qcow2'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
    </disk>

 

Thank you! I'll have to give that a shot. Currently I just installed a lite version of Win7 and it's running just fine. Just gotta upgrade from 4GB to 8GB of RAM to feel a little more comfortable.

Link to comment

Hmm.  Okay, created my first vm (Ubuntu desktop) and opening the vnc connection I see the familiar purple background but nothing else, and switching to the DVI graphics output of the card I'm trying to passthrough (HD 6450) there's nothing there.  Here's my XML below.  Is it not seeing the card (in PCI slot 1) because I don't have the right drivers installed?  (The card is brand new out of the box but booted into BIOS fine.)  Or is it maybe that I set BIOS to boot from integrated graphics as primary thinking that would leave the card free for passthrough?  I'll play around with it but would appreciate any pointers.  Thanks.

 

<domain type='kvm' id='2'>

  <name>Ubuntu</name>

  <uuid>812585d4-2917-534d-3393-786d44daf16c</uuid>

  <memory unit='KiB'>2097152</memory>

  <currentMemory unit='KiB'>524288</currentMemory>

  <vcpu placement='static'>1</vcpu>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>

    <boot dev='cdrom'/>

    <boot dev='hd'/>

  </os>

  <features>

    <acpi/>

    <apic/>

  </features>

  <clock offset='localtime'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='yes'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>restart</on_crash>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

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

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

      <source file='/mnt/cache/Ubuntu/Ubuntu.qcow2'/>

      <backingStore/>

      <target dev='hda' bus='virtio'/>

      <alias name='virtio-disk0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

    </disk>

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

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

      <source file='/mnt/cache/ubuntu-14.04.2-desktop-amd64.iso'/>

      <backingStore/>

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

      <readonly/>

      <alias name='ide0-1-0'/>

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

    </disk>

    <controller type='usb' index='0'>

      <alias name='usb0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>

    </controller>

    <controller type='pci' index='0' model='pci-root'>

      <alias name='pci.0'/>

    </controller>

    <controller type='ide' index='0'>

      <alias name='ide0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:e6:f7:be'/>

      <source bridge='br0'/>

      <target dev='vnet0'/>

      <model type='virtio'/>

      <alias name='net0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

    </interface>

    <serial type='pty'>

      <source path='/dev/pts/0'/>

      <target port='0'/>

      <alias name='serial0'/>

    </serial>

    <console type='pty' tty='/dev/pts/0'>

      <source path='/dev/pts/0'/>

      <target type='serial' port='0'/>

      <alias name='serial0'/>

    </console>

    <input type='tablet' bus='usb'>

      <alias name='input0'/>

    </input>

    <input type='mouse' bus='ps2'/>

    <input type='keyboard' bus='ps2'/>

    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>

      <listen type='address' address='0.0.0.0'/>

    </graphics>

    <video>

      <model type='vmvga' vram='16384' heads='1'/>

      <alias name='video0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

    </video>

    <memballoon model='virtio'>

      <alias name='balloon0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

    </memballoon>

  </devices>

</domain>

Link to comment

Hmm.  Okay, created my first vm (Ubuntu desktop) and opening the vnc connection I see the familiar purple background but nothing else, and switching to the DVI graphics output of the card I'm trying to passthrough (HD 6450) there's nothing there.  Here's my XML below.  Is it not seeing the card (in PCI slot 1) because I don't have the right drivers installed?  (The card is brand new out of the box but booted into BIOS fine.)  Or is it maybe that I set BIOS to boot from integrated graphics as primary thinking that would leave the card free for passthrough?  I'll play around with it but would appreciate any pointers.  Thanks.

 

<domain type='kvm' id='2'>

  <name>Ubuntu</name>

  <uuid>812585d4-2917-534d-3393-786d44daf16c</uuid>

  <memory unit='KiB'>2097152</memory>

  <currentMemory unit='KiB'>524288</currentMemory>

  <vcpu placement='static'>1</vcpu>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>

    <boot dev='cdrom'/>

    <boot dev='hd'/>

  </os>

  <features>

    <acpi/>

    <apic/>

  </features>

  <clock offset='localtime'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='yes'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>restart</on_crash>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

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

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

      <source file='/mnt/cache/Ubuntu/Ubuntu.qcow2'/>

      <backingStore/>

      <target dev='hda' bus='virtio'/>

      <alias name='virtio-disk0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>

    </disk>

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

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

      <source file='/mnt/cache/ubuntu-14.04.2-desktop-amd64.iso'/>

      <backingStore/>

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

      <readonly/>

      <alias name='ide0-1-0'/>

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

    </disk>

    <controller type='usb' index='0'>

      <alias name='usb0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>

    </controller>

    <controller type='pci' index='0' model='pci-root'>

      <alias name='pci.0'/>

    </controller>

    <controller type='ide' index='0'>

      <alias name='ide0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:e6:f7:be'/>

      <source bridge='br0'/>

      <target dev='vnet0'/>

      <model type='virtio'/>

      <alias name='net0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

    </interface>

    <serial type='pty'>

      <source path='/dev/pts/0'/>

      <target port='0'/>

      <alias name='serial0'/>

    </serial>

    <console type='pty' tty='/dev/pts/0'>

      <source path='/dev/pts/0'/>

      <target type='serial' port='0'/>

      <alias name='serial0'/>

    </console>

    <input type='tablet' bus='usb'>

      <alias name='input0'/>

    </input>

    <input type='mouse' bus='ps2'/>

    <input type='keyboard' bus='ps2'/>

    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>

      <listen type='address' address='0.0.0.0'/>

    </graphics>

    <video>

      <model type='vmvga' vram='16384' heads='1'/>

      <alias name='video0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>

    </video>

    <memballoon model='virtio'>

      <alias name='balloon0'/>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

    </memballoon>

  </devices>

</domain>

 

Well you haven't actually passed through a GPU just yet.  The XML above doesn't contain the necessary code to pass through your GPU.  In addition, passing through a GPU and specifying VNC typically doesn't work (it's one or the other most of the time).

 

To pass through your GPU, you'll need to go to the Tools tab in the unRAID webGui and click on System Devices.  Under PCI Devices, you need to locate your GPU which will look something like this:

 

01:00.0 VGA compatible controller: AMD/ATI [Advanced Micro Devices, Inc.] Caicos [Radeon HD 6450]

 

From that line, you'll need to write down the address for the device which from the above would be 01:00.0.  (funny, I have the EXACT same card in one of my test systems).

 

Now back to your XML.  Copy the entirety of the XML you have, then remove the definition from VM Manager by clicking the yellow minus symbol when the VM is stopped (this will remove the definition, but not the image itself).  Now with your copied XML, paste it into the "add XML" tab and edit the following.

 

At the top, change your <domain> tag to read as follows:

 

<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

 

Next, go to the very end of your XML and add the following after the </devices> tag but before the </domain> tag:

 

  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=root.1,addr=00.1'/>
  </qemu:commandline>

 

Adjust the "host=" part for the address for your device.  The second device I listed of 01:00.1 is the audio function of the graphics card, so make sure you include that as well.

 

This will be so much easier when the new VM manager tool is finished...

 

EDIT:

 

Almost forgot, you need to remove this from your XML as well:

 

    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='vmvga' vram='16384' heads='1'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>

Link to comment

^^Thanks Jon.  I'm at work now but I'll try all this when I get home tonight.  I figured there was some prerequisite I missed completely for getting GPU passthrough to work since I don't recall seeing anything about it in the template.  I just figured it was something I had wrong in BIOS.  Anyway, thanks for the patient explanation. 

Link to comment

^^Thanks Jon.  I'm at work now but I'll try all this when I get home tonight.  I figured there was some prerequisite I missed completely for getting GPU passthrough to work since I don't recall seeing anything about it in the template.  I just figured it was something I had wrong in BIOS.  Anyway, thanks for the patient explanation.

 

No problem.  I can't wait to get the new VM manager out.  This thing is going to make this stuff just stupid simple, no XML editing required ;-).

Link to comment
  • trurl unpinned this topic

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.