New to KVM and confused


Recommended Posts

I am brand new to KVM, previous user of VirtualBox and regular user of Docker.

 

I have read all I could find in this subforum and on the wiki but only got myself confused;

 

Let me begin!!:

I have unRAID booted in normal (non-Xen) mode

 

I have added the VM manager Plugin from here

 

I HAVE seen the "No domains defined. Create from template or add XML." error at the bottom on the KVM page, googling it I got to

 

https://lime-technology.com/wiki/index.php/UnRAID_Manual_6#Preconfigured_Templates

 

but I cannot find any preconfigured templates to download as mentioned in the wiki so I continue...

 

I have tried to set up a Virtual Machine as shown here:

 

pZIfiqF.png

 

e9F7K6H.png

 

When I click Create VM, nothing happens.

 

 

 

So what is a Domain xml etc.? also do I need to set up a network bridge?

 

I am sure I have missed something really obvious but any help for a VM noob would be really helpful!!

Link to comment

Could anyone tell me what needs to be changed to made my virtual drive appear as a SATA drive instead of an IDE drive??

 

According to this blog post:

 

http://www.blisshq.com/music-library-management-blog/2014/06/03/installing-vortexbox-kvm/

 

VortexBox expects the HDD to be located at /dev/sda (SATA) instead of /dev/hda (IDE) or the install fails.

I need to set VirtualDrive to appear as a SATA drive

 

I have tried to change "Disk dev name:" to sda instead of hda, but still no luck.

 

Any ideas?

 

Thanks!

 

Link to comment

For anyone interested; the solution was:

 

In the xml, replace this:

 

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

 

with:

 

    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/mnt/cache/VMs/HDDs/VortexBox/VortexBox.qcow2'/>
      <backingStore/>
      <target dev='sda' bus='sata'/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

 

Now the VM sees the drive as sda correctly.

Link to comment

For existing image files, you can use it this way, but if you're starting a new VM, you're going to want to use Virtio type.  You'll then need to attach the virtio-drivers disc to the VM and pull the drivers off of it at OS install, otherwise it won't be able to see the install.

 

Virtio will have better performance than straight sata.  You can change this once the VM is created by adding a different image file using virtio, then booting up and loading the drivers for the drive.  Then shut down, change the OS to virtio, and boot back up.  Make a backup of the image file and xml before you do this, though, just in case.  It can be a bit finicky sometimes.

Link to comment

Could anyone tell me what needs to be changed to made my virtual drive appear as a SATA drive instead of an IDE drive??

 

According to this blog post:

 

http://www.blisshq.com/music-library-management-blog/2014/06/03/installing-vortexbox-kvm/

 

VortexBox expects the HDD to be located at /dev/sda (SATA) instead of /dev/hda (IDE) or the install fails.

I need to set VirtualDrive to appear as a SATA drive

 

I have tried to change "Disk dev name:" to sda instead of hda, but still no luck.

 

Any ideas?

 

Thanks!

If you pick q35 machine type under the Create VM tab it will set the drives to sata.  The pc machine type uses ide.

Edit: it just sets the cdrom to sata but the image files are still virtio. But like said before you can change them after.

 

Link to comment
  • 1 month later...

try with the following, it worked for me:

 <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source file='/mnt/disk1/Images/vortexbox/vdisk1.img'/>
      <target dev='sda' bus='scsi'/>
      <boot order='1'/>
      <alias name='scsi0-0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Images/vortexbox-2.3.iso'/>
      <target dev='sdb' bus='sata' tray='open'/>
      <readonly/>
      <boot order='2'/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

Link to comment
  • 6 months later...

@tasraison,  would you mind posting your entire xml file to make a working vortexbox vm?

 

Here is my current Vortexbox xml, I honestly cannot remember but I think I may have edited it post initial setup to improve performance.

 

Things like changing the virtual disk drivers back to "virtio"

 

<domain type='kvm' id='4'>
  <name>VortexBox</name>
  <uuid>3f5c5613-71c2-7589-5b5f-563ae2438247</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="fedora.png" os="fedora"/>
  </metadata>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='1'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <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' cache='writeback'/>
      <source file='/mnt/cache/VMs/HDDs/VortexBox/vdisk1.img'/>
      <backingStore/>
      <target dev='hdb' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb'/>
      <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='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:db:d5:64'/>
      <source bridge='br0'/>
      <target dev='vnet1'/>
      <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>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/VortexBox.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='5901' autoport='yes' websocket='5701' listen='0.0.0.0' keymap='en-us'>
      <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='0x06' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Link to comment

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.