Tag Archives: virtual machine

Ubuntu Server + VMWare Workstation

0/ Have your own virtual machine in your desktop is not hard!

0.1/ Some Terminology

  • OS – Operating System
  • Host OS – Underlying OS – in this you install VMWare Workstation.
  • Host needs to be stared for the guest to be able to start.
  • Guest OS – The extra OS you install inside the host or in VMWare Workstation.
  • VM – Virtual machine.

1/ Pre-install

1.1/ Storage space, memory, CPU

What do you want to do?
Do you have enough of it?
My desktop has an Intel i7-920, 8GB RAM and two 500GB hard drives.
Generally when testing I would give it 1GB or maybe 2GB for Windows. This can be decreased later if you feel the need.
You can also increase storage, memory and CPU after you create your virtual machine.
It is easy to create a new virtual machine so do not worry if you make it too small or too big.

1.2/ Network setup, LAN, Bridged, Hidden.

Do you want to be able to access your VM from your LAN, Internet or do you want a completely private network between your virtual machines?

Especially if you do set up a Windows guest OS (perhaps to use as a client in your test environment) please do remember that before you connect it to the Internet (to install patches etc) you should definitely think about installing an anti-virus solution on it.
I recommend Microsoft Security Essentials (MSE) – it is free and takes up little resources.
I read recently that the time you have until your unprotected computer is infected is about 10 seconds. But if your computer is behind a NAT – broadband router (so it has an IP like 192.168.x.x or 10.x.x.x or 172.16.x.x.x) then it is safer, but not safe from other computers on your network.

2/ Install the OS

2.2/ Download Ubuntu, easy setup wizard

There are two versions of Ubuntu – desktop and server version. If this is your first time with Linux you may be better of starting with the desktop variant. I used the server version (uses less resources – no graphical user interface).

Here is a guide for using the Ubuntu Virtual Kernel with VMWare Workstation.

2.3/ Windows 2008 R2?

sharepoint-2010-foundation-windows-2008-r2-vmware-workstation

3/ Set up management

3.1/ sshd – autostart if you reboot host OS / Windows.

I haven’t managed to set up autostart of the VM when rebooting the OS.
But then again, I do not run “life-critical” services in the virtual machine, just some cheap bash-script and an EyeOS. Not sure if I want to have it autostart, I like to have a fast reboot.

3.2/ Timezone, time.

Quite frustrating, but here is how it worked out in Linux: time-sync-for-linux-vms-in-vmware-workstation

4/ Post-Installation Joy

4.1/ Something simple like screen + irssi

This is really easy to set up.
Basically all you need to do is install these in a Debian style Linux (like Ubuntu):

sudo-apt get screen irssi openssh-server

then start a screen session called chat and the command ‘irssi’

screen -S chat irssi

It then starts irssi in a screen.
You can hit CTRL+A+D (or, CTRL+A D also works) to detach it and get back to the terminal. You can then close the terminal / log off from the server. Next time you log on you can just type:

screen -rdx chat

Irssi is my IRC tool of choice, it’s slim and well, I’ve gotten used to it. It has scripts and you can do encryption and lots of nice little things with it if you want to.

Of course the screen does not resume when you restart the whole server / virtual machine.

4.2 Other ideas:

Red Hat Enterprise Linux in VMWare Workstation.
How small VM can you have for just IRSSI?
File share from Windows to Ubuntu in a VM.
EyeOS – OS in your web browser.


HEPIX Spring 2011 – Day 5

What day it is can be told by all the suitcases around the room.

Version Control

An overview of the version control used in CERN. Quite cool, they’re not using Git yet but they are moving away from CVS to SVN (subversion) which is not updated anymore. Apparently hard to migrate.

They use DNS load balancing

  • Browse code / logging, revisions, branches: WEBSVN – on the fly tar creation.
  • TRAC – web SVN browsing tool plus: ticketing system, wiki, plug-ins.
  • SVNPlot – generate SVN statsw. No need to checkout source code (svnstats do ‘co’).

Mercurial was also suggested at the side of Git (which is founded by Linus Torvalds).

Cern – VM – FS

Cern-VM-FS (CVMFS) looked very promising. The last one is not intended at the moment for images but more for sending applications around. It uses Squid proxy server and looked really excellent. Gives you a mount point like /cvmfs/ and under there you have the softwares.

http://twitter.com/cvmfs

Requirements needed to set it up:

  • Rpms: cvmfs, -init-scripts, -keys, -auto-setup (for tier-3 sites does some system configs), fuse, fuse-libs, autofs
  • squid cache – you need to have one. Ideally two or more for resilience. Configured (at least) to accept traffic from your site to one or more cvmfs repository servers. You could use existing frontier-squids.

 

National Grid Service Cloud

A Brittish cloud.

Good for teaching with a VM – if a machine is messed up it can be reinstalled.

Scalability – ‘cloudbursting‘ – users make use of their local systems/clusters – until they are full – and then if they need to they can do extra work in the cloud. Scalability/cloudbursting is the key feature that users are looking for.

Easy way to test an application on a number of operating systems/platforms.

Two cases were not suitable. Intensive – with a lot of number crunching.

Good: you don’t have to worry about physical assembly or housing. They do have to install the servers and networking etc. Usually this is done by somebody else. Images are key to making this easier.

Bad: Eucalyptus stability – not so good. Bottlenecks: networking is important. More is required to the whole physical server when it’s running vms.

To put a 5GB vm on a machine you would need 10GB. 5 for the image and 5 for the actual machine.
Some were intending to develop the images locally on this cloud and then move it on to Amazon.

Previous Days:
Day 4
Day 3
Day 2
Day 1

HEPIX Spring 2011 – Day 4

Dinner on the 3rd night was amazing. It was at the hotel Weisse Schwan in Arheilgen outside Darmstadt and it was a nice reception hall with big round tables, waiters with lots of wine and great buffet food. A+

Cloudy day!

Or – Infrastructure as a Service – IaaS

A few had the standpoint that the HEP community is not ready for cloud, not secure enough and we have something that’s working. But maybe a mix period would work. At least for now it’s quite awesome for non i/o intensive applications.

There were talks about virtual images and how to (securely) transfer them between sites. Several options about this, stratuslab cloud distribution of images and cloudscheduler.

One great use case for running computing nodes in the cloud is at the moment for when the cluster is maxed out – then you can kick up some more vms in the cloud to help speed up the run. Or when running the jobs it keeps the VM running as long as jobs that require that kind of VMs are in the queue. Or for testing – quite easy to set up several VMs with different operating systems/platforms and then run testing on them. See cloudscheduler.org

Infrastructure as a Code – IaaC – see Opscode and Chef. A pretty interesting looking  configuration management system.

Terms:
fairshare
json

Oracle

Maybe the most interesting presentation at the end of the day – and the debate following was maybe the most – it was the presentations from Oracle Linux and Oracle Open Source.

Before the presentation they had a nice slide stating that they don’t make any promises based on the presentation. That presentation is not available but the other one is – the one about Oracle and Open Source..

Oracle Linux (OL) looks pretty good, it’s free to download but if you want any updates you need to pay them. They have an upgrade thing so if you’re on RHEL6 you can apparently update easily (changes some yum repos). A lot of advertisement – but it was a presentation about the distribution. It’s based on RHEL, they take the updates from RHEL, then add their own magic to it. They have a boot setup so if you want to you can boot OL in Red Hat Compatibility mode. Apparently Oracle wants to put Red Hat out of business (after which they were asked: “Where will you get the kernel then?”). x86-64 only.

On the horizon:  

  • btrfs(fs that supports error detection, CoW, snapshots, ssd optimization, small files are put in metadata)
  • vswitch(full network switch, set up virtual network in the OS, ACL, VLAN, QoS, flow monitoring with openFlow)
  • Zcache(keep more pages of the fs page cache longer in main memory, more cache using LZO compression and thus fewer I/O operations – a lot faster to compress/uncompress than to access disk)
  • storage connect
  • linux containers (resource management, jails on bsd, zones on solaris, own apps/libs/root, runs on top of the kernel, not a virtualization).

From the discussion:


Pidgin – some wanted Video. Pidgin said: no way. This is how Oracle will run their open source projects like MySQL, Lustre.

“If you don’t like how the project is going – fork.” – Gilles Gravier.

Two reasons to fork: proactively (worried) or because they are unhappy with how it’s going (how it’s going or not going).

People in the audience are afraid that a lot of times a company acquires an open source project and then closes it down.

“When you acquire a company and it’s the projects. You have two options if don’t want the project. Drop it or kill it. Kill it does not work for open source.” – Gilles Gravier.

Openoffice is not dropped yet. Lots of other options. Fork and work on closed source (like Grid Engine). Drop it and stop working on it. Drop it and “talk to the community”.

No info about Lustre – when asked about it Oracle did not want to comment. Asked to e-mail gilles.gravier@oracle.com for more information.

Will Oracle port debconf to Oracle Linux? Oracle will take a look.

There was lot of angst against Oracle that surfaced, but Oracle handed it quite well and had good answers.

From one of the Oracles: “Allow me to be a bit provocative: If Oracle’s prices were lower; would you consider buying an Oracle product?”

“It takes 25 years to make a good reputation, 5 minutes to loose it.” – CERN employee.
“SUN used to make hardware and give away software for free; Oracle is .. the other way around.” – Lenz Grimmer
“Laughter” – Audience.

European Open File System SCE

  • http://www.eofs.org
  • one repository of lustre
  • hpcfs.org is another lustre open source – this will merge with opensfs.org. Both are American.
  • Close work together with eofs.org – the two above have agreed on a set of improvements.
  • 2.1 lustre will be released by Whamcloud in summer 2011.
  • LUG – lustre user group – reports and interviews at http://insidehpc.com

 

Next Day:
Day 5

Previous Days:
Day 3
Day 2
Day 1

Ubuntu 11 in VMWare Workstation

Time for another test! This time it’s Ubuntu 11.04 Natty.

My setup is a Intel Core i7 920 on Windows 7 x64 with 8GB RAM.

*** Update 2011-04-29 – I just heard that if you run this in a Virtual Machine you do not get all the shebang on the default graphical user interface. But for me it looks fine. Also when I looked on this video it didn’t look much different except for the left side bar. If you want to check out the supposedly nicer graphical user interface I would recommend that you put Ubuntu on a CD/DVD and then boot your desktop with it. That way you can see if it’s for you and if it works without doing anything to your hard drives :)

*** Update 2011-04-29 Also added link where to get Ubuntu 11.04 as now it’s not in beta anymore.

Installing

  1. Install VMWare Workstation
  2. Download the Ubuntu ISO. (I got the x64 / AMD64 one) from http://www.ubuntu.com/testing/natty/beta
  3. As it’s public now, you can get it from http://www.ubuntu.com/download/ubuntu/download
  4. Add new Virtual Machine (VM) in VMWare Workstation, browse to the .iso and it will with easy install find Ubuntu 64-bit.
  5. Gogogo! Chose language and set up your user account. That’s all. After that you can log on to the desktop. It took quite some time for me to install it – though I wasn’t in a rush so did not measure time and just left the PC. Maybe it went sleeping or something.

Uses 5.2GB effective disk space (checked properties on the directory from Windows) after install and that upgrade below.

After install.

Looks pretty smooth. Quite different from what I remember. I set it to 2GB  RAM and it’s only using 300MB from scratch. This is nice. And it turns off in a couple of seconds.

  • Unity thing in VMWare Workstation works from scratch (7.1.3 and 7.1.4). In 7.1.4 even with the VMWare Tools not installed updated.
  • First thing I ran was a software update – 160MB already after it being out only a couple of days. Guess some big package got an update.. however, no reboot required for it!
  • One thing you should be aware of, is that the program options/menu bar, is at the top of the screen, “File”, “View”, stuff like that. So quite a bit like Mac OS (if I’m not mistaken).
  • Audio is also working from start.
  • Resolution/screen proportions are automagically updated so that Ubuntu fits the whole screen. Nice. Ubuntu 10.10 does not do this in Virtualbox on RHEL6.

Comes default with these programs:

  • Mozilla Firefox 4.0
  • Libreoffice (not openoffice??) – looks like openoffice anyway.
  • Evolution Mail/calendar
  • Empathy chat cilent
  • Gwibber – twitter I guess
  • Transmission – torrent client
  • Shotwell photo manager
  • “ubuntu software manager” – where you download apps. There is still however apt-get and synaptic.

This “ubuntu software manager” is a bit of a fail. It seems very mainstream.

For example:

  • irssi cannot be found there

That’s about all I can think of for now.

Adobe Flash:

  • No flash from the start. But! Search for it in the software manager and you can install it. This however failed. I tried to report but it required a login so I skipped.
  • After fail the app still has a green check-mark on it.
  • Flash still works though. And it’s not lagging for me at all. But hey, I just tried it right after starting the browser. Maybe it gets choppier after some heavy browsing :p

Unity

The unity thing is pretty darn neat. What it does is it gives you an “extra” start-button. It’s not visible all the time, only when you go near your normal one – it pops out. With that you can then start a program from the Ubuntu virtual machine and it will look like any other program on your PC.

Supposedly Unity may work better after upgrading VMWare Tools. I got a little bar at the bottom of the screen, extracted and ran the thing. Then it was gone.

Conclusion

All in all, feels pretty good! I have some plans to get a laptop of mine up running this. Just need some other work done on it first I believe. There were some bugs, but that’s not surprising, considering it is in beta. Always liked ubuntu because installing it is so smooth. Might not be the most awesome for preserving system resources but honestly, only using 300MB from start is pretty ok isn’t it? If I get it on my laptop, I’ll definitely be trying another window manager, like awesome or dwm –  should bring the memory usage down :)

Drupal 7

Just installed Drupal 7 on a Debian Virtual Machine.

It’s so clean and it just feels very solid. Lots of things you can do in there.

Probably a good idea to check out drupal’s own description of their software before doing anything serious with it. I liked this description:

“Drupal is like a Lego kit. Skilled developers have already made the building blocks – in the form of contributed modules – that you need to create a site that suits your needs, whether that is a news site, an online store, a social network, blog, wiki, or something else altogether.”

Without doing any selections or configurations. You will not see anything if you log on as a non-admin user. I created an article and that is all the normal user can see. So for it to be able to see anything else, you need to make that available.

– Initially it appears that Drupal requires a lot of work for it to become useable. Especially for a larger organization or if you have multiple purposes/intentions with the site.

– It also turns out I don’t have the time to continue with this project at the moment (Final Fantasy IX taking my spare time). That’s why I will be publishing this post now and I will try to continue on this thread when I have the time. Another good thing with running your test setup in a VM: shut it down – and when you have the time you can just boot it up again and continue from the exact same place.

Ubuntu 10.10 Minimal Virtual Kernel + VMWare Workstation

To install Ubuntu 10.10 with a virtual kernel instead of the normal one = good, less stuff installed that you may not need.

  1. When setting up the install, do not use the easy install. Chose to install an OS later. Set up bridged/nat depending on which one you want.
  2. Add the install .iso to the CD-drive in the VM
  3. Select a language
  4. Press F4 (it didn’t work in the first screen)
  5. Chose – install a minimal virtual machine
  6. Install Ubuntu Server
  7. Chose language again
  8. Chose key map – (I chose English and had to browse to Finland)
  9. Asked to press some buttons, wanted Swedish (but have an English keyboard) so tried to press the right ones :p
  10. Then time zone Helsinki/Finland was found.
  11. Using default (whole disk, no encryption or lvm) for partitioning.
  12. set up users
  13. set up encryption on home dir
  14. proxy setup
  15. installing security updates automagically
  16. any extra packages (DNS, LAMP, Mail, OpenSSH, etc)? – I chose no, want to chose this myself later.
  17. yes I want grub (it finds only one OS on the virtual disk ;)

Then I see the login prompt! Obviously the easy-install in VMWare Workstation has a lot less steps :)

But on the other hand you could install OpenSSH directly through the install and then you do not have to log on to the VM via VMWare Workstation, but can do it via your favorite ssh program instead.

Post install

What I want installed every time after an uninstall.
After install it is a very very small installation.
Not even ‘man’ is installed.

sudo apt-get install openssh-server ntp nano

edit /etc/network/interfaces – configure static ip
edit /etc/ntp.conf – add time servers
edit ~/.bashrc – change colors in the prompt and add color

Kernel difference you can see when running uname: 2.6.35-22-virtual in comparison to 2.6.35-22-generic

There!

Now you can set up whatever you want on it! Of course you may want to do more things, set up iptables or you could use it like it is before the things I do after each install. You can use vi instead of nano/pico and use dhcp instead, depends on what you are going to do with your VM.