Ziggy's picture

First of all, Thanks for building these amazing virtual appliances!

This is my first time using the Turnkey appliances, so pls forgive any ignorance on my part...

I am creating a small virtual nework for testing using LAMP stack for the servers. I set up the networking fine and each VM can communicate with the others and I can SSH / FTP from Win 7 host and reach outside world from the VMs...

The problem is that if I shut down any one of the VMs as I normally would (Send the shutdown signal), this has no effect at all. If I "Power off" the machine then all of the network config is lost the next time I start up the machine and I need to reconfigure (I have'nt encountered this before)

I set it all up using the optimized build "turnkey-lamp-12.0-squeeze-x86-vmdk" on Virtualbox.

As a temporary measure, I am powering off the machines and selecting to restore current snapshot...

I would appreciate if you help me. Thanks.

Forum: 
Alex Bassett's picture

If you are on a home network your router with dhcp you may need to use mac address reservation and a static ip for the vm as i have found connection issues with "wandering ip's".


Alex Bassett's picture

Hi Ziggy

As to the shut down problem have you tried to shutdown from within the vm or does this give the same problem? 

I would suggest a read through of your virtualbox networking docs as a start point and post back with more details to help us out with .

Have you tried 2 host only network set-ups as this may work better !


Jeremy Davis's picture

Try from the commandline:

shutdown -h now

or

halt

or

poweroff

Obviously this won't solve your problem completely (as ideally you want to be able to do it via the GUI) but at least it may help you save your network config... Bottomline though is that AFAIK it should just work OOTB. I suspect that it's something to do with ACPI, it may be worth having a bit of a goolge around Debian, ACPI and VirtualBox.

And yes your networking config should work, although I'd be inclined to use Conconsole to configure your static 'host only' connection (you can configure which interface Confconsole uses via the conf file in /etc somewhere) and let the NAT be auto assigned IP via VBox's built-in DHCP

Jeremy Davis's picture

It's been a while since I used any desktop virtualisation but I don't ever recall having these sort of problems... I can't help but think that perhaps there is something wrong with the VM image you are using??

Perhaps you could try manually editing the network config yourself (sorry I don't have step-by-step OTTOMH). If it still doesn't stick then I have no idea... Perhaps just try reinstalling from ISO??

Jeremy Davis's picture

It definately sounds like the changes to the (virtual) harddrive aren't being saved, but the fact that there aren't any error messages warning you of this seems very strange indeed. Have you tried saving/creating other files on the server to confirm that our theory is correct (you can use the touch command to create empty files, or nano to create a text file which you can put some text in) to test?

Out of curiosity have you tried installing something else (other than TKL) to a VM and see how that acts and if it is the same? At least then you can see whether the strangeness is something to do with TKL or VirtualBox (or whatever VM software you use - sorry I didn't read back through the thread to check). Or perhaps even OS related...?

Jeremy Davis's picture

I just thought I'd test this out for myself and see if I could reproduce your issue, but I can't.

Here's some info about my setup and the steps I followed so we can perhaps see where the differences are:

  • VirtualBox (v4.2.4r81684) freshly downloaded and installed on Win7 (Pro SP1)
  • TKL LAMP VMDK build (turnkey-lamp-12.0-squeeze-x86.vmdk.zip) freshly downloaded
  • Contents of zip extracted (using Win7 default right-click 'extract all' and copied) to C:\Users\Jed\VirtualBox VMs\TKL LAMP\ (ie vHDD is C:\Users\Jed\VirtualBox VMs\turnkey-lamp-12.0-squeeze-x86-vmdk\turnkey-lamp-12.0-squeeze-x86.vmdk)
  • Used the VBox 'New' VM wizard to create a new VM:
    • Set the OS to Linux > Debian
    • Selected 'use existing vHDD' - browsed to the extracted disk image (path as above)
    • Accepted all other defaults
    • Once completed, set networking to 'Bridged'
  • Started new VM
  • Input all firstboot info (skipped TKLBAM setup and security updates)
  • Set a static IP from ConfConsole and manually configured my DNS (I need to fix my DHCP server as it is giving the wrong DNS info...)
  • Exited out of ConfConsole
  • Ran apt-get update && apt-get upgrade
  • Created a test file in /root (touch testfile)
  • Took a snapshot (in case I experienced same as you - I intend to use this server  for some other testing)
  • Shutdown VM (halt)
  • Started VM again (from VBox UI)
  • Confirmed that everything is as it should be (confconsole still had my static network settings there and ls showed that testfile was there)

Other than confirming your experience of VBox 'send the shutdown signal' not working and it being quite slow (I'm used to running OVZ containers on my Promox server) it all seemed to go well and acted as I would have expected it to.

So I'm not really sure what is happening for you. To double and triple check I started and stopped it multiple times creating testfiles as i went and they were all there...

Jeremy Davis's picture

 

I have recently started using TKL in a VBox VM on Win7 and the lack of graceful external shutdown has been causing me some pain too so I investigated a little more. As it turns out there is a package you need; it's called acpi-support. It pulls down about 18MB of dependancies but it works! Install like this:

apt-get update
apt-get install acpi-support

My VBox instance now happily shuts down when instructed to by VBox!

Add new comment