Landis Vinchattle An aggregation.

March 1, 2014

Creating a new VirtualBox VM on the command line

I finally removed a computer that I’ve had running for quite a while, configuring another “intermittently operational” system to run all the time.  I’d like to have the old system run as a VirtualBox VM on the new system.  My VirtualBox VMs are running headless as services using VboxVMService.  Further, one of my VirtualBox VMs runs an Ubuntu guest which itself runs Linux Containers guests for some small, lightweight hosts on my network.

I’ve got a couple of existing LXC guests that do some monitoring for me using Nagios, run a Gitlab instance, and a couple of others that I no longer need and will probably remove.  I’d also like to set up a couple of new hosts to run a small, simple webserver for my home network “homepage” with links to things I commonly use and a Puppet system to manage my configurations a little bit more efficiently (especially credentials if I look to expand the number of Linux hosts on my network; I’d like the logins to be maintained automatically, and very preferably to be key based).

My straight Nagios monitoring takes a bit more thought to maintain than I’d like, given the number of things on my mind at any given time, so that’s one of the first things I’d like to simplify.  However, from the point of view of simplicity, creating a dead simple web host (though I’d like to eventually integrate some DNS service discovery…) is the simplest.

I spun up a new, basic LXC with Apache, RCS, and a few Perl modules to load Foswiki onto for a basic intranet home page.

Finally attempting to spin a new VM from the command line… fails

VBoxVMService does not allow you to run the VirtualBox GUI at the same time, as I understand it.  As such, I assume that I will need to create any new native (non-LXC) guests I require from the command line.  This Oracle reference describes how to configure the VM instances from the CLI using the ‘vboxmanage’ command.  However, upon issuing a ‘vboxmanage list ostypes’ command, I discovered that even the CLI version appears to be dependent upon the same COM configuration that prevents the GUI from running.  So, I configured as stated at http://sourceforge.net/p/vboxvmservice/wiki/Runing%20VirtualBox%20GUI%20together%20with%20VBoxVmService/.  This didn’t take immediately, so I restarted.

Numerous hassles

I had a lot of problems being able to get back into VirtualBox to work on setting up a VM to replace the machine I took down, generally appearing to be related to permissions.  I’d run across a batch file that someone had written that supposedly sets the permissions appropriately to allow you to switch back and forth between the VirtualBox GUI and VBoxVMService, but it didn’t seem to be very effective.  I was finally successful after uninstalling VirtualBox, deleting the VirtualBox directory, reinstalling, then going into DCOMConfig and setting permissions back to defaults (everything on Security tab as “Use Defaults” and the Identity tab as “Launching User”).  That let me get back in and do some things.

Using a physical/raw disk in a VM

I referenced these instructions to configure the disk I had pulled from my old system as a raw disk for the VM.  A couple of notes on items that proved handy:

  • The command wmic diskdrive list brief under Windows 7 helps to identify the correct PhysicalDrive setting to use in creating the VMDK.
  • User Account Control under Windows 7 is a turd for configuring the physical disk as a VMDK.  I was able to get around this by going into User Accounts -> Change User Account Control Settings and slid the bar all the way to the bottom – i.e., don’t prompt me for anything (I didn’t reboot as the system told me I had to).  I was then able to create the VMDK under my local account, which has administrative privileges (previously I had received the error “VBoxManage.exe: error: Cannot open the raw disk ‘\\.\PhysicalDrive1’: VERR_ACCESS_DENIED
    VBoxManage.exe: error: The raw disk vmdk file was not created” under my own account and “VBoxManage.exe: error: Failed to create the VirtualBox object!
    VBoxManage.exe: error: Code CO_E_SERVER_EXEC_FAILURE (0x80080005) – Server execution failed (extended info not available)
    VBoxManage.exe: error: Most likely, the VirtualBox COM server is not running orfailed to start” under a “runas administrator” command window.

This was a great idea until I determined that I couldn’t (or at least there wasn’t a method I could find) grant my user account raw/physical disk access under Windows 7 Home.  I can run VirtualBox as an administrator and launch the machine, booting from the physical drive, and everything works.  Unfortunately I’d prefer not to run as an administrator, so I will probably need to work on converting the physical disk to an image.  My goal is ultimately to get everything copied off of that drive anyway and eliminate the machine; I had just thought this might be a shortcut to save a step or two.

January 20, 2014

Removing “Smart Web Search” crapware from Firefox

Filed under: Family & Personal,Links,Software — Tags: — Landis V @ 8:51 pm

A relative recently had a problem with his computer, where any links he clicked from email messages in Outlook popped up the browser, but always to a “Smart Web Search” page.  When I initially heard of it, Google Chrome was getting the blame for the problem, but I was pretty sure it was just an issue with some crapware.  After he took it to someone in the Milwaukee area who charged $90 for claiming to fix it but did absolutely nothing towards taking care of the problem, I finally managed to get some time carved out to address it.  Thankfully I could remotely access the system via UltraVNC and see the problem, and it only took about five minutes to figure it out and get it corrected.  This link was the first I clicked when researching the problem, and disabling (and removing) the “Smart Web Search” crapware extension quickly got things back to normal.

August 26, 2013

Serving multiple DNS search domains in IOS DHCP

Filed under: Cisco,Links,Networking — Tags: — Landis V @ 7:47 pm

http://www.perkin.org.uk/posts/serving-multiple-dns-search-domains-in-ios-dhcp.html

DHCP option 119, though having to convert to hex and null-term is a PITA.  If it does what’s needed, then probably worthwhile.

May 1, 2013

Display System Menu with Alt key – Putty

Filed under: Links,Software — Tags: , , — Landis V @ 4:35 pm

http://malektips.com/putty-system-menu-alt-key.html

In trying to be more “keyboard efficient” lately and use the mouse less, ran across this. My PuTTY configuration was even disabled for the Alt+Space, which was all I really needed to have enabled.

March 3, 2013

Lock a computer through an RDP session

Filed under: Links,Software — Tags: — Landis V @ 11:59 pm

Not something I need to do a heck of a lot (in fact, this is probably the first time I’ve needed to in ten years), but good information to have on file for when I need it again:

rundll32 user32.dll,LockWorkStation

Courtesy of:
http://www.bridgetonova.com/2007/10/how-to-lock-computer-in-remote-desktop-connection.html

« Newer Posts

Powered by WordPress