Jump to content
rorton

(SOLVED) vmdk image to run on Unraid?

17 posts in this topic Last Reply

Recommended Posts

KVM can handle vmdk files directly.     The only caveat is that you have to enter the full path to the vmdk when creating the VM as the GUI does not provide a selector for that file type.  

Share this post


Link to post

thanks

 

i just tried, and i get this far:

 

 

LibreError.png.01477bd79e63cfa14989d051a62d832a.png

 

Image here /mnt/cache/vms/LibreNMS/vdisk1.img

ISO here /mnt/user/isos/librenms_centos_7.vmdk

 

 

Share this post


Link to post

Is the image UEFI compatible? Try creating a new VM template, this time select SeaBIOS instead of OVMF before starting it for the first time. Advanced view.

Share this post


Link to post

thanks, wasn't aware of the advanced tab!

 

so used that, and i get a diff BIOS boot now:Boot_error.thumb.png.84f45c87e36dc0fc382fe545d0d088fc.png

 

Im guessing this is an issue with the VMDK file?

 

my xml for the vm is:

 

<domain type='kvm' id='31'>
  <name>Libre</name>
  <uuid>05cdac3e-6001-b20c-6a2d-7f700b29f005</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>524288</memory>
  <currentMemory unit='KiB'>524288</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>1</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.10'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='1' 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/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/vms/Libre/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/librenms_ubuntu_1604.vmdk'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
      <readonly/>
      <boot order='2'/>
      <alias name='sata0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x15'/>
      <alias name='pci.6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <filesystem type='mount' accessmode='passthrough'>
      <source dir='/mnt/user/data/'/>
      <target dir='data'/>
      <alias name='fs0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </filesystem>
    <interface type='bridge'>
      <mac address='52:54:00:82:46:71'/>
      <source bridge='virbr0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' 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/domain-31-Libre/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'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 

Share this post


Link to post

Try switching the vdmk to boot order 1 and the vdisk to boot order 2. Why do you even have a vdisk entered? I thought you were trying to run the vdmk as the VM's hard drive?

Share this post


Link to post
15 hours ago, jonathanm said:

Try switching the vdmk to boot order 1 and the vdisk to boot order 2. Why do you even have a vdisk entered? I thought you were trying to run the vdmk as the VM's hard drive?

 

tried that, still the same - no ideas why i have a disk setup, this is the first time ive messed about with the VM side of things, so really don't know how it works. 

 

I assumed that the vmdk was the equivalent of an ISO, and i needed to set it up like that

 

Are you saying that the vmdk is the replacement for the .img file and should sit in my vm disks folders?

Edited by rorton
vmdk spell checked as vodka again!

Share this post


Link to post

I had no problems getting this to run!    I did the following when creating the VM:

  • create a new VM and select the Centos option
  • make sure that the Advanced view is selected (at top right)
  • set the BIOS to use SeaBios
  • Set the primary vdisk to use SATA, Manual mode and then set the path to point to the .vmdk file
  • set the network to a bridged connection (br0 in my case)
  • create the VM

it will now be running and you can connect to it via the built-in VNC Remote or via a VNC client running on another machine (using the port shown for the running VM).   If you want to connect directly to the VM bypassing VNC then you will need to gets its IP address either from your router, or using a scanning application such as Fing, or by doing an ‘ifconfig’ command from a login via VNC.

 

 

Edited by itimpi
  • Like 1
  • Upvote 1

Share this post


Link to post
1 hour ago, itimpi said:

I had no problems getting this to run!    I did the following when creating the VM:

  • create a new VM and select the Centos option
  • make sure that the Advanced view is selected (at top right)
  • set the BIOS to use SeaBios
  • Set the primary vdisk to use SATA, Manual mode and then set the path to point to the .vmdk file
  • set the network to a bridged connection (br0 in my case)
  • create the VM

it will now be running and you can connect to it via the built-in VNC Remote or via a VNC client running on another machine (using the port shown for the running VM).   If you want to connect directly to the VM bypassing VNC then you will need to gets its IP address either from your router, or using a scanning application such as Fing, or by doing an ‘ifconfig’ command from a login via VNC.

 

 

THANKYOU

 

followed your points, and got it working - i need to read/play a bit with the vm stuff i think. 

 

I didn't have the disk set to sata, it was set to virtio. 

 

Share this post


Link to post
1 hour ago, rorton said:

I didn't have the disk set to sata, it was set to virtio

For that to work you would have needed the virtio drivers loaded in the VM.    I had a look at the .ova version and that was where I saw that it was expecting SATA and that it did not support UEFI (and thus the need to change to SeaBios for legacy style booting).

Share this post


Link to post
On 2/22/2018 at 4:46 PM, itimpi said:

 

  • set the network to a bridged connection (br0 in my case)

 "...gets its IP address either from your router..."

 

I'm trying to set this all up, and I got the VM working now, thanks to you! However, I was still unable to connect to the internet using this method. I'm using an openSUSE vmdk as an image, and it seems like no matter what kind of modification I do, I will not be able to pass the network controller to the vm. Any tips for this? 

 

(I have a bunch other VMs running parallel, each using br0 interface, they all able to communicate on ipv6/4.)

 

Share this post


Link to post
On 2/22/2018 at 10:46 AM, itimpi said:

I had no problems getting this to run!    I did the following when creating the VM:

  • create a new VM and select the Centos option
  • make sure that the Advanced view is selected (at top right)
  • set the BIOS to use SeaBios
  • Set the primary vdisk to use SATA, Manual mode and then set the path to point to the .vmdk file
  • set the network to a bridged connection (br0 in my case)
  • create the VM

it will now be running and you can connect to it via the built-in VNC Remote or via a VNC client running on another machine (using the port shown for the running VM).   If you want to connect directly to the VM bypassing VNC then you will need to gets its IP address either from your router, or using a scanning application such as Fing, or by doing an ‘ifconfig’ command from a login via VNC.

 

 

Thank you also for sharing and confirming!

Share this post


Link to post
Posted (edited)

Update: I am trying to migrate a SophosUTM from VMware ESXi (vmdk) to Unraid as a VM. I following these above settings and it still not seeing the disk.

It boots to "waiting for device /dev/disk/by-label/root to appear", then it results in "could not find /dev/disk/by-label/root"

Any ideas?

Edited by guruleenyc

Share this post


Link to post

Trying to boot off install ISO with br0 as interface in VM settings, but installer states "no network card was found". Any help would be appreciated.

Share this post


Link to post
1 hour ago, guruleenyc said:

Trying to boot off install ISO with br0 as interface in VM settings, but installer states "no network card was found". Any help would be appreciated.

What type of network card is being emulated?    If the default of virtio then the OS will need a virtio network driver loaded before it can access the network.    If not already present this would normally be loaded off the virtio CD image.

Share this post


Link to post
1 hour ago, itimpi said:

What type of network card is being emulated?    If the default of virtio then the OS will need a virtio network driver loaded before it can access the network.    If not already present this would normally be loaded off the virtio CD image.

Thanks for the quick reply!

My VM interface settings are:

 

<interface type='bridge'>
      <mac address='52:54:00:c2:66:6d'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>

 

Not sure how to get the virtio drivers loaded into the VM, there's no option for driver ISO under vm settings.

Share this post


Link to post
On 2/22/2018 at 10:46 AM, itimpi said:

I had no problems getting this to run!    I did the following when creating the VM:

  • create a new VM and select the Centos option
  • make sure that the Advanced view is selected (at top right)
  • set the BIOS to use SeaBios
  • Set the primary vdisk to use SATA, Manual mode and then set the path to point to the .vmdk file
  • set the network to a bridged connection (br0 in my case)
  • create the VM

it will now be running and you can connect to it via the built-in VNC Remote or via a VNC client running on another machine (using the port shown for the running VM).   If you want to connect directly to the VM bypassing VNC then you will need to gets its IP address either from your router, or using a scanning application such as Fing, or by doing an ‘ifconfig’ command from a login via VNC.

 

 

THANK YOU! Following these steps exactly got me passed the import of Wazuh VMDK "kernal panic fatal error'. It is now booting! :-) Now onto configuring it hopefully.

Share this post


Link to post

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.