Virtual machine no longer starts

Bergcube

Member
Mar 8, 2009
31
0
6
58
Norway
I have an Ubuntu server configured to run in a container I no longer can start. When clicking on the "Start" button for the machine the status changes to "Executing task 'start'" for a few seconds and then changes back to stopped. I get no other visible errors.

What should I do to investigate this and hopefully get it running again? Is there a logfile some place I can look at?

If the problem is hopeless to solve, is there a good way to get my files "out of" the qcow2 file?


Thanks in advance!
Bjørn Ingmar Berg
 
Try running the following command through an SSH connection and see what it says:
Code:
qm start VMID
 
try to start the VM under the console with vzctl start VMID.

Thank you for the reply. I have tried.
Code:
vzctl start 103
Container config file does not exist
I also changed into the directory holding the file ( /var/lib/vz/images/103/ ) but that didn't help.

I find it sort of hard to believe that the config file can be REALLY missing, as I can see the entire setup of the virtual machine in the GUI and there it looks as it should.


Kind regards,
Bjørn Ingmar Berg
 
the config file is stored in /etc/vz/config/VMID.config

Is it a KVM or a OpenVZ?

If it is a KVM try qm start VMID
 
I get this:

Code:
host:~# qm start 103
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
qemu: could not open disk image /var/lib/vz/template/iso/ubuntu-9.04-server-i386.iso
start failed: command '/usr/bin/kvm -monitor unix:/var/run/qemu-server/103.mon,server,nowait -vnc unix:/var/run/qemu-server/103.vnc,password -pidfile /var/run/qemu-server/103.pid -daemonize -usbdevice tablet -name Jens -smp 2 -id 103 -cpuunits 1000 -vga cirrus -tdf -k no -drive file=/var/lib/vz/images/103/vm-103-disk.qcow2,if=ide,index=0,boot=on -drive file=/var/lib/vz/template/iso/ubuntu-9.04-server-i386.iso,if=ide,index=2,media=cdrom -m 1024 -net tap,vlan=0,ifname=vmtab103i0,script=/var/lib/qemu-server/bridge-vlan0 -net nic,vlan=0,model=rtl8139,macaddr=86:91:0A:B1:CE:6F' failed with exit code 1 at /usr/share/perl5/PVE/QemuServer.pm line 314.
host:~#
The perl warning is probably because this server WAS part of a cluster, but the other servers had to be repurposed.
The missing ISO is the disk image I used when I set the machine up. I thought I had removed it from the virtual machine setup but I guess I must have forgotten.


Kind regards,
Bjørn Ingmar Berg
 
So it seems it failed to load one kvm kernel modules, leaving you with qemu basic acceleration (if any). Try the output from dmesg and see if it tells you anything meaningful.
 
Add-on for this thread:

I have a backup.

Code:
-rw-r--r--  1 root root  688 Sep  5 02:03 vzdump-103.log
-rw-r--r--  1 root root 600M Sep  5 02:03 vzdump-103.tgz
I know that no changes were done in the virtual machine since this. Is it conceivable to copy these files to another -freshly installed- Proxmox host and reanimate the critter from these backup files?
Edit: If so I will prefer that over trying to salvage the crashed machine. That is because I imagine a rebuild from backup would be simpler and / or less timeconsuming.

Kind regards,
Bjørn Ingmar Berg
 
Last edited:
Try the output from dmesg and see if it tells you anything meaningful.

I think the hardware of the host must be partially defective in some way. As it was pointed out the server has "lost" the KVM capability. It keeps disconnecting and reconnecting the NIC. It cannot shut down properly but has to be killed with the switch.

So as I said elsewhere in this thread, I am starting to think the best way out is to recreate the virtual machine from backup files on another -healthy- host.


Kind regards,
Bjørn Ingmar Berg
 
I have an Ubuntu server configured to run in a container I no longer can start. When clicking on the "Start" button for the machine the status changes to "Executing task 'start'" for a few seconds and then changes back to stopped. I get no other visible errors.

What should I do to investigate this and hopefully get it running again? Is there a logfile some place I can look at?

If the problem is hopeless to solve, is there a good way to get my files "out of" the qcow2 file?


Thanks in advance!
Bjørn Ingmar Berg

all start/stop/remove/migrate actions are logged and you can see the last action from a particular VM on the web interface, see Administration/Logs/Tasks
 
I fixed it. By cheating.


  • I installed Proxmox on another server.
  • I downloaded the backup of the unstartable machine to my PC and unpacked the archive there.
  • I created a virtual machine on the new Proxmox host, using similar parameters as the unstartable virtual machine I wanted to save.
  • I replaced the qcow2 file for the new machine with the one from the backup archive.
  • Booted the virtual machine, and it worked.
Now I can get the files I need out of it, before returning the server to it's intended use. I ended up doing it this way in part because the backup didn't contain any VMID.config file, and in part because I couldn't figure out where it should have gone. (I looked at another Proxmox host, and that one didn't have a /etc/vz/config/ folder.)

The important thing is that the problem is solved, and the files are secure. Thanks to everyone for the help!


Kind regards,
Bjørn Ingmar Berg
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!