Personal computing discussed

Moderators: renee, Dposcorp

 
ludi
Lord High Gerbil
Topic Author
Posts: 8646
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Virtualization 101

Thu Aug 28, 2014 10:20 pm

Per the recent FNT of similar vein, I've been trying to learn some basics about virtualization. The test system is an older Dell Precision 490 with 2xXeon 5345 (net of eight cores and basic VT-x support), an Nvidia FX580 graphics card, and 16GB of RAM (about to be upgraded to 32GB). It runs hot and loud, but is stable and sufficient for my budget (for now), seeing as how I salvaged the barebones and several hard drives from a corporate recycling event. So far:

1) Dropped a 160GB Velociraptor and a 1TB Samsung drive into the system. Installed Ubuntu 64-bit as a host OS, then Oracle VirtualBox, then got Vista 32-bit and XP 32-bit operating as guest operating systems. Tinkered with resource allocation and attempted, but have not quite succeeded, at cloning the Vista installation from fixed-size VMDK to VDI so I could resize the partition.

2) Dropped another 160GB Velociraptor and a 500GB Caviar Black into the system. Installed VMWare ESXi 5.1 as a host, installed vSphere client on my laptop, then proceeded to install Vista 32-bit and Ubuntu 64-bit as guest operating systems. Might throw in an XP install as well, since I have a couple extra Pro licenses available.

A good start, but I realize this barely scratches the surface of the topic. I haven't scripted anything, I haven't migrated a VM from one host to another, I haven't experimented with creating network shares between VMs, etc. I think what I need is some sort of tutorial or application target to study and attempt. Any suggestions?
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration
 
cheesyking
Minister of Gerbil Affairs
Posts: 2756
Joined: Sun Jan 25, 2004 7:52 am
Location: That London (or so I'm told)
Contact:

Re: Virtualization 101

Fri Aug 29, 2014 6:09 am

I don't have any specific recommendations for tutorials but most of the stuff you do with VMs (bar migration and specific things to do with managing storage files or passing usb devices through) are exactly the same as you do on physical machines.

As far as network related tasks like file shares go, look at the two different ways you can configure your VMs' network: bridged or routed. A bridged network means the VMs are on the same network as the host machine and can be talked to like any other machine on your network while routed means the host machine is behaving as a router and you have to do port forwarding for machines on your normal network to talk to the VMs. This isn't something specific to VMs you might do this sort of network setup for any number of reasons without a VM in sight.

I suppose part of the reason VMs are so popular is that you can transfer nearly all of your skills for dealing with physical machines straight over.

If you're looking at this with an eye to employment than I'd consider getting to know the basics of a couple of different systems then looking at something that's more of a complete environment like openstack or Puppet (BTW, I've mentioned these two things next to each other but they're for very different tasks). Puppet is probably the most interesting because it's more about managing large numbers of servers rather than virtualization itself and while it may be simple to use virtualization to create hundreds of servers, you've still got to actually do something with them which is where Puppet comes in. I'm pretty sure you can do nearly everything Puppet does in Windows using all the stuff MS have already done for managing physical servers (group policies, wsus and a few custom scripts etc) but Puppet manages Windows and *nix boxes as well as talking to applications and various different virtualization systems.

NB I'm no expert on any of this stuff beyond having done a bit of reading and played around with some of it at home.
Fernando!
Your mother ate my dog!
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Virtualization 101

Fri Aug 29, 2014 9:20 am

The VirtualBox manual is actually pretty good at describing all of the features. Next time you're in the mood for a little light reading, go through it section by section.

As far as networking/shares/etc. goes, it is pretty much identical to how you would do physical networking; you just have to know what the various virtual networking modes are. For VirtualBox, the default NAT mode effectively puts the VM behind a 1-port virtual NAT router -- it can see your physical network (through the NAT), but nothing else on your network (nor any other VMs) can see the NATted VM (unless you forward ports). Bridged mode makes the VM a full-fledged peer on your physical network, and is the mode you need to use if you want the VM to be accessible to other systems (both physical and virtual) as if it is a normal system. Host-only mode connects the VM to a virtual LAN that is only connected to the host and to other VMs on the same host-only network. Internal mode is like host-only, except that even the host can't see the network; it is *only* visible to other VMs on the internal mode network. You can have multiple virtual NICs per VM, so you can mix these modes in any combination you want by creating multiple virtual NICs in a single VM. You can set up and test entire virtual subnets this way -- one VM with both a bridged NIC and an internal NIC acts as a router, with all the other VMs on the subnet connected only to the internal mode network.

Side note: Depending on the combination of host/guest OS, VirtualBox can sometimes have network performance issues with NAT mode, and/or with the virtualized hardware NICs. Best network performance is generally achieved by using bridged mode, and the special virtio-net NIC type. The virtio-net NIC will require drivers to be installed in the guest if the guest is a Windows system (recent Linux distros include the driver out-of-box).

On your HDD cloning issue, there are a number of ways to achieve this. Most straightforward is probably via the CLI, with VBoxManage clonehd (to copy the data), followed by VBoxManage modifyhd (to expand the copy). You could also create a new (larger) virtual disk, attach them both as data drives to a Linux VM, and use the dd command inside the VM to move the data across. Either way, once you've got the bits copied you can expand the partition to fill the new (larger) virtual disk; I use gparted for this, but any partitioning tool that understands how to resize NTFS partitions should work.
Nostalgia isn't what it used to be.
 
Forge
Lord High Gerbil
Posts: 8253
Joined: Wed Dec 26, 2001 7:00 pm
Location: Gone

Re: Virtualization 101

Fri Aug 29, 2014 9:50 am

Things to research/learn if you're looking for a job now or down the road: Puppet, Chef, Vagrant.

VMware doesn't really need these tools, VMware themselves have most of this functionality inside their own stack, for the most part, generally the only limits on VMware setups are your budget. The free ESXi will get you a long ways though, you can test pretty much anything aside from HA/VMotion with the free product. Most of the limits are disk space and memory (ESXi free won't boot with over 32GB of ram installed).

With Virtualbox, you'll need to provide more of the infrastructure yourself, this is where Vagrant comes in, and possibly Chef to configure the VM roles.

With a nice Puppet/Chef/Vagrant setup, you can maintain a single unconfigured master VM with Linux distro of choice, and some Chef records for how to turn the gold master into a DB node, WS node, AD server, whatever, and let Puppet clone the VM as needed. That's super-excellent, IMO, a real delivery on the original visions of VM uses from years ago. Really the only thing you won't get with a setup like that is the multi-box-spanning options, which probably won't matter at this point in your progression. It's pretty easy to trigger all the different actions and conditions on a single machine when you're testing.

Also, you're probably CPU-heavy, RAM-light, and I/O/disk space light. If you start going further, I can recommend some ways to grow, but ESXi Free's 32GB limit will get in the way before you run out of CPU.

My ESXi instances, I have one small, slow USB key with ESXi itself on it. It stays in ram once booted and won't touch the original storage till shutdown. You'll use up as much ram as you can add, though, and you'll want it to be as fast as possible. This is why I have such a fondness for LGA1366 and LGA2011 machines. Having 6 or 8 slots instead of 4 lets you hit the big memory numbers with less expense, and VMs want gobs of bandwidth when they can get it. Something like an SSD will be mostly wasted. While faster I/O for your VMs is *never* a bad idea, and it'll quickly become the one thing that haunts you and your budget, one user and some testing scripts can live off of one or two spindles of HDD without much fuss.
Please don't edit my signature for me. Thanks.
 
slowriot
Gerbil XP
Posts: 388
Joined: Wed Apr 03, 2013 10:57 am

Re: Virtualization 101

Fri Aug 29, 2014 10:13 am

You can do what I'm going to be doing this weekend: http://docs.openstack.org/training-guid ... -labs.html

I haven't run through it yet but a co-worker recommended it to me. As Forge pointed out in the real world you'll likely come across environments which are already using automation tools. But as always I recommend starting out doing the entire process manually and that's how these OpenStack tutorials are designed.
 
Forge
Lord High Gerbil
Posts: 8253
Joined: Wed Dec 26, 2001 7:00 pm
Location: Gone

Re: Virtualization 101

Fri Aug 29, 2014 11:38 am

slowriot wrote:
You can do what I'm going to be doing this weekend: http://docs.openstack.org/training-guid ... -labs.html

I haven't run through it yet but a co-worker recommended it to me. As Forge pointed out in the real world you'll likely come across environments which are already using automation tools. But as always I recommend starting out doing the entire process manually and that's how these OpenStack tutorials are designed.


Yeah, a good OpenStack tutorial will be excellent, it'll give you a nice non-partisan foundation to work from.

Any virtualization job is going to want their particular tools, though, and those seem to differ from employer to employer. My current employer is a very basic VMware/manual shop, with no dynamic provisioning. The place I'm hoping to interview soon has a different setup, with Puppet. Knowing all of the major players, and being ready to mix and match, makes me more employable, though at a cost of being less specialized or less in-depth than someone else.
Please don't edit my signature for me. Thanks.
 
Hz so good
Gerbil Elite
Posts: 768
Joined: Wed Dec 04, 2013 5:08 pm

Re: Virtualization 101

Fri Aug 29, 2014 12:34 pm

Oracle Virtual box is rather good. I've managed to get Netware 5.1, NT4 sp6a with client32 and nwadmin, Haiku, Win 2008R2 running PRTG and Radius, XP Pro (tftp and IP communicator), and Linux Mint17 running tac_plus all running in separate VMs that i've integrated into GNS3 topologies, and used them to great success. The only hiccup is that GNS3 doesn't really support catalyst switches, just "swouters", so it's advantageous to integrate physical switches into the topology. I even managed to upgrade a 3745 router into a CME to control the ip phones, and the XP box with cisco IP softphone to great success.

You can even setup up the VMs in Virtualbox to use a VMWare compatible HDD image format.
 
Aphasia
Grand Gerbil Poohbah
Posts: 3710
Joined: Tue Jan 01, 2002 7:00 pm
Location: Solna/Sweden
Contact:

Re: Virtualization 101

Fri Aug 29, 2014 1:03 pm

Also, virtualization is immensely useful for setting up lab's. I have a full checkpoint HA environment with firewalls, managers, loggers, etc available on my laptop for testing stuff out. A few Linux/windows clients, a proxy and loadbalancer and you have a decent networks lab. The only thing that are hard to virtualize properly are usually bigger routers/switches, although that might change as well with the newer stuff being more general in nature.

All things considering, I think virtualization is something everybody needs a bit of. Especially the coming trends with having fully virtualized and dynamic environments, including security enforcement with things like SDN, its easily becoming one of the more involved things.

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On