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-28-2011, 03:58 PM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

On 4/28/11, Gleb Natapov <gleb@redhat.com> wrote:
> Qemu is not intended to be used directly by end user. It is too complex as
> you already found out. VMware don't even give you access to such low parts
> of virt stack. You should use libvirt or virt-manager instead. Especially
> if you are concerned about security. I think libvirt can start guest on
> headless server.

Sorry for the confusion, I was using libvirtd in CLI, i.e.
virt-install and virsh, not qemu directly.

> If this still fails for you you need to complain to libvirt developers
> (not in a rant mode, but providing details of what exact version of
> software you have problem with and what are you trying to do). And
> libvirt developers will not be shy to complain to qemu developers if the
> problem turned to be on their side.

Apologies about the rant mode as well. Before that, I tried sending
two emails (25th and 26th Apr) to the KVM list with some details,
hoping to get some advice. But each of these failed to materialize on
the kvm list for unknown reasons.

So I resorted to posting to the CentOS list, where I did get some
response for which I'm very thankful. The rant post came when despite
the additional advice which helped me get a little further, I keep
running into unexpected brickwalls like anaconda not seeing the "dvd"
(mounted ISO specified using --location) that it just booted from.

Out of frustration, I CC'd that particular email to the kvm list,
figuring that since it's likely to get me flamed, the imp of
perversity would probably let it through... and it did.

> As far as I know libvirt has no problem using bridged networking and
> virt-manager use libvirt so it should work if you use new enough virt
> stack, but you should ask on libvirt mailing list instead.

I guess those were outdated warnings on older versions. I'll give it
another spin given some of the new suggestions like using virt-install
to create the disk file. If it still doesn't work, I'll go check the
libvirt ML (I'm belatedly getting the idea that libvirt is not part of
kvm).
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 04:02 PM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

On 4/28/11, Johnny Hughes <johnny@centos.org> wrote:
> You don't have to run an entire X desktop on the server to use
> virt-manager there.
>
> If you have a graphical linux workstation on the same network (x can be
> slow across a WAN, so I would only do it locally), you can just do this
> from the workstation with X running:
>
> ssh -XY -l root <server_name>
>
> then from the server do this:
>
> virt-manager
>
> This will run just the application "virt-manager" on the server and push
> the video display back to your machine.
>
> You may need to run this on the workstation before you ssh to the server
> machine:
>
> xhost +

Thanks a lot for this tip, it'll probably come in very useful for me
since it sounds a lot easier/efficient than having VNC (freenx never
worked for me) on every CentOS machine in my office. Although maybe
not in this particular case since my usual access to this particular
server is through WAN.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 04:20 PM
Ljubomir Ljubojevic
 
Default Install CentOS as KVM guest

Emmanuel Noobadmin wrote:
> On 4/28/11, Johnny Hughes <johnny@centos.org> wrote:
>> You don't have to run an entire X desktop on the server to use
>> virt-manager there.
>>
>> If you have a graphical linux workstation on the same network (x can be
>> slow across a WAN, so I would only do it locally), you can just do this
>> from the workstation with X running:
>>
>> ssh -XY -l root <server_name>
>>
>> then from the server do this:
>>
>> virt-manager
>>
>> This will run just the application "virt-manager" on the server and push
>> the video display back to your machine.
>>
>> You may need to run this on the workstation before you ssh to the server
>> machine:
>>
>> xhost +
>
> Thanks a lot for this tip, it'll probably come in very useful for me
> since it sounds a lot easier/efficient than having VNC (freenx never
> worked for me) on every CentOS machine in my office. Although maybe
> not in this particular case since my usual access to this particular
> server is through WAN.

It's SSH, it' safe from the internet also.

Ljubomir
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 05:11 PM
Les Mikesell
 
Default Install CentOS as KVM guest

On 4/28/2011 11:02 AM, Emmanuel Noobadmin wrote:
>
>> If you have a graphical linux workstation on the same network (x can be
>> slow across a WAN, so I would only do it locally), you can just do this
>> from the workstation with X running:
>>
>> ssh -XY -l root<server_name>
>>
>> then from the server do this:
>>
>> virt-manager
>>
>> This will run just the application "virt-manager" on the server and push
>> the video display back to your machine.
>>
>> You may need to run this on the workstation before you ssh to the server
>> machine:
>>
>> xhost +
>
> Thanks a lot for this tip, it'll probably come in very useful for me
> since it sounds a lot easier/efficient than having VNC (freenx never
> worked for me) on every CentOS machine in my office. Although maybe
> not in this particular case since my usual access to this particular
> server is through WAN.

Freenx is worth taking the time to solve whatever problem you had with
it. It should 'just work' from a yum install as long as you install the
/etc/nxserver/client.id_dsa.key into your NX client and have the default
ssh access. You don't need to install it on every machine, just one
that you use as your management desktop using the approach above to open
windows for GUI programs from nearby machines. You can run the NX
client->freenx connection over a WAN and get much better performance
than you will with ssh-forwarded windows direct to your remote location
- plus you can disconnect the NX session and pick it up elsewhere with
all your windows still open and programs still running.

--
Les Mikesell
lesmikesell@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 05:17 PM
Jussi Hirvi
 
Default Install CentOS as KVM guest

On 28.4.2011 18.58, Emmanuel Noobadmin wrote:
> like anaconda not seeing the "dvd"
> (mounted ISO specified using --location) that it just booted from.

That's ok, once you know that... But I agree, it is frustrating, because
of lack of documentation. How much time wasted!

I found an interesting series of tutorials, looks pretty much
up-to-date. Here is one:

http://www.cyberciti.biz/faq/kvm-virt-install-install-freebsd-centos-guest/

I never tried handing the install media over with the --connect (-c)
flag like there:

virt-install...
-c /nfsclient/iso/FreeBSD-7.3-RELEASE-amd64-disc1.iso

- Jussi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 05:29 PM
Tru Huynh
 
Default Install CentOS as KVM guest

On Thu, Apr 28, 2011 at 08:17:46PM +0300, Jussi Hirvi wrote:
> On 28.4.2011 18.58, Emmanuel Noobadmin wrote:
> > like anaconda not seeing the "dvd"
> > (mounted ISO specified using --location) that it just booted from.
>
> That's ok, once you know that... But I agree, it is frustrating, because
> of lack of documentation. How much time wasted!
>
does that mean that you volonteer to add some pages to wiki.centos.org
(-> centos-docs mailing list for more) ? ;P

Tru
--
Tru Huynh (mirrors, CentOS i386/x86_64 Package Maintenance)
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xBEFA581B
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 06:15 PM
Jussi Hirvi
 
Default Install CentOS as KVM guest

On 28.4.2011 20.29, Tru Huynh wrote:
> does that mean that you volonteer to add some pages to wiki.centos.org
> (-> centos-docs mailing list for more) ? ;P
>
Maybe I could, How could that be done? Though I should have started to
think about that earlier, now the big install hassle starts to be over
already. But at least I have a rudimentary roadmap for installing CentOS
4 or 5 guests text-based.

BTW, can guests be installed on raw (unformatted or formatted)
partitions (not images)? Can virt-install do that? I tried it and had no
luck.

- Jussi
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 06:29 PM
Jim Wildman
 
Default Install CentOS as KVM guest

On Thu, 28 Apr 2011, Jussi Hirvi wrote:

> BTW, can guests be installed on raw (unformatted or formatted)
> partitions (not images)? Can virt-install do that? I tried it and had no
> luck.
>
> - Jussi

You can install them to logical volumes...

Season to taste
virt-install -p -n test_phys -r 512 --arch=x86_64 --os-type=linux
--os-variant=rhel5 -l http://192.168.200.2/c5u5_x86_64 -x
ks=http://192.168.200.2/buildhost.ks -f /dev/vg_tosh/lv_phys -b virbr0

----------------------------------------------------------------------
Jim Wildman, CISSP, RHCE jim@rossberry.com http://www.rossberry.net
"Society in every state is a blessing, but Government, even in its best
state, is a necessary evil; in its worst state, an intolerable one."
Thomas Paine
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-28-2011, 08:49 PM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

On 4/28/11, Gleb Natapov <gleb@redhat.com> wrote:
> of virt stack. You should use libvirt or virt-manager instead. Especially
> if you are concerned about security. I think libvirt can start guest on
> headless server.
>
> If this still fails for you you need to complain to libvirt developers
> (not in a rant mode, but providing details of what exact version of
> software you have problem with and what are you trying to do). And
> libvirt developers will not be shy to complain to qemu developers if the
> problem turned to be on their side.

I've finally got an installation working, not using virt-install or
virt-manager. After reading through the libvirt site, I started
writing the domain definition manually.

Through trial and error, comparison with what virt-install generated
and the online examples, I got a working xml. Just for the record,
virsh --version reports 0.8.1

For the benefits of other newbies, my discovery so far is that

1. No-activity after the guest VM started
Originally, when I specified the CentOS DVD ISO, the guest will load
and then do nothing but chew up 100% CPU cycle on the allocated 1 vcpu
for quite some time. Subsequently, it appeared that mounting the ISO
as loop back is the solution. This seemed to imply that libvirt or KVM
couldn't boot a guest from ISO... which didn't quite make sense.

I ran into the issue when using my manually generated XML, it turned
out that the reason was the permissions (644) on vmlinuz and
initrd.img on the DVD. By copying the two files to local disk,
changing the permissions and using the <initrd> and <kernel> options,
I was able to boot the guest.

I was curious how virt-install got around this and learnt that I could
dump the config from a running machine. It turns out that virt-install
didn't exactly use the .xml it created, it added stuff to the running
version. Importantly making a temporary copy of initrd.img and
vmlinuz. I think the ISO problem with virt-install may be that it was
unable to mount the ISO to copy these files despite me running it as
root.


2. Anaconda couldn't see the DVD
Which was my rant earlier, since it sounded really stupid that the
installer couldn't see the disc it just booted off. Now, with #1
solved, it seems that anaconda wasn't booting off the disc after all.

However, the interesting thing here is that once I got past #1, My
guest could install from the DVD.

After comparing the xml files, it seems the problem is virt-install
did not save the path to the ISO/mounted DVD. Under the <disk>
element, there wasn't a source. With my manually generated xml,
specifying the ISO as the source worked.

But the virt-installed anaconda was complaining I don't have any hard
disks or cdroms. Not that there was no disk in the drive. Everytime I
picked an option like install media in HDD or CDROM, it prompted me no
device, do I want to install a driver. Since the hard disk definition
appears to be the same, I'm not sure why that happened with
virt-install's xml but not mine.


So right now, I managed to get the OS installed, rebooting it required
removing the initrd and kernel entry as well as the source so that it
would boot from the image disk.

Only problem is... networking still isn't working although brctl show
on the host shows that a vnet0 had been created and attached to the
bridge. Any pointers would be appreciated!
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-29-2011, 07:47 PM
Emmanuel Noobadmin
 
Default Install CentOS as KVM guest

On 4/29/11, Emmanuel Noobadmin <centos.admin@gmail.com> wrote:
> Only problem is... networking still isn't working although brctl show
> on the host shows that a vnet0 had been created and attached to the
> bridge. Any pointers would be appreciated!


Just to close off on this issue for the benefit of any future clueless
newbies like me, networking wasn't working due to one missing element
in the .xml

<model type='virtio' /> was the missing ingredient.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:19 PM.

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