Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Not clear on unRAID VM "roles and responsibilities"

Featured Replies

I have a VM that works *manually*.  The trouble is getting this to work the way I want automatically.  Which leads to this question.

 

I'm currently on beta 10a, not sure when 11 will be out, nor how 11 will affect my question.

 

It seems conceptually you have three problems to solve with a VM

1) boot configuration (passthrough hardware like GPU, controllers, able to support shutdown/restart)

2) runtime configuration (attached devices (i.e., usb), triggering vm power state changes)

3) interaction with host OS (auto start of VM, shutting down the VM when the unRAID is shut down)

 

In my mind, these three ought to be handled independently.  I'm struggling because at this point, they don't seem to be.

 

I have been testing with my array off.  Having had some issues where I had to power off the hardware, this avoids the parity check.  I have to manually start libvirt, but then I can use the command line to start/test the VM, without worrying about the xml being modified.  As I mentioned elsewhere, I think we should be sharing the XML *input* to libvirt - before libvirt inserts default stuff for your hardware - instead of libvirt's dumpxml output.

 

It isn't clear, though, what happens when I start the array.  I think the dmacias' plugins modify libvirt to help with clean startup/shutdown, and with resetting things when the VM is restarted (GPU reset).  It isn't clear what this does to an already running VM.  Am I right about this?  If so, is it possible to do the same thing without needing the array to be on, or manually?  It seems like I should be able to validate a VM (step #1 above) without needing the array to be on.

 

I think a web UI for #2 is ideal, both in terms of exposing the available options in human readable form, and making it easy to make changes.  Arguably this should be possible without the array being on as well.

 

#3 is where the real value is, in terms of being able to count on the VM being available without intervention.  But I'm not sure how to get there.  I'm not sure how to step from "my VM works manually" to "my VM works".  I think this is because of the extra variables mixed in with the plugins and array state.  It seems like the #3 functionality is built into the plugins, but tied to array stop/start instead of host power up/down.

 

I hope this question doesn't offend limetech or dmacias or anyone else.  I really appreciate the work going into adding this feature.  It feels like I'm waiting for the next beta to fix something, as I feel a bit stuck getting my VM where I want.  This is my attempt to put my finger on the problem I'm having.  My tendency in troubleshooting is to remove layers, but I'm not sure what the plugins do. 

 

No offense here.  I'll try to explain what the plugins do.  The virtMan plugin basically just uses the existing rc.libvirt to start and stop libvirt based on array start and stop.  It is mainly tied to array start and stop because most use the cache drive for vm images or for vm storage (where stuff is downloaded to).  virtMan also uses a 1.5 MB loopback image mounted to /etc/libvirt so any vm's that are defined and set to autostart are persistent. The reason for the loopback is because libvirt uses symlinks for autostarting which won't work on a fat32 filesystem like on the usb stick.

 

Previously to virtMan I used the powerdown plugin to start and stop libvirt on boot/shutdown using s and k scripts and symlink /etc/libvirt to an ssd outside the array which is also where I store my vm images. This sounds like what you would want. virtMan could easily be modified to remove the array events by removing them from the tarball that is downloaded when you install the plugin.

 

For a management or visual representation of your vms I would suggest the vmMan plugin. Its just php/html I wrote that interacts with libvirt and displays everything in a VMs tab in unRAID. Only thing it's dependent on is libvirt running. It's not an app or program and doesn't matter if the array is started or stopped.

 

Hope this helps some. Any questions or suggestions are welcome.

 

  • Author

Thanks, that helps me a lot.  I guess I am unusual in not using my cache drive for VMs.

 

Can you give a bit more detail on how I could have virtMan configured to start/stop with host power up/down?

 

For vmMan, I didn't realize that was how it worked.  I thought it was closer to your webvirtman plugin.  One suggestion would be to have a way to hand an input xml file to libvirt for creating a VM.  That way you don't have all of the hardware specific stuff you get from dumpxml.  Another suggestion would be to differentiate between settings you can change on-the-fly (like attaching devices) from ones that require the VM to be restarted, as I described in my original post.

Does the Stop command do a "SAVESTATE" (similar to hibernate in Windows) as my VirtualBox plugin does or does it perform a full OS shutdown?

 

Does the Stop command do a "SAVESTATE" (similar to hibernate in Windows) as my VirtualBox plugin does or does it perform a full OS shutdown?

No but I added a managed save button that does this.  It's the down arrow with the line under it next to stop. I also added snapshots on the individual domain info page..

Does the Stop command do a "SAVESTATE" (similar to hibernate in Windows) as my VirtualBox plugin does or does it perform a full OS shutdown?

No but I added a managed save button that does this.  It's the down arrow with the line under it next to stop. I also added snapshots on the individual domain info page..

 

Can it be changed or how can it be changed so that when array is stopped all VMs are "SAVESTATE"ed and not fully shutdown/powered down

 

 

Thanks, that helps me a lot.  I guess I am unusual in not using my cache drive for VMs.

 

Can you give a bit more detail on how I could have virtMan configured to start/stop with host power up/down?

 

For vmMan, I didn't realize that was how it worked.  I thought it was closer to your webvirtman plugin.  One suggestion would be to have a way to hand an input xml file to libvirt for creating a VM.  That way you don't have all of the hardware specific stuff you get from dumpxml.  Another suggestion would be to differentiate between settings you can change on-the-fly (like attaching devices) from ones that require the VM to be restarted, as I described in my original post.

I just made the plugin for webvirtmgr and got it to work with unraid.  I have nothing to do with the program itself. It's still a python based script running it's own web server to connect to it. vmMan is all me with code from a few different sources to get me started.

 

I agree with what you said previously about sharing xml's and the dumpxml. It's what caused me the most problems in the beginning with kvm.  The +XML button next to +CREATE allows creating a vm from pasting in an xml. So does editing an existing vm.

 

The on-the-fly stuff will be on the individual domain's page. Right now all you can do is delete disks but I have the add or change disk almost ready and dropboxes for memory and cpus.

Does the Stop command do a "SAVESTATE" (similar to hibernate in Windows) as my VirtualBox plugin does or does it perform a full OS shutdown?

No but I added a managed save button that does this.  It's the down arrow with the line under it next to stop. I also added snapshots on the individual domain info page..

 

Can it be changed or how can it be changed so that when array is stopped all VMs are "SAVESTATE"ed and not fully shutdown/powered down

 

Does the Stop command do a "SAVESTATE" (similar to hibernate in Windows) as my VirtualBox plugin does or does it perform a full OS shutdown?

No but I added a managed save button that does this.  It's the down arrow with the line under it next to stop. I also added snapshots on the individual domain info page..

I responded before you even posted. :)

Edit. Still trying to figure out tapatalk notification problem since replacing phone.

Does the Stop command do a "SAVESTATE" (similar to hibernate in Windows) as my VirtualBox plugin does or does it perform a full OS shutdown?

No but I added a managed save button that does this.  It's the down arrow with the line under it next to stop. I also added snapshots on the individual domain info page..

 

Can it be changed or how can it be changed so that when array is stopped all VMs are "SAVESTATE"ed and not fully shutdown/powered down

The virtMan plugin uses the default unRAID rc.libvirt script.  It could be modified to save domains instead of stopping them when libvirt it's stopped.

Just change tks line

/usr/sbin/virsh shutdown $j

to

/usr/sbin/virsh save $j

 

Some domains won't save so you might want to add a shutdown loop between the save and the destroy loop.

 

e.g. if you have a sata instead of ide cdrom drive defined in the domain, it won't save.

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.