sidux.com

Archive - new script: svmi - a virtual machine installer

h2 - Sep 04, 2007 - 09:59 PM
Post subject: new script: svmi - a virtual machine installer
First drafts are working now, see this thread for more: http://sidux.com/PNphpBB2-viewtopic-t-5686.html

Features:


To download and install:
      Code:
cd /usr/local/bin; wget -Nc techpatterns.com/svmi; chmod +x svmi; svmi


This is very early in the script's life, so only basic stuff works. To do: error handling, qemu image builder, v**multimedia** instructions, vmx file downloader.

If you use v**multimedia**, the any any patch updater and runner will be a pleasant surprise for you, I made it to scratch my pet peeve of having to manually run any any each kernel update, now it's all automatic.

This script is basically a companion script for sgfxi, and like it, offers both free and non free options.

Once it's a bit more solid, I'll add in the svmi option to post dist-upgrade options in smxi so it's all integrated.
craigevil - Sep 04, 2007 - 10:36 PM
Post subject: RE: new script: svmi - a virtual machine installer
Once again h2 you rock. Between you, the awesome devs and the sweet apps xadras keeps coming up with, sidux rules.
hubi - Sep 04, 2007 - 10:47 PM
Post subject: RE: new script: svmi - a virtual machine installer
h2 magic again.

Thank you so much,
hubi
Lanzi - Sep 04, 2007 - 11:02 PM
Post subject: RE: new script: svmi - a virtual machine installer
Wow...
That is really cool! Thanks a lot
DeepDayze - Sep 04, 2007 - 11:32 PM
Post subject: RE: new script: svmi - a virtual machine installer
Sweet! H2 strikes again with another sidux gem Smile
BenGoodrich - Sep 04, 2007 - 11:44 PM
Post subject: Re: new script: svmi - a virtual machine installer
      h2 wrote:
First drafts are working now, see this thread for more: http://sidux.com/PNphpBB2-viewtopic-t-5686.html


From the other thread, re: KVM

      h2 wrote:
Seems doable, but I have no way to test that myself, since it appears my cpus are not cabable.


Actually, according to http://packages.debian.org/sid/kvm ,

-------------------------------------------------------------------------------
For the best performance the processor must support hardware virtualization, provided by AMD's SVM capability and Intel's VT. To find out if your processor has the necessary support, do as follows:

* Make sure you run Linux 2.6.16 or newer for AMD processors, or Linux 2.6.15 for Intel processors. Older Linux versions do not report the virtualization capabilities.

* Run this command in a shell: egrep '^flags.*(vmx|svm)' /proc/cpuinfo

If it prints anything, the processor provides hardware virtualization support and is suitable for use with KVM.

Without hardware support, KVM falls back to the considerably slower QEMU-based software virtualization. In this case, it makes more sense to use the qemu package, possibly with the kqemu package for better performance.
-----------------------------------------------------------------------------------

So, one could test if the future version of the smvi script were installing kvm correctly even without the necessary hardware; the VM would just run no faster than it does with (k)qemu.
jaegermeister - Sep 05, 2007 - 12:53 AM
Post subject:
Wonderful idea, thx a lot!!!!!!
mb - Sep 05, 2007 - 01:39 AM
Post subject:
svmi is truly impressive!
h2 - Sep 05, 2007 - 02:39 AM
Post subject:
I am impatient, and have added now an svmi starter in post du tweaks part of smxi.

It will just start smxi with the basic options, but I might modify that so users can set certain actions to always occur by default when they run it, like making a new kernel module etc.

We'll see.

I'll try to get the worst rough edges off it tonight, but it's more or less functioning.

But remember, it won't create your vmware images or vmx files for you yet, you still need to do that manually with vmware player, but the basic setup is now available.
h2 - Sep 05, 2007 - 07:00 AM
Post subject:
version 0.5.10: error handling and logging running, all logs go to one file so we can use logrotate: /var/log/svmi.log

I'll add a bit more logging later.

Improved vmware installer and anyany installer to give some information about how to proceed.

Should be a bit more intuitive, but still needs work.

Still do to: qemu image builder for v**multimedia**

This script is now also a module for smxi, so you can start it that way too if you want.
rh - Sep 05, 2007 - 07:51 AM
Post subject:
very fine like all from h2 ...
wegface - Sep 05, 2007 - 09:15 AM
Post subject:
nice work h2, very nice. Smile
Dutchy - Sep 05, 2007 - 10:10 AM
Post subject:
I am just itching to try this. Excellent work h2
DeepDayze - Sep 05, 2007 - 01:18 PM
Post subject:
Another thing...vbox 1.5 hit sid Smile
BenGoodrich - Sep 05, 2007 - 08:14 PM
Post subject:
Building the virtualbox-ose-modules with svmi fails in the case where the modules that were pre-built by slh are already installed
      Code:
Done with /usr/src/virtualbox-ose-modules-2.6.23-rc5-slh-smp-3_1.5.0-dfsg-1+1_i386.deb .
dpkg -Ei /usr/src/virtualbox-ose-modules-2.6.23-rc5-slh-smp-3_1.5.0-dfsg-1+1_i386.deb
Selecting previously deselected package virtualbox-ose-modules-2.6.23-rc5-slh-smp-3.
(Reading database ... 280878 files and directories currently installed.)
Unpacking virtualbox-ose-modules-2.6.23-rc5-slh-smp-3 (from .../virtualbox-ose-modules-2.6.23-rc5-$
dpkg: error processing /usr/src/virtualbox-ose-modules-2.6.23-rc5-slh-smp-3_1.5.0-dfsg-1+1_i386.de$
 trying to overwrite `/lib/modules/2.6.23-rc5-slh-smp-3/misc/vboxdrv.ko', which is also in package$
Errors were encountered while processing:
 /usr/src/virtualbox-ose-modules-2.6.23-rc5-slh-smp-3_1.5.0-dfsg-1+1_i386.deb

I: Direct installation failed, trying to post-install the dependencies

apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
ERROR: (197) The module: vboxdrv failed to build.

Time stamped error logs are located here: /var/log/svmi.log
Exiting script now.


h2 - Sep 05, 2007 - 09:56 PM
Post subject:
ah, good, that didn't take long for fringe cases to appear.

I'm probably going to improve the module builder, I'll add some tests to find smxi installed kernels, then use their modules by default, and with m-a build the module as a backup, that should cover all of it.

We'll have to see how this one goes, there will be some exceptions that will have to be handled as they appear.

I guess I'll do more the sgfxi style, remove any module first, then install. That has worked well in sgfxi for a while now, so no reason to redo the logic that much.
h2 - Sep 06, 2007 - 01:07 AM
Post subject:
BenGoodrich, thanks for the excellent testing and bug reports.

I believe I have this issue corrected now, version 0.5.52 should now correctly remove all previous modules before proceeding.

svmi will now first test for presence of slh packaged vbox module in /usr/src/kernel-downlaods/$(uname -r). This will work fine for smxi users, and anyone who creates that directory.

If it finds that module, it will use it, and if it doesn't, it will m-a install it from source as it did before.

It's too hard to make the script handle non smxi standard locations, so I'm not going to worry about that.

You should now be able to install kernel vbox modules all day long to your heart's content if it's working. Give it a try.
BenGoodrich - Sep 06, 2007 - 01:50 AM
Post subject:
      h2 wrote:
BenGoodrich, thanks for the excellent testing and bug reports.


No problem. Thanks for writing all these scripts. They are awesome, and even more awesome when they work in fringe cases (I am a fringe case magnet). I wish I were better at bash scripting and had a little more time right now, so I could send patches for the errors, kvm, etc. instead of just reporting back.

The vbox module option seems to be working now, but I did get something about a symlink while doing it

      Code:
Updated infos about 1 packages
Getting source for kernel version: 2.6.23-rc5-slh-smp-3
Kernel headers available in /usr/src/linux
Creating symlink...
Couldn't create the /usr/src/linux symlink!

h2 - Sep 06, 2007 - 04:50 AM
Post subject:
Version 0.6.0: new feature, I discovered this is broken in vbox: the option to download and install the iso for guest addons. You definitely need guest addons if you're going to run windows, otherwise the graphics are crippled.

To download and install this using the correct url for vbox 1.5 (make sure to upgrade first) just run the option, it will download the addons iso file to the right place, using the right url, and then when you run your virtual machine, the addons can be run using the 'devices' menu item, 'Install guest addons'. In windows, for example, it will find the iso, then install the required drivers.
Dutchy - Sep 06, 2007 - 04:57 PM
Post subject:
h2, you are definitely making things too easy for us. How are we ever supposed to learn how to do things if they all work by magic with your scripts?

Don't you realize that some of us switched to using GNU/Linux to actually learn how things worked. We don't care if they work, we only care how. Wink

Seriously, great job!
BenGoodrich - Sep 06, 2007 - 07:14 PM
Post subject:
On amd64, I think v**multimedia** requires ia32-libs to work correctly; without ia32-libs I experienced the same problem as this guy http://www.vmware.com/community/thread.jspa?messageID=619999&#619999
so maybe smvi should check the arch and install ia32-libs if necessary when the user tries to install v**multimedia**?
h2 - Sep 06, 2007 - 11:09 PM
Post subject:
sounds like a good idea, I'll have it do that.
rodneyck - Sep 07, 2007 - 12:21 AM
Post subject:
Is there any documentation ...we are talking vmware 101 here.... that would help a newbie get his/her feet wet? I have to duel boot Vista (for work) and sidux. It would sure be nice to use vmware/vbox or whatever its called to do so...but I can't find any information on discovery from the ground up.
Aurelius - Sep 07, 2007 - 12:46 AM
Post subject:
      rodneyck wrote:
Is there any documentation ...we are talking vmware 101 here.... that would help a newbie get his/her feet wet? I have to duel boot Vista (for work) and sidux. It would sure be nice to use vmware/vbox or whatever its called to do so...but I can't find any information on discovery from the ground up.


rodneyck, sorry, I'm just a little curious here, you use Vista for work? Sounds dangerously cutting edge. Wink
BenGoodrich - Sep 07, 2007 - 01:23 AM
Post subject:
      rodneyck wrote:
Is there any documentation ...we are talking vmware 101 here.... that would help a newbie get his/her feet wet? I have to duel boot Vista (for work) and sidux. It would sure be nice to use vmware/vbox or whatever its called to do so...but I can't find any information on discovery from the ground up.


First, Microsoft put a clause in the EULA that says only certain premium editions of Vista are allowed to run in a virtual machine, but perhaps you have that edition at work (and dual-core and a lot of RAM, etc.). There are forums and a lot of documentation at www.vmware.com and www.virtualbox.com . I would start with http://www.virtualbox.org/download/UserManual.pdf .
DeepDayze - Sep 07, 2007 - 01:31 AM
Post subject:
XP is OK to run in a VM though...provided that the copy of XP is legally licensed.
rodneyck - Sep 07, 2007 - 02:31 AM
Post subject:
Good to know guys...and thanks for the links Ben. I hate Vista with a passion, but everything is Microsoft at work...even the server. It's like living in some alternate universe where everyone has pig heads and you are forced to use Vista.
DeepDayze - Sep 07, 2007 - 03:00 PM
Post subject:
What version of Vista you going to install, rodneyck? Vista Business?
drb - Sep 07, 2007 - 03:18 PM
Post subject:
Is there any advantage of vmware to try new linux distros - like the lates sidux for instance, rather than installing conventionaly on a separate partition?

drb
slam - Sep 07, 2007 - 03:32 PM
Post subject:
      drb wrote:
Is there any advantage of vmware to try new linux distros - like the lates sidux for instance, rather than installing conventionaly on a separate partition?

drb

Actually ther is a huge advantage in installing sidux as host system, and throw all other operatings systems in virtual machines - you remain using a stable operating system that does it's job - operating.

Greetings,
Chris
drb - Sep 07, 2007 - 06:32 PM
Post subject:
slam

That's my starting point but I guess you want people to 'test' new RCs - in which case, whilst keeping my stable updated chaos, is there any advantage of v**multimedia** over a conventional separate installation?

drb
piper - Sep 08, 2007 - 02:25 PM
Post subject:
vista-vbox (ouch)
DeepDayze - Sep 08, 2007 - 03:24 PM
Post subject:
What version of Vista, piper?
piper - Sep 08, 2007 - 03:55 PM
Post subject:
Ultimate
All times are GMT - 12 Hours
Powered by PNphpBB2 © 2003-2009 The Zafenio Group
Credits