Jump to content
SpaceInvaderOne

Video guide *** How to connect virt-manager to unRAID to help manage your VMs **

12 posts in this topic Last Reply

Recommended Posts

Hi, Guys. I have made a video about how to connect virt-manager to your unRAID server to help manage and edit your VMs.

I find it very useful for editing VMS with custom edits to prevent the custom edits being deleted.

It's great for adding a GPU to an OS X VM or editing say a windows VM with a ROM file passed through for the GPU.

If you use qcow2 format for disks you can also use snapshots with it.

 

How to connect virt-manager to unRAID to help manage your VMs

 

 

  • Like 1

Share this post


Link to post

What about QED? That supports snapshots as well, and I've at least "heard" there may be better performance from QED versus QCow2, but it needs testing.

Share this post


Link to post

What about QED? That supports snapshots as well, and I've at least "heard" there may be better performance from QED versus QCow2, but it needs testing.

Yes, QED is meant to be faster I think. Virt-manager 1.0 started supporting snapshots in 2014 but I don't think virt-manager supports QED for snapshots  but I'm not sure, though.

Share this post


Link to post

It also appears that you are configuring libvirtd to be an unauthenticated listener on all interfaces. The less usual approach I am used to seeing is to install netcat-openbsd, which requires a different Slack package than the one provided in NerdPack, and configure the virt-manager connection from a command line:

 

virt-manager -c qemu+ssh://root@tower/system?socket=/var/run/libvirt/libvirt-sock

 

Once this has been run, assuming the server has a version of the Netcat command supporting the -U switch to connect to Unix sockets, it should be able to pass through to libvirtd. Once this has been added to virt-manager, it should persist across restarts.

 

Furthermore, there is also a Homebrew tap on Github for virt-manager and virt-viewer, and it only requires a two line modification to the virt-manager.rb (brew edit virt-manager) to import a newer version of libvirt-python to bypass a compile time error which occurs on Sierra systems. Also, due to another bug with Sierra, this virt-manager will require the --no-fork switch to prevent a startup crash, but can still be launched into the background by appending an ampersand (&) to the command line.

 

E 1: Okay, here's what you need for a more secure connection path that doesn't require a libvirtd.conf edit:

 

You'll need libbsd and netcat-openbsd. You'll need a Slackware 14.2 install or the live DVD to build them.

 

1) Download the SlackBuilds and source packages for the above from the root account.

2) Unpack libbsd.tar.gz.

3) cd to libbsd.

4) ln -s ../libbsd-0.8.3.tar.gz ./

5) ./libbsd.SlackBuild

 

Now you'll have a libbsd package in /tmp/.

 

1) installpkg /tmp/libbsd*.tar.gz

2) cd back to root, or .. from the above steps.

3) Unpack netcat-openbsd.tar.gz.

4) cd to netcat-openbsd.

5) ln -s ../netcat-openbsd_* ./

6) removepkg nc

7) ./netcat-openbsd.SlackBuild

 

Now you'll also have a netcat-openbsd package in /tmp/. Transfer both of these packages to a share on unRAID:

 

1) scp /tmp/*.tar.gz root@<tower ip>:/mnt/user/<share>/

 

Now you may install them from unRAID SSH or Telnet:

 

1) cd <wherever you copied them>

2) If you have NerdPack GNU netcat installed, disable it in the NerdPack UI, which doesn't actually remove it, then run removepkg nc.

3) installpkg libbsd*.tar.gz

4) installpkg netcat-openbsd*.tar.gz

Share this post


Link to post

It also appears that you are configuring libvirtd to be an unauthenticated listener on all interfaces. The less usual approach I am used to seeing is to install netcat-openbsd, which requires a different Slack package than the one provided in NerdPack, and configure the virt-manager connection from a command line:

 

virt-manager -c qemu+ssh://root@tower/system?socket=/var/run/libvirt/libvirt-sock

 

Once this has been run, assuming the server has a version of the Netcat command supporting the -U switch to connect to Unix sockets, it should be able to pass through to libvirtd. Once this has been added to virt-manager, it should persist across restarts.

 

Furthermore, there is also a Homebrew tap on Github for virt-manager and virt-viewer, and it only requires a two line modification to the virt-manager.rb (brew edit virt-manager) to import a newer version of libvirt-python to bypass a compile time error which occurs on Sierra systems. Also, due to another bug with Sierra, this virt-manager will require the --no-fork switch to prevent a startup crash, but can still be launched into the background by appending an ampersand (&) to the command line.

 

E 1: Okay, here's what you need for a more secure connection path that doesn't require a libvirtd.conf edit:

 

You'll need libbsd and netcat-openbsd. You'll need a Slackware 14.2 install or the live DVD to build them.

 

1) Download the SlackBuilds and source packages for the above from the root account.

2) Unpack libbsd.tar.gz.

3) cd to libbsd.

4) ln -s ../libbsd-0.8.3.tar.gz ./

5) ./libbsd.SlackBuild

 

Now you'll have a libbsd package in /tmp/.

 

1) installpkg /tmp/libbsd*.tar.gz

2) cd back to root, or .. from the above steps.

3) Unpack netcat-openbsd.tar.gz.

4) cd to netcat-openbsd.

5) ln -s ../netcat-openbsd_* ./

6) removepkg nc

7) ./netcat-openbsd.SlackBuild

 

Now you'll also have a netcat-openbsd package in /tmp/. Transfer both of these packages to a share on unRAID:

 

1) scp /tmp/*.tar.gz root@<tower ip>:/mnt/user/<share>/

 

Now you may install them from unRAID SSH or Telnet:

 

1) cd <wherever you copied them>

2) If you have NerdPack GNU netcat installed, disable it in the NerdPack UI, which doesn't actually remove it, then run removepkg nc.

3) installpkg libbsd*.tar.gz

4) installpkg netcat-openbsd*.tar.gz

 

Wow, thanks, Kode54. Excellent information. I will try setting up that way. :)

 

I have tried using the homebrew-virt-manager on osx but never got it worKing. I would really like to have it in osx. When I've got some time I will go back to trying. But I am on Sierra now unfortunately. So it seems there will be more hurdles now than previously :(

Share this post


Link to post

Setting it up in Sierra is not terribly difficult. For now, the only hurdle is the libvirt-python version used.

 

1) brew tap jeffreywildman/virt-manager

2) brew edit virt-manager, search for "2.1.0", which should locate the libvirt-python link. Replace version number with "2.4.0", and replace the sha256 sum with "aa087cca41f50296306baa13366948339b875fd722fc4b92a484484cd881120c".

3) brew install virt-manager virt-viewer.

4) Due to outstanding issue #62 with jeffreywildman/virt-manager, remember to supply --no-fork switch when invoking virt-manager from the Terminal.

 

E1: Something I just remembered. KVM+Qemu does support saving snapshots, but if you have any hardware passthrough, it doesn't support saving snapshots of a running VM.

Share this post


Link to post

Setting it up in Sierra is not terribly difficult. For now, the only hurdle is the libvirt-python version used.

 

1) brew tap jeffreywildman/virt-manager

2) brew edit virt-manager, search for "2.1.0", which should locate the libvirt-python link. Replace version number with "2.4.0", and replace the sha256 sum with "aa087cca41f50296306baa13366948339b875fd722fc4b92a484484cd881120c".

3) brew install virt-manager virt-viewer.

4) Due to outstanding issue #62 with jeffreywildman/virt-manager, remember to supply --no-fork switch when invoking virt-manager from the Terminal.

 

E1: Something I just remembered. KVM+Qemu does support saving snapshots, but if you have any hardware passthrough, it doesn't support saving snapshots of a running VM.

 

Kode54 . Thanks so much all working for me now. Im so happy I wanted this on osx for a long time. Its the latest 1.4.0 version aswell! :) :)

 

When i ran brew edit virt-manager i didnt even have to change anything as 2.4.0 was already there. So this must have been recently updated.

Just had to install xquartz then virt-manager virt-viewer

And works perfectly with the --no-fork switch

 

 

Share this post


Link to post

virt-manager isn't included by default, but I assume you already had that tap configured on your system. And I guess the developer already updated their libvirt-python package reference. Glad I could help, though.

Share this post


Link to post

Got everything working as well from terminal. Is there a way to create a short cut in launchpad that opens virt-manager in terminal with --no-fork with a click of a button?

Share this post


Link to post

Got everything working as well from terminal. Is there a way to create a short cut in launchpad that opens virt-manager in terminal with --no-fork with a click of a button?

 

Hi this is how i did it and got icon into it aswell

Screen_Shot_2016_11_06_at_13_16_12.png

 

1. open textedit and set for plain text then put the following into it

 

#!/bin/bash
virt-manager --no-fork

 

2. save file as name 'vm' (make sure you uncheck if no file extension given use txt)

 

3. make file executable by running this command in terminal

 

chmod +x <filename and location>

 

for example chmod +x /Users/ed/Desktop/vm

 

4. now move file to applications/utilities

 

5. open automator from applications

 

choose run shell script and enter

 

Open /Applications/utilities/terminal.app /Applications/Utilities/vm

 

 

 

Screen_Shot_2016_11_06_at_12_41_03.png

 

6. save as type application and call vm again.

 

7. change icon. I have put a link to the files i use here . https://www.dropbox.com/s/xf5a323pivjskkk/vm%20manager%20osx%20dock%20files.zip?dl=0

 

Inside you will find a file called vm manager icon. Now goto the vm.app you just made with automator.

right click it and goto get info. In top left side of the box you will see a small icon there. drag the vmmanager icon over that to replace it.

 

8. Move the vm.app to your applications folder then drag it to the dock and you will have it in dock with correct icon  :)

 

Share this post


Link to post

Great stuff.... but I getting error when installing .......

 

Peters-mac:virtmanager peter$ brew tap jeffreywildman/virt-manager
Peters-mac:virtmanager peter$ brew install virt-manager virt-viewer
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Installing virt-manager from jeffreywildman/virt-manager
Error: You must `brew link intltool pkg-config` before jeffreywildman/virt-manager/virt-manager can be installed
==> Installing virt-viewer from jeffreywildman/virt-manager
Error: You must `brew link intltool pkg-config` before jeffreywildman/virt-manager/virt-viewer can be installed
Peters-mac:virtmanager peter$ 
Peters-mac:virtmanager peter$ 
Peters-mac:virtmanager peter$ brew link intltool pkg-config
Linking /usr/local/Cellar/intltool/0.51.0... 
Error: Could not symlink .
/usr/local/opt is not writable.
Peters-mac:virtmanager peter$ sudo brew link intltool pkg-config
Password:
Error: Cowardly refusing to 'sudo brew link'
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.
Peters-mac:virtmanager peter$ brew install virt-manager virt-viewer
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Installing virt-manager from jeffreywildman/virt-manager
Error: You must `brew link intltool pkg-config` before jeffreywildman/virt-manager/virt-manager can be installed
==> Installing virt-viewer from jeffreywildman/virt-manager
Error: You must `brew link intltool pkg-config` before jeffreywildman/virt-manager/virt-viewer can be installed
Peters-mac:virtmanager peter$ brew link intltool pkg-config
Linking /usr/local/Cellar/intltool/0.51.0... 
Error: Could not symlink .
/usr/local/opt is not writable.
Peters-mac:virtmanager peter$ 

Share this post


Link to post

It's OK, I run brew doctor and brew update.... now it's installing

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now