[kernel-xen] Converting from bad habits

Joe Fialkowski joe at zoomcloud.net
Wed Dec 5 09:53:16 EST 2012


Also I would suggest you look into using pygrub. If you install pygrub in on the host server, then it uses the internal grub boot config from the VM. This way if your kernel inside the VM updates, you don't need to update that in your cfg file on the host.   

-- 
Joe Fialkowski


On Tuesday, December 4, 2012 at 5:10 PM, Steven Spencer wrote:

> On 12/04/2012 11:01 AM, Steven Spencer wrote:
> > On 12/04/2012 09:12 AM, Joe Fialkowski wrote:
> > > Here is a sample config of mine. Sets the proper IP and bridge info. I
> > > am also using lvm's for the VM disks rather than image files.
> > > 
> > > ## Cfg type: XEN-PV-LOCAL-STORAGE
> > > 
> > > bootloader = '/usr/bin/pygrub'
> > > extra = ''
> > > memory = 1536
> > > hostname = 'hostname.domain.com (http://hostname.domain.com)'
> > > cpu_weight = 256
> > > name = 'vm1039'
> > > vif = ['ip=123.123.123.132, vifname=vifvm1039.0,
> > > mac=00:16:3e:1f:bf:1a, bridge=br0, model=e1000']
> > > vnc = 0
> > > vcpus = 4
> > > vncviewer = 0
> > > serial = 'pty'
> > > disk = ['phy:/dev/vg_xm3/vm1039_img,xvda1,w',
> > > 'phy:/dev/vg_xm3/vm1039_swap,xvda2,w']
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > kernel-xen mailing list
> > > kernel-xen at lists.wireless.org.au (mailto:kernel-xen at lists.wireless.org.au)
> > > https://lists.wireless.org.au/mailman/listinfo/kernel-xen
> > > 
> > 
> > Joe,
> > 
> > Thanks for that. For some reason I'm not getting past the initial start
> > stage of the vm. When I do a xm create /etc/xen/config.file.cfg it
> > starts without error, but I can go no further to do the OS install, etc.
> > I attempted using a kickstart config file as well, which had no affect.
> > Here's what the console shows for the VM when it is started:
> > 
> > Xen Minimal OS!
> > start_info: 0xb9f000(VA)
> > nr_pages: 0x40000
> > shared_inf: 0xdfd93000(MA)
> > pt_base: 0xba2000(VA)
> > nr_pt_frames: 0xb
> > mfn_list: 0x99f000(VA)
> > mod_start: 0x0(VA)
> > mod_len: 0
> > flags: 0x0
> > cmd_line: (hd0)/boot/grub/grub.conf
> > stack: 0x95e900-0x97e900
> > MM: Init
> > _text: 0x0(VA)
> > _etext: 0x70b24(VA)
> > _erodata: 0x8b000(VA)
> > _edata: 0x90e40(VA)
> > stack start: 0x95e900(VA)
> > _end: 0x99ef00(VA)
> > start_pfn: bb0
> > max_pfn: 40000
> > Mapping memory range 0x1000000 - 0x40000000
> > setting 0x0-0x8b000 readonly
> > skipped 0x1000
> > MM: Initialise page allocator for da8000(da8000)-40000000(40000000)
> > MM: done
> > Demand map pfns at 40001000-2040001000.
> > Heap resides at 2040002000-4040002000.
> > Initialising timer interface
> > Initialising console ... done.
> > gnttab_table mapped at 0x40001000.
> > Initialising scheduler
> > Thread "Idle": pointer: 0x2040002050, stack: 0xfc0000
> > Thread "xenstore": pointer: 0x2040002800, stack: 0xfd0000
> > xenbus initialised on irq 1 mfn 0x19e644
> > Dummy main: start_info=0x97ea00
> > Thread "main": pointer: 0x2040002fb0, stack: 0xfe0000
> > "main" "(hd0)/boot/grub/grub.conf"
> > vbd 51712 is hd0
> > ******************* BLKFRONT for device/vbd/51712 **********
> > 
> > 
> > backend at /local/domain/0/backend/tap/7/51712
> > 
> > Thanks,
> 
> So, I've sort of made headway, but now have new problems.
> 
> First, I'm using the vmlinuz and initramfs from the /boot directory on 
> Dom0. I'm not sure if that is correct or not. If not, what are good 
> CentOS6 vmlinuz and initramfs that can be used?
> 
> Here's the DomU config with the IP obfuscated:
> 
> kernel="/boot/vmlinuz-2.6.32-279.14.1.el6.x86_64"
> ramdisk="/boot/initramfs-3.6.7-1.el6xen.x86_64.img"
> name = "vm_test"
> memory = 1024
> vcpus = 1
> disk = [ 'tap:aio:/virtual/vm_test.img,xvda,w' ]
> extra="text ks=http://10.10.10.104/sample.ks.cfg"
> on_poweroff = 'destroy'
> on_reboot = 'restart'
> on_crash = 'restart'
> vif = [ 
> "ip=10.10.10.132,mac=00:16:36:35:35:97,bridge=br0,script=vif-bridge" ]
> # extra="(hd0)/boot/grub/grub.conf"
> 
> When I run with this config, the console takes off like it's going to 
> fly through, then bombs with this error:
> 
> dracut: FATAL: No or empty root= argument
> dracut: Refusing to continue
> 
> 
> dracut Warning: Signal caught!
> dracut Warning: dracut: FATAL: No or empty root= argument
> dracut Warning: dracut: Refusing to continue
> Kernel panic - not syncing: Attempted to kill init!
> Pid: 1, comm: init Not tainted 2.6.32-279.14.1.el6.x86_64 #1
> Call Trace:
> [<ffffffff814fd98a>] ? panic+0xa0/0x168
> [<ffffffff81070c42>] ? do_exit+0x862/0x870
> [<ffffffff8117d0a5>] ? fput+0x25/0x30
> [<ffffffff81070ca8>] ? do_group_exit+0x58/0xd0
> [<ffffffff81070d37>] ? sys_exit_group+0x17/0x20
> [<ffffffff8100b0f2>] ? system_call_fastpath+0x16/0x1b
> 
> What am I missing? Once I have this, I'll have it for good, but I'm 
> struggling to get a working config.
> 
> Thanks in advance.
> -- 
> -- 
> Steven G. Spencer, Network Administrator
> KSC Corporate - The Kelly Supply Family of Companies
> Office 308-382-8764 Ext. 231
> Mobile 308-380-7957
> _______________________________________________
> kernel-xen mailing list
> kernel-xen at lists.wireless.org.au (mailto:kernel-xen at lists.wireless.org.au)
> https://lists.wireless.org.au/mailman/listinfo/kernel-xen
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wireless.org.au/pipermail/kernel-xen/attachments/20121204/6cae009b/attachment-0001.html>


More information about the kernel-xen mailing list