FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-25-2011, 09:47 PM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

I'm having problems trying to install CentOS as a KVM guest despite
following the wikis and howtos.

The problem is that most of the instructions skip the part that
happens after virt-install... It seems that something blindingly
obvious happens if nothing goes wrong and most instructions continues
from the OS installation screen.

However, when I try this, I get a blank console that says "Escape Char
is ^]" and doesn't do anything useful.

If I specify --vnc options, the blank console doesn't appear but the
CentOS guest doesn't respond to VNC connections. I've tried connecting
on the public IP, on the LAN IP, on loopback 127.0.0.1, with autoport,
with different specified ports, port numbers - 5900 since vnc seems to
accept :1 as 5901, enabling qemu to listen on all public interfaces
and allowing exceptions in iptables just in case loopback 127.0.0.1 is
blocked. But nothing gives me a console/screen that I can install the
OS.

Or should I expect VNC to work, given that the OS isn't installed, or
is it an inbuilt function of KVM?

The VM guest appears to be loaded, there are no obvious errors, virsh
list shows the VM but I can't do anything with them. It's been really
frustrating.

Can anybody please point out what's the obvious step or magic trick I'm missing?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-25-2011, 10:10 PM
Paul Heinlein
 
Default Install CentOS as KVM guest

On Tue, 26 Apr 2011, Emmanuel Noobadmin wrote:

> I'm having problems trying to install CentOS as a KVM guest despite
> following the wikis and howtos.
>
> The problem is that most of the instructions skip the part that
> happens after virt-install... It seems that something blindingly
> obvious happens if nothing goes wrong and most instructions
> continues from the OS installation screen.
>
> However, when I try this, I get a blank console that says "Escape
> Char is ^]" and doesn't do anything useful.

I've only done text-based installations of CentOS under KVM, so I
can't comment on VNC options. Here's an edited form of a standard
virt-install script:

virt-install
--name="VMName" --ram="1024" --vcpus="1"
--nographics --accelerate
--os-type="linux" --os-variant="rhel5.4"
--network="bridge:br0" --mac="54:52:00:12:34:56"
--disk="path=/var/lib/libvirt/images/VMName.dsk,size=20"
--location="http://some-mirror/centos/5/os/x86_64"
--extra-args="console=ttyS0"

As always, double-check to make sure that, e.g., the network option is
configured appropriately for your environment.

If you're doing a kickstart installation, the "ks=..." stuff goes
within the extra-args option.

--
Paul Heinlein <> heinlein@madboa.com <> http://www.madboa.com/
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2011, 06:49 AM
Jussi Hirvi
 
Default Install CentOS as KVM guest

On 26.4.2011 0.47, Emmanuel Noobadmin wrote:
> I'm having problems trying to install CentOS as a KVM guest despite
> following the wikis and howtos.

I succeeded with this howto:

http://sysadminman.net/blog/2011/kvm-virtualization-text-centos-guest-install-2098

Except I skipped the lvcreate part, as I don't use LVM.

- Jussi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2011, 10:08 AM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

Thanks for both the replies, I'm trying it out again. Text base
installation is fine with me, which was what I was originally trying
to do anyway.

Unfortunately, I'm still stuck at what should be the console with the
same "Connected to domain vm01. Escape char is ^]" message.

> virsh ttyconsole vm01
gives me /dev/pts/0

So the console was defined correctly, I could connect using virsh
console vm01, which brings me back to the blank screen.

Checking /var/log/libvirt/qemu/vm01.log reveals no error, just the
installation parameters and the fact it's redirecting char device to
/dev/pts/0

Just in case KVM is still booting the VM, I've checked top and kvm is
basically idling.

Is there anyway to check if KVM actually booted the VM past the
equivalent of BIOS POST? So that I can determine if it's hang at
initialization or it's the installation ISO that's the problem?


On 4/26/11, Jussi Hirvi <listmember@greenspot.fi> wrote:
> On 26.4.2011 0.47, Emmanuel Noobadmin wrote:
>> I'm having problems trying to install CentOS as a KVM guest despite
>> following the wikis and howtos.
>
> I succeeded with this howto:
>
> http://sysadminman.net/blog/2011/kvm-virtualization-text-centos-guest-install-2098
>
> Except I skipped the lvcreate part, as I don't use LVM.
>
> - Jussi
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2011, 10:16 AM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

Please ignore my last email. The embarrassing noob mistake is that,
all the past instructions/guides seem to imply that virt-install will
work fine using an ISO image. So I've assumed that doesn't matter,
although Jussi's link included the step to mount the ISO.

After wondering if the ISO is the problem, I decided to mount it to
check, since it looked OK. I tried another install using the mount
point and I no longer have a blank console

So the key is to mount ISO before using as installation source.

On 4/26/11, Emmanuel Noobadmin <centos.admin@gmail.com> wrote:
> Thanks for both the replies, I'm trying it out again. Text base
> installation is fine with me, which was what I was originally trying
> to do anyway.
>
> Unfortunately, I'm still stuck at what should be the console with the
> same "Connected to domain vm01. Escape char is ^]" message.
>
>> virsh ttyconsole vm01
> gives me /dev/pts/0
>
> So the console was defined correctly, I could connect using virsh
> console vm01, which brings me back to the blank screen.
>
> Checking /var/log/libvirt/qemu/vm01.log reveals no error, just the
> installation parameters and the fact it's redirecting char device to
> /dev/pts/0
>
> Just in case KVM is still booting the VM, I've checked top and kvm is
> basically idling.
>
> Is there anyway to check if KVM actually booted the VM past the
> equivalent of BIOS POST? So that I can determine if it's hang at
> initialization or it's the installation ISO that's the problem?
>
>
> On 4/26/11, Jussi Hirvi <listmember@greenspot.fi> wrote:
>> On 26.4.2011 0.47, Emmanuel Noobadmin wrote:
>>> I'm having problems trying to install CentOS as a KVM guest despite
>>> following the wikis and howtos.
>>
>> I succeeded with this howto:
>>
>> http://sysadminman.net/blog/2011/kvm-virtualization-text-centos-guest-install-2098
>>
>> Except I skipped the lvcreate part, as I don't use LVM.
>>
>> - Jussi
>> _______________________________________________
>> CentOS mailing list
>> CentOS@centos.org
>> http://lists.centos.org/mailman/listinfo/centos
>>
>
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-26-2011, 08:57 PM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

Unfortunately, things still don't work.

<rant>
It's just ridiculous that the installer under KVM does not detect the
cdrom drive it was booted from. Trying to do a net-install doesn't
work, maybe I messed up the networking even though br0 and eth0 is
working on the host.

Nevermind, let's install apache and use the mounted ISO. Verified
apache is working and the CentOS folder is accessible via web browser.
But, still the guest installer cannot seem to access the installation
files.

OK, so maybe I messed up the networking, after all I am the noob...
maybe specifying --network=bridge:br0 isn't enough. There was
something about a tap or tunnel when initially reading up on bridged
networking. Looking up more on this, there are several resources
(sorry KVM FAQ leads to a page that no longer exist) which like many
other instructions, give the commands without really explaining
what/why.

So I have to run some tunctl command and scripts to add a bridge and
tunnel/tap... but wait, I already made my bridge, will running the
script kill my networking by creating a second bridge? Especially the
warning about temporarily loosing connectivity due to ifcfg1 being
reset.

And if I need to run this script everytime in order to activate the
bridge and tunnel, doesn't that mean all my guest OS are screwed if
the host reboots while I'm not around? Shouldn't these things go into
permanent files like if-tun0 or something?

Every year, I get a little closer to not using VMWare but it seems
like this year is going to be victory for VMWare again.

CC to kvm mailing list but I expect, like my previous request for help
to the list, it will be rejected by mailman or a moderator.
</rant>

Just damn frustrated, even if it's probably just me being too stupid
to know how to use KVM.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 04:48 AM
Jussi Hirvi
 
Default Install CentOS as KVM guest

I understand you so well, I have been so frustrated too with
virt-install. Virt-manager is probably an easier way to install, but
text-based virt-install is very cranky (my experience). Maybe the devs
concentrate on the GUI side. Hope not.

Anyway, to know what is wrong, more info would be needed... Especially,
at what point does the installation stall.

Here is one of my install commands that worked:
virt-install --name mail
--os-variant rhel5.4 --ram 1024
--vcpus 2 --accelerate
--nographics -v
--location /mnt/centos56/ --network bridge:br0
--disk path=/kvmail/mail.img,size=290
--extra-args "console=ttyS0";

So I boot the installer from a mounted DVD, then in the dialog I say
"http install", and give it my local http "repo".

No other bridge is necessary - I think it would only make things messy.
In the installer let it configure interface with dhcp, if applicable, or
give it a free ip.

In giving the http repo remember the slash after the subdirectory, for
example (I noticed it is necessary)
address: 12.34.56.78
directory: centos/4.9/os/i386/

This would be http://12.34.56.78/pub/mirrors/centos.org/4.9/os/i386/
Check in your browser that the path works. The stage2 image should
appear in seconds from a local repo!

Once I did a net install with
--location http://ftp.funet.fi/pub/mirrors/centos.org/4.9/os/i386/
But on another try it did not seem to work anymore. Not sure about that.
Anyway the mounted ISO works every time. And a local repo is very fast.

- Jussi


On 26.4.2011 23.57, Emmanuel Noobadmin wrote:
> Unfortunately, things still don't work.
>
> <rant>
> It's just ridiculous that the installer under KVM does not detect the
> cdrom drive it was booted from. Trying to do a net-install doesn't
> work, maybe I messed up the networking even though br0 and eth0 is
> working on the host.
>
> Nevermind, let's install apache and use the mounted ISO. Verified
> apache is working and the CentOS folder is accessible via web browser.
> But, still the guest installer cannot seem to access the installation
> files.
>
> OK, so maybe I messed up the networking, after all I am the noob...
> maybe specifying --network=bridge:br0 isn't enough. There was
> something about a tap or tunnel when initially reading up on bridged
> networking. Looking up more on this, there are several resources
> (sorry KVM FAQ leads to a page that no longer exist) which like many
> other instructions, give the commands without really explaining
> what/why.
>
> So I have to run some tunctl command and scripts to add a bridge and
> tunnel/tap... but wait, I already made my bridge, will running the
> script kill my networking by creating a second bridge? Especially the
> warning about temporarily loosing connectivity due to ifcfg1 being
> reset.
>
> And if I need to run this script everytime in order to activate the
> bridge and tunnel, doesn't that mean all my guest OS are screwed if
> the host reboots while I'm not around? Shouldn't these things go into
> permanent files like if-tun0 or something?
>
> Every year, I get a little closer to not using VMWare but it seems
> like this year is going to be victory for VMWare again.
>
> CC to kvm mailing list but I expect, like my previous request for help
> to the list, it will be rejected by mailman or a moderator.
> </rant>
>
> Just damn frustrated, even if it's probably just me being too stupid
> to know how to use KVM.


--
Jussi Hirvi * Green Spot
Suvilahdenkatu 1 B 78 * 00500 Helsinki * Finland
Tel. +358 9 493 981 * Mobile +358 40 771 2098 (only sms)
jussi.hirvi@greenspot.fi * http://www.greenspot.fi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 05:11 AM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

On 4/28/11, Jussi Hirvi <listmember@greenspot.fi> wrote:
> I understand you so well, I have been so frustrated too with
> virt-install. Virt-manager is probably an easier way to install, but
> text-based virt-install is very cranky (my experience). Maybe the devs
> concentrate on the GUI side. Hope not.

Thanks, it helps to know I'm not alone in feeling frustrated over the process.

> Anyway, to know what is wrong, more info would be needed... Especially,
> at what point does the installation stall.
>
> Here is one of my install commands that worked:
> virt-install --name mail
> --os-variant rhel5.4 --ram 1024
> --vcpus 2 --accelerate
> --nographics -v
> --location /mnt/centos56/ --network bridge:br0
> --disk path=/kvmail/mail.img,size=290
> --extra-args "console=ttyS0";

I have pretty much the same thing except the names are slightly
different and I've already created the disk with qemu-img so the size
was omitted.

> No other bridge is necessary - I think it would only make things messy.
> In the installer let it configure interface with dhcp, if applicable, or
> give it a free ip.

Did you have to configure an additional tap interface? It seems like
it might be necessary but all the guides just involve giving some
command to create a temporary tap... which doesn't sound very safe if
I want it to persist after a reboot. But I couldn't find any
instructions on how a tap could be defined using a file like
/etc/sysconfig/network-scripts/if_tap1.

> In giving the http repo remember the slash after the subdirectory, for
> example (I noticed it is necessary)
> address: 12.34.56.78
> directory: centos/4.9/os/i386/
>
> This would be http://12.34.56.78/pub/mirrors/centos.org/4.9/os/i386/
> Check in your browser that the path works. The stage2 image should
> appear in seconds from a local repo!

I did this too, although my path was just centos56/
Just in case the guest VM was connecting in an around about manner and
iptables was blocking what appears to be an external connection. I
tested that it was accessible from both a VNC session on the host
itself, as well as from external network.

So this is where my installation halts. I will get the message unable
to retrieve http://12.34.56.78//Centos56/images/stage2.img

Just to be sure it was not just accessible but downloadable, I tried
to download this exact URL including the double slash and it works.

So it seems to me that the VM's networking is wrong somehow.
Especially since the assigned IP is not pingable during this point.
But I can't be sure if that's just because the OS is still being
installed.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 05:28 AM
Jussi Hirvi
 
Default Install CentOS as KVM guest

>> > Here is one of my install commands that worked:
>> > virt-install --name mail
>> > --os-variant rhel5.4 --ram 1024
>> > --vcpus 2 --accelerate
>> > --nographics -v
>> > --location /mnt/centos56/ --network bridge:br0
>> > --disk path=/kvmail/mail.img,size=290
>> > --extra-args "console=ttyS0";

On 28.4.2011 8.11, Emmanuel Noobadmin wrote:
> I have pretty much the same thing except the names are slightly
> different and I've already created the disk with qemu-img so the size
> was omitted.

I tried it too, didn't work. Try virt-install without creating the image
first. Virt-install will create the image (type "raw") on the go. If you
want qcow2, you can convert the image later. Qcow2 has some special
features but is slower than raw.

> Did you have to configure an additional tap interface? It seems like
> it might be necessary but all the guides just involve giving some
> command to create a temporary tap... which doesn't sound very safe if
> I want it to persist after a reboot. But I couldn't find any
> instructions on how a tap could be defined using a file like
> /etc/sysconfig/network-scripts/if_tap1.

No, I definitely did not do that. I don't know why that would be needed.

> I did this too, although my path was just centos56/
> Just in case the guest VM was connecting in an around about manner and
> iptables was blocking what appears to be an external connection. I
> tested that it was accessible from both a VNC session on the host
> itself, as well as from external network.
>
> So this is where my installation halts. I will get the message unable
> to retrievehttp://12.34.56.78//Centos56/images/stage2.img
>
> Just to be sure it was not just accessible but downloadable, I tried
> to download this exact URL including the double slash and it works.

The double slash does not look good... On next try, try it with no slash
at the end of ip, and no slash at the beginning of path. (But keep the
last slash.) :-)

> So it seems to me that the VM's networking is wrong somehow.
> Especially since the assigned IP is not pingable during this point.
> But I can't be sure if that's just because the OS is still being
> installed.

I would not expect ping to work at that point. I would do
virsh destroy myvm
virsh undefine myvm
virt-install again...

- Jussi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 05:32 AM
Jussi Hirvi
 
Default Install CentOS as KVM guest

On 28.4.2011 8.11, Emmanuel Noobadmin wrote:
> So this is where my installation halts. I will get the message unable
> to retrievehttp://12.34.56.78//Centos56/images/stage2.img
>
You could check your httpd log to see if there is anything, like 404
errors. And if problems persist, you could stop iptables for the time of
install. (Don't blame me... But I don't consider it a big risk in normal
circumstances.)

- Jussi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 04:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org