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.

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".

Ziggy's picture

Hi Alex, thanks for the reply.

When I cloned the 2nd VM I generated a unique mac address and I am already using static ip for the Host-only network on eth1. Only eth0 uses dhcp and NAT. Does that sound reasonable?

Any idea as to why the 'Send the shutdown signal' doesn't work? That is how I normally shutdown a VM.




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 !

Ziggy's picture

I have tried shutting down both through Virtualbox manager menu and by clicking close (X) on the VM window and selecting 'send shutdown signal', neither of these work.

I will clarify my previous post - Each VM has 2 network adapters. Eth0 is NAT for for VMs to access outside world for updates, etc. Eth1 (Host-only) is for me to access each VM. When it is up and running, each VM can access the other, they can get updates, and I can access each VM (SSH and FTP).

Not sure if this helps...

Jeremy Davis's picture

Try from the commandline:

shutdown -h now





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

Ziggy's picture

Thank you Jeremy, I will try shutdown from shell tomorrow. If that works I will be happy and won't worry about using GUI.

And yes, I did let VBox assign NAT IP during config.

I'll get back and let you know how it goes...

ziggy's picture

Hi Jeremy,

I tried all 3 commands in appliance shell and although each command did shut down the appliance, each time I started the appliance later I had lost the network config as before..."eth0 not configured"

I used the Config Console to set up static host-only networking on eth1 but made no difference.

All of the above I did on a freshly-built VM for a clean start.

This time, when I created the VM I even made sure the .vmdk was located in the new VM's parent directory "C:\Users\Ziggy\VirtualBox VMs\PATTIE_svr_3\turnkey-lamp-12.0-squeeze-x86". Originally the .vmdk was located on another physical drive (D) and linked during VM creation. This did not help either.



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??

Ziggy's picture

I agree, could be something wrong with VM image. I went to edit the network config but it was all correct. I restarted network service as well. I did the install from ISO too -> although the ACPI shutdown works, the network config is still gone next time I start up.

It seems like I may not be able to write to the (VBox) VDI...however VBox indicates 'Normal' type disk. I also checked perms on VDI and parent folder and I have write access on all. Turnkey indicates LAMP stack  VMDK  is writable.

I considered possibly a problem with HDD so I went through all of the same tests on another (new) PC and on multiple drives -> always the same problem.

Unless anyone has other ideas, I will probably have to be happy with taking lots of snapshots and maybe trying the 64 bit build when it comes out.

Thanks for your help guys






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...?

ziggy's picture

Hi Jeremy,

I tried creating some files / folders on the server and these too disappeared after power down / restart.

Yesterday I installed Ubuntu Server 12.10 (64 bit) from iso and installed / config'd LAMP, phpmyadmin on Virtualbox... everything works fine and all the changes I make are saved to the disk.


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