Hello everybody I''am trying to understand all flags of the Configuration file for Guest VM in xen. I created with lvm an logical value which is named /test-01/ Now I want to install on this Logical Volume Centos6.3 from an ISO! First I don''t know if it is possible to take in my Configuration this kernel ? kernel = "/usr/lib/xen/boot/hvmloader" builder = "hvm" Is this correct or did i need to take another one and which ? My Second question ist the disk-parameter. Now it looks so. disk [''tap:aio:/dev/vg/test-01,sda,w'',''tap:aio:/mnt/disc/Centos6.3.iso,hdc:cdrom,r''] Is hdc:cdrom korrect ? (For my ISO i created also an Logical Volume which I mounted to /mnt/disc/) I hope somebody could help me or give me some helpfull Informations! -- View this message in context: http://xen.1045712.n5.nabble.com/Xen-Configuration-File-Understanding-tp5713143.html Sent from the Xen - User mailing list archive at Nabble.com.
Am Donnerstag, 20. Dezember 2012, 03:34:43 schrieb Patrick28:> I created with lvm an logical value which is named test-01 > Now I want to install on this Logical Volume Centos6.3 from an ISO! > > First I don''t know if it is possible to take in my Configuration this kernel > ? > kernel = "/usr/lib/xen/boot/hvmloader" > builder = "hvm"This is for booting your DomU ("guest") full virtualized - this is not (!!!) very efficient for Linux systems. You should take a look at Xen PV (paravirtualization). You have some hint''s to know in PV mode when setting up your guest - but this is it more then worth.... In PV you may use your "own" (means in guest) kernel if you boot with pygrub.> Is this correct or did i need to take another one and which ? > > My Second question ist the disk-parameter. Now it looks so. > disk > [''tap:aio:/dev/vg/test-01,sda,w'',''tap:aio:/mnt/disc/Centos6.3.iso,hdc:cdrom, > r'']Here is (just) a sample config with pygrub and lvm for a Gentoo Linux PV guest: --- snip --- memory=2048 name="myhost" disk=[ ''phy:/dev/vgxen/myhost_root,xvda1,w'', ''phy:/dev/vgxen/myhost_swap,xvda2,w'', ] vif = [ ''mac=00:0C:6E:50:52:11, bridge=xenbr0, vifname=myhost'' ] vcpus=3 cpu="9,10,11" bootloader = "/usr/bin/pygrub" extra = "console=hvc0 xencons=tty" on_poweroff = "restart" on_reboot = "restart" on_crash = "restart" --- snap --- You can configure your kernel within your guest as usual with grub2 in i.e. /boot/grub/menu.lst (kernel and grub config within your guest). You did not need any grub installed in your guest - just make a file /boot/grub/menu.lst and fill it "as usual": --- snip --- default 0 timeout 3 title Debian GNU/Linux 6.0 root (hd0,0) kernel /boot/vmlinuz-2.6.32-5-xen-amd64 root=/dev/xvda1 ro console=hvc0 xencons=tty initrd /boot/initrd.img-2.6.32-5-xen-amd64 --- snap --- In inittab you should change the 12345 line from 1:2345:respawn:/sbin/getty 38400 tty1 into: 1:2345:respawn:/sbin/getty 38400 hvc0 as hvc0 is your ("serial") console from xen Dom0. Your Guests /etc/fstab should look something like --- snip --- /dev/xvda1 / ext4 auto 1 1 /dev/xvda2 none swap sw 0 0 ... snap --- good luck!... hth cheers, Niels. -- --- Niels Dettenbach Syndicat IT & Internet http://www.syndicat.com PGP: https://syndicat.com/pub_key.asc --- _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
El 20/12/12 05:34, Patrick28 escribió:> I created with lvm an logical value which is named /test-01/ > Now I want to install on this Logical Volume Centos6.3 from an ISO! > > First I don''t know if it is possible to take in my Configuration this kernel > ? > kernel = "/usr/lib/xen/boot/hvmloader" > builder = "hvm""kernel", from Xen''s configuration file point of view, is the executable to load first, normally it has to be something that know how to talk to the underlaying hypervisor In a similar way, when you configure your boot loader on a baremetal host, you have to pass control to a executable which knows how to talk to your hardware. It may be the boot sector of another partition where another boot loader resides, or directly a file containing a linux kernel for your system architecture. In Xen''s case, the control, within the Virtual Machine context, has to be passed to something that knows how to talk to the hypervisor. It may be a PV enabled Linux kernel. Or some special layer that could emulate a "normal" computer hardware for a unmodified OS, which is the case of hvmloader. Normally, the configuration files for a PV guest and for a HVM guest are quite different, specially in the part that describe storage, booting and some fancy options to emulate video card and mouse. pygrub allows you to extract the kernel image from the guest''s block device, while the guest is still offline, and create the VM as it would do with "kernel" and "initrd" directives. Niels just described it in details, much better than I could.> My Second question ist the disk-parameter. Now it looks so. > disk > [''tap:aio:/dev/vg/test-01,sda,w'',''tap:aio:/mnt/disc/Centos6.3.iso,hdc:cdrom,r''] > > Is hdc:cdrom korrect ? (For my ISO i created also an Logical Volume which I > mounted to /mnt/disc/)hdc:cdrom is correct. Consider this syntax: ''file:/path/to/Centos6.3.iso,ioemu:hdc:cdrom,r'' Since the file containing your ISO is already a image of a block device, it can be exported directly to the VM. You could also copy it''s content to a Logical Volume (low level copy, with dd or something), but normally there is no point to do that. A iso file is much easer to manage. On big installations you could even put all your ISOs on a NFS server and share them with all your hosts in ro mode. It''s very common to attach to a VM a cdrom using ISO file, and a system disk using a block device like a Logical Volume. Greetings. -- Alexandre Kouznetsov