question regarding early ssh with kvm
Hi
I would like to run my centos with an encrypted hard drive without entering the password with vnc (as the connection is not encrypted). For that i followed the guide on http://roosbertl.blogspot.ch/2012/12/centos6-disk-encryption-with-remote.html
When i follow the tutorial in VirtualBox, i at least can see that i create a connection to the machine. But on my productive server which runs in KVM, i even cant ping the machine.
Is there some way to print out debug messages (like "ip addr show") before the mount command has been executed? Maybe some kvm console driver where i can pipe messages to...? Also, is virtio_net and virtio_pci enough to load?
I try to get that working for more than 10 days now, this is really driving me crazy.
Thanks in advance.
Oli
Quoted 8 lines · Oliver Zemann
I would like to run my centos with an encrypted hard drive without
entering the password with vnc (as the connection is not encrypted).
For that i followed the guide on http://roosbertl.blogspot.ch/2012/12/centos6-disk-encryption-with-remote.htmlWhen i follow the tutorial in VirtualBox, i at least can see that i create a connection to the machine.
But on my productive server which runs in KVM, i even cant ping the machine.
Quoted 7 lines
Is there some way to print out debug messages (like "ip addr show") before the mount command has been executed? Maybe some kvm console driver where i can pipe messages to...?
Also, isvirtio_netandvirtio_pcienough to load?I try to get that working for more than 10 days now, this is really driving me crazy.
In a situation like this a serial console can be helpful. Set the kernel command-line to use the serial port (console=ttyS0) and make sure the VM is configured with a serial port device.
This will allow you to follow the boot process. If you need an interactive prompt, check the distro initramfs scripts and set the relevant debug options to get a shell prompt during the boot.
Stefan
Hi Stefan
Thanks for your help.
I am able now to print some messages like lsmod, ip addr show etc.
I loaded virtio_net and virtio_pci, there are also a few more, but eth0 is still unknown to the system. Do i need any other module?
Regards,
Oli
Am 18.09.2013 10:14, schrieb Stefan Hajnoczi:
Quoted 25 lines · Oliver Zemann
Quoted 8 lines
I would like to run my centos with an encrypted hard drive without
entering the password with vnc (as the connection is not encrypted).
For that i followed the guide on http://roosbertl.blogspot.ch/2012/12/centos6-disk-encryption-with-remote.htmlWhen i follow the tutorial in VirtualBox, i at least can see that i create a connection to the machine.
But on my productive server which runs in KVM, i even cant ping the machine.Quoted 7 lines
Is there some way to print out debug messages (like "ip addr show") before the mount command has been executed? Maybe some kvm console driver where i can pipe messages to...?
Also, isvirtio_netandvirtio_pcienough to load?I try to get that working for more than 10 days now, this is really driving me crazy.
In a situation like this a serial console can be helpful. Set the kernel command-line to use the serial port (console=ttyS0) and make sure the VM is configured with a serial port device.
This will allow you to follow the boot process. If you need an interactive prompt, check the distro initramfs scripts and set the relevant debug options to get a shell prompt during the boot.
Stefan
Quoted 4 lines · Oliver Zemann
I am able now to print some messages like lsmod, ip addr show etc. I loaded
virtio_netandvirtio_pci, there are also a few more, but eth0 is still unknown to the system.
Do i need any other module?
Check that the virtio-net PCI adapter is present:
$ grep 1af41000 /proc/bus/pci/devices
The output should print many fields and end with "virtio_pci" (the driver that is bound to this device).
If you get no output from this grep command then your QEMU command-line does not define a virtio-net PCI device.
If you get output but the last field is empty or "?" then you are missing virtio kernel modules. This can happen either because you didn't compile them or because the udev device aliases file hasn't been updated to autoload the right kernel module.
Stefan
Hi Stefan
Everything looks as expected.
Even more wierd: when i execute the script 01remote-ssh.sh as stated in http://roosbertl.blogspot.ch/2012/12/centos6-disk-encryption-with-remote.html i can connect with ssh to that machine, so its not a kvm problem i guess.
Many thanks for your help.
Btw.: when running on centos and not knowing how to get a initramfs interactive shell, simply append "rdshell" to the kernel params (grub) and hit 2 times ctrl+c on the password prompt for the hdd/luks encryption.
Regards,
Oliver
Am 19.09.2013 13:40, schrieb Stefan Hajnoczi:
Quoted 21 lines · Oliver Zemann
Quoted 4 lines
I am able now to print some messages like lsmod, ip addr show etc. I loaded
virtio_netandvirtio_pci, there are also a few more, but eth0 is still unknown to the system.
Do i need any other module?Check that the virtio-net PCI adapter is present:
$ grep 1af41000 /proc/bus/pci/devicesThe output should print many fields and end with "
virtio_pci" (the driver that is bound to this device).If you get no output from this grep command then your QEMU command-line does not define a virtio-net PCI device.
If you get output but the last field is empty or "?" then you are missing virtio kernel modules. This can happen either because you didn't compile them or because the udev device aliases file hasn't been updated to autoload the right kernel module.
Stefan