<div dir="ltr"><div><div><div><div>Thank You for your reply.<br>>What was the output of the 'virt-rescue --suggest -d XYZ'?<br>Inspecting the virtual machine or disk image ...<br><br>This disk contains one or more operating systems.  You can use these mount<br>commands in virt-rescue (at the ><rescue> prompt) to mount the filesystems.<br><br># /dev/sda1 is the root of a linux operating system<br># type: linux, distro: ubuntu, version: 12.4<br># Ubuntu 12.04.3 LTS<br><br>mount /dev/sda1 /sysroot/<br>mount --bind /dev /sysroot/dev<br>mount --bind /dev/pts /sysroot/dev/pts<br>mount --bind /proc /sysroot/proc<br>mount --bind /sys /sysroot/sys<br><br></div>>And did you run _all_ those commands?<br></div>yes I run all those commands in this sequence:<br><span class="im">virt-rescue --network -d XYZ<br>mou</span>nt /dev/sda1 /sysroot/<br><span class="im">chroot /sysroot</span><br><span class="im">update-initramfs -c -k 3.2.0-58-generic<br><br></span><span class="im">But it failed with following error:<br>
update-initramfs: failed for /boot/initrd.img-3.2.0-58-generic with 1.</span><br><br></div>Actually one of my VM in KVM platform got corrupted.When I try to start it,I get the menu and after selecting <span class="im">Ubuntu, with Linux 3.2.0-58-generic</span> it gives an error "Kernel Panic - not Syncing: VFS: Unable to mount root fs on unknown-block(0,0).So I thought of updating the initramfs to see if the problem is resolved.But updation is failing.Your valuable suggestion is awaited.<br></div>
</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 2, 2014 at 11:05 PM, Richard W.M. Jones <span dir="ltr"><<a href="mailto:rjones@redhat.com" target="_blank">rjones@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Dec 02, 2014 at 02:26:49PM +0000, Suvajit Sarkar wrote:<br>
> Hello,<br>
> I am trying to run this command<br>
> virt-rescue --suggest -d XYZ<br>
> virt-rescue --network -d XYZ<br>
> the prompt is looking like this:<br>
> I have no name!@(none):<br>
<br>
</span>This is probably:<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=812970" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=812970</a><br>
It is supposed to be fixed in libguestfs >= 1.28.<br>
<span class=""><br>
> now I mounted the root partition suggested by virt-rescue to /sysroot<br>
> then chroot /sysroot<br>
> after that I tried to rebuild an initrd.img with the following command<br>
><br>
> update-initramfs -c -k 3.2.0-58-generic<br>
><br>
> But it failed with following error:<br>
> update-initramfs: failed for /boot/initrd.img-3.2.0-58-generic with 1.<br>
<br>
</span>What was the output of the 'virt-rescue --suggest -d XYZ'?<br>
<br>
And did you run _all_ those commands?<br>
<span class=""><br>
> Also when running  apt-get update , it fails saying "no address associated<br>
> with hostname.<br>
<br>
</span>Likely you need to copy /etc/resolv.conf to /sysroot/etc/resolv.conf<br>
as well, so that name resolution works inside the chroot.<br>
<span class=""><br>
> host configuration:ubuntu 14.04<br>
> guest:ubuntu 12.04<br>
<br>
</span>Rich.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Richard Jones, Virtualization Group, Red Hat <a href="http://people.redhat.com/~rjones" target="_blank">http://people.redhat.com/~rjones</a><br>
Read my programming and virtualization blog: <a href="http://rwmj.wordpress.com" target="_blank">http://rwmj.wordpress.com</a><br>
libguestfs lets you edit virtual machines.  Supports shell scripting,<br>
bindings from many languages.  <a href="http://libguestfs.org" target="_blank">http://libguestfs.org</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Thanks and regards,<div>Suvajit Sarkar</div></div></div>
</div>