Xen Users, I have always used XEN from the debian/ubuntu repositories, as I have had very good experiences with the repository version. However, I now find myself needing to build XEN from source, so that I can boot BSD based guests (needs to be compiled with vmxassist=n). I have now spent well over 12 hours trying to get a build-from source installation of XEN 3.3 on Ubuntu. I have finally gotten myself to a somewhat working place - Dom0 now boots (although I get some error messages about apparmor support, etc), but when I go to create a DomU, it instantly flips the DomU back off. I get a message from QEMU in the qemu-domain log.... "I/O request not ready: 0, pty:0, port: 0, data: 0, count: 0, size: 0". Ugh. Most likely, I need to start over (again), but I feel like I''m crawling through this process. Are there any good guides out there on building 3.3 from source on a clean system, or a repository with VMXASSIST=n already built in, or a workaround to rebuilding the whole thing? I''ll definitely owe someone a beer. Thank You, Atlas Networks is an Atlas Accelerator Company _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello Nathan, yesterday I managed to compile Xen 3.3 from the sources on Debian Etch. I am not a XEN specialist myself but maybe my notes will help you since they say that Ubuntu is closely related to Debian. Especialy note the hints about configuring the XEN kernel below. cd /usr/src/xen-3.3.0 make linux-2.6-xen-config CONFIGMODE=menuconfig That may let you configure the VMXASSIST=n Regards, Franz ########################## Howto build Xen 3.3 from the sources on Debian Etch --------------------------------------------------- Base: Debian Etch 4.0R4a netinst for AMD64/Intel64 Hints on the WEB say that we need a newer mercurial (V 0.9.5 or newer). Newer than the standard V0.9.1 that is provided via Debian Etch Problem: from where do we get the newer mercurial? mkdir -p /usr/src/XEN_3.3.0 cd /usr/src/XEN_3.3.0 wget http://packages.debian.org/etch-backports/all/mercurial-common/download/mercurial-common_1.0.1-5.1~bpo40+1_all.deb wget \ http://www.backports.org/debian/pool/main/m/mercurial/mercurial_1.0.1-5.1~bpo40+1_amd64.deb dpkg -i ./mercurial-common_1.0.1-5.1~bpo40+1_all.deb dpkg -i ./mercurial_1.0.1-5.1~bpo40+1_amd64.deb ##################### # Download other build tools: # Attention: the apt-get will also deinstall packages # Use aptitude instead to see the conflicts etc # The problem is the ''hotplug'' # It conflicts with udev, kde and many others. # The xen Readme states that we need hotplug OR udev # --> we stay with udev and its dependent packages # apt-get install iproute bridge-utils hotplug python libz-dev python-dev gawk pciutils-dev # apt-get install graphviz texlive-latex-base texlive-latex-pdfetex transfig # apt-get install build-essential libssl-dev gettext python-dev libncurses5-dev xorg-dev bcc aptitude install iproute aptitude install bridge-utils # !!!! NO; do not install: aptitude install hotplug aptitude install python aptitude install libz-dev aptitude install python-dev aptitude install gawk aptitude install pciutils-dev aptitude install graphviz # this install texlive and de-installs our normal tetex! apt-get install tex-common texlive-base texlive-base-bin texlive-common \ texlive-doc-base texlive-doc-de texlive-lang-german \ texlive-latex-base texlive-pdfetex preview-latex-style \ texlive-latex-extra texlive-pictures texlive-fonts-recommended # aptitude install texlive-latex-pdfetex ??? apt-get install texlive-latex-recommended aptitude install texinfo aptitude install transfig aptitude install build-essential aptitude install libssl-dev aptitude install gettext aptitude install python-dev aptitude install libncurses5-dev aptitude install xorg-dev aptitude install bcc ##################### # Get the Xen sources # We download a tar ball of Xen 3.3 and clone the kernel tree ##################### mkdir -p /usr/src/XEN_3.3.0 cd /usr/src/XEN_3.3.0 # Get Xen 3.3.0 sources # Goto # http://www.xen.org/download/index.html # and download # http://bits.xensource.com/oss-xen/release/3.3.0/xen-3.3.0.tar.gz wget http://bits.xensource.com/oss-xen/release/3.3.0/xen-3.3.0.tar.gz # Get the xen kernel tree ## DEPRECATED: instead we clone ourselves (see below) # wget http://bits.xensource.com/oss-xen/release/3.3.0/linux-2.6.18-xen-3.3.0.tar.gz ### cleanup cd /usr/src rm -rf xen-3.3.0 rm -rf linux-2.6.18-xen.hg # unpack xen sources cd /usr/src tar xzf XEN_3.3.0/xen-3.3.0.tar.gz # Get the xen kernel tree via cloneing cd /usr/src hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg ################################################ # Now, let''s compile that Xen cd /usr/src/xen-3.3.0 make KERNELS=linux-2.6-xen world # Note: the option ''CONFIGMODE=menuconfig'' is meant to be used with other targets (see below) # make linux-2.6-xen-config CONFIGMODE=menuconfig # # It works at least if we run ''make KERNELS=linux-2.6-xen world'' once # See the addon at the end down below. # From the /usr/src/xen-3.3.0/README that contains all instruction for building/installing! # In /usr/src/xen-3.3.0 use # make help # to learn more about the targets. # # 5. To rebuild a kernel with a modified config: # # # make linux-2.6-xen-config CONFIGMODE=menuconfig (or xconfig) # # make linux-2.6-xen-build # # make linux-2.6-xen-install # Other systems may requires the use of ''mkinitramfs'' to create the # ram disk. # # depmod 2.6.18-xen # # mkinitramfs -o initrd-2.6.18-xen.img 2.6.18-xen # cleanup old xen-tools and kernels make uninstall make install depmod 2.6.18.8-xen # prepare the initrd config ## cp /etc/initramfs-tools/modules /etc/initramfs-tools/modules.orig cat > /etc/initramfs-tools/modules <<HERE # for Xen md_mod raid1 sd_mod HERE mkinitramfs -k -o /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen # edit the grub menu susi:/boot/grub# tail menu.lst ### END DEBIAN AUTOMAGIC KERNELS LIST title Xen 3.3.0 / kernel 2.6.18.8-xen root (hd0,0) kernel /xen-3.3.0.gz console=vga module /vmlinuz-2.6.18.8-xen root=/dev/mapper/RootVG-root ro console=tty0 module /initrd-2.6.18.8-xen.img savedefault OR as a refined test for HVM # Note: Adding the pciback.hide to the kernel options did not work as pciback is # only compiled as a module by default. # If we compile it as non-module (see below for instructions) it works # no pciback.hide title Xen 3.3.0 / kernel 2.6.18.8-xen no-backhide root (hd0,0) kernel /xen-3.3.0.gz console=vga noreboot max_loop=128 dom0_mem=1024M module /vmlinuz-2.6.18.8-xen root=/dev/mapper/RootVG-root ro console=tty0 module /initrd-2.6.18.8-xen.img savedefault # with pciback.hide and iommu for VT-d title Xen 3.3.0 / kernel 2.6.18.8-xen backhide the ATI Radeon root (hd0,0) #kernel /xen-3.3.0.gz console=vga noreboot max_loop=128 dom0_mem=1024M iommu=1 kernel /xen-3.3.0.gz console=vga noreboot max_loop=128 dom0_mem=1024M module /vmlinuz-2.6.18.8-xen root=/dev/mapper/RootVG-root ro console=tty0 pciback.hide=(01:00. 0)(01:00.1) module /initrd-2.6.18.8-xen.img savedefault ### link xen rc script update-rc.d xend defaults 20 21 update-rc.d xendomains defaults 21 20 ############################################ # Reboot your box and boot the Xen kernel ########## # Add on, from http://wiki.xensource.com/xenwiki/VTdHowTo # Compile PCI backend hide fixed into the kernel How to turn on VT-d in Xen 1 ) cd xen-unstable.hg 2 ) make install 3 ) make linux-2.6-xen-config CONFIGMODE=menuconfig 4 ) change XEN->"PCI-device backend driver" from "M" to "*". 5 ) make linux-2.6-xen-build 6 ) make linux-2.6-xen-install 7 ) depmod 2.6.18.8-xen 8 ) mkinitrd -v -f --with=ahci --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18-xen.img 2.6.1 8.8-xen 9 ) cp initrd-2.6.18-xen.img /boot 10) lspci - select the PCI BDF you want to assign to guest OS 11) "hide" pci device from dom0 as following sample grub entry: title Xen-Fedora Core (2.6.18-xen) root (hd0,0) kernel /boot/xen.gz com1=115200,8n1 console=com1 iommu=1 module /boot/vmlinuz-2.6.18.8-xen root=LABEL=/ ro xencons=ttyS console=tty0 console=ttyS0, pcib ack.hide=(01:00.0)(03:00.0) module /boot/initrd-2.6.18-xen.img 12) reboot system 13) add "pci" line in /etc/xen/hvm.conf for to assigned devices pci = [ ''01:00.0'', ''03:00.0'' ] 15) start hvm guest and use "lspci" to see the passthru device and "ifconfig" to see if IP address has been assigned to NIC devices. ## # Try that on our xen host cd /usr/src/xen-3.3.0 make linux-2.6-xen-config CONFIGMODE=menuconfig change XEN->"PCI-device backend driver" from "M" to "*". make linux-2.6-xen-build make linux-2.6-xen-install depmod 2.6.18.8-xen mkinitramfs -k -o /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen Boot .... and pciback.hide works as a kernel parameter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I spent many hours to try to build a working Xen from source code. This is what I found for fedora 9. * * *Build HVM client in Fedora 9* 1. When installing fedora core 9, partition the disk using LVM2. Create two virtual group: one for host and the other one for guest. Select the development tools when install the OS. 2. yum install mercurial 3. yum install dev86 (for bcc, hvmloader need this) 4. mv /lib/tls /lib/tls.disabled 5. echo "hwcap 0 nosegneg" > /etc/ld.so.conf.d/nosegneg.conf 6. ldconfig 7. make world 8. ./install 9. create an initrd by: 1. # depmod 2.6.18-xen 2. # mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18-xen.img 2.6.18-xen 10. If you will use, VNC''s mouse maybe out of sync with the host, in Windows, disable the "Enhance Pointer Precision" option in the mouse configuration As in steps 4 and 5, I tried to disable the nosegneg warning during Xen start. But it may sometimes still appear. I have no idea why. About the Linux distribution, some developers of Xen I happen to know use RHEL 5.2. Maybe you can try CentOS5.2. Thanks>Xen Users,>>I have always used XEN from the debian/ubuntu repositories, as I have hadvery good experiences with the repository version. However, I now find myself needing to build XEN from source, so that I can boot BSD based>guests (needs to be compiled with vmxassist=n).>>I have now spent well over 12 hours trying to get a build-from sourceinstallation of XEN 3.3 on Ubuntu. I have finally gotten myself to a somewhat working place - Dom0 now boots (although I get some error messages>about apparmor support, etc), but when I go to create a DomU, it instantlyflips the DomU back off. I get a message from QEMU in the qemu-domain log.... "I/O request not ready: 0, pty:0, port: 0, data: 0, count: 0, size: 0". >Ugh.>>Most likely, I need to start over (again), but I feel like I''m crawlingthrough this process. Are there any good guides out there on building 3.3 from source on a clean system, or a repository with VMXASSIST=n already>built in, or a workaround to rebuilding the whole thing?>>I''ll definitely owe someone a beer.> >Thank You,_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Zhi, Regarding step 10 below, are you using usbdevice=''tablet'' in your domU config instead of the usbdevice=''mouse'' default? If not, doing so may resolve the mouse sync issue to a far better degree than simply disabling the Windows option you mention. Dustin From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Zhi Wang Sent: Thursday, October 23, 2008 11:33 To: xen-users@lists.xensource.com Subject: RE: [Xen-users] Building from Source I spent many hours to try to build a working Xen from source code. This is what I found for fedora 9. Build HVM client in Fedora 9 1. When installing fedora core 9, partition the disk using LVM2. Create two virtual group: one for host and the other one for guest. Select the development tools when install the OS. 2. yum install mercurial 3. yum install dev86 (for bcc, hvmloader need this) 4. mv /lib/tls /lib/tls.disabled 5. echo "hwcap 0 nosegneg" > /etc/ld.so.conf.d/nosegneg.conf 6. ldconfig 7. make world 8. ./install 9. create an initrd by: 1. # depmod 2.6.18-xen 2. # mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18-xen.img 2.6.18-xen 10. If you will use, VNC''s mouse maybe out of sync with the host, in Windows, disable the "Enhance Pointer Precision" option in the mouse configuration As in steps 4 and 5, I tried to disable the nosegneg warning during Xen start. But it may sometimes still appear. I have no idea why. About the Linux distribution, some developers of Xen I happen to know use RHEL 5.2. Maybe you can try CentOS5.2. Thanks>Xen Users,>>I have always used XEN from the debian/ubuntu repositories, as I have hadvery good experiences with the repository version. However, I now find myself needing to build XEN from source, so that I can boot BSD based>guests (needs to be compiled with vmxassist=n).>>I have now spent well over 12 hours trying to get a build-from sourceinstallation of XEN 3.3 on Ubuntu. I have finally gotten myself to a somewhat working place - Dom0 now boots (although I get some error messages>about apparmor support, etc), but when I go to create a DomU, it instantlyflips the DomU back off. I get a message from QEMU in the qemu-domain log.... "I/O request not ready: 0, pty:0, port: 0, data: 0, count: 0, size: 0". >Ugh.>>Most likely, I need to start over (again), but I feel like I''m crawlingthrough this process. Are there any good guides out there on building 3.3 from source on a clean system, or a repository with VMXASSIST=n already>built in, or a workaround to rebuilding the whole thing?>>I''ll definitely owe someone a beer.>>Thank You,_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
I tried but no luck. But it is only under my particular configuration. It may be a worthy try if others have the same mouse sync issues. Disabling Windows mouse does the trick for Windows (Win2003). I still have the mouse sync issue for ubuntu desktop hvm domU. Not a big problem for me since I use ubuntu server without any GUI in domU. The virtual manager in fedora can capture the host mouse. If possible that may be a good choice. But it seems the virtual manager isn''t compatible with Xen 3.3.0 Best regards Zhi Wang On Thu, Oct 23, 2008 at 12:20 PM, Dustin Henning <Dustin.Henning@prd-inc.com> wrote:> Zhi, > > Regarding step 10 below, are you using usbdevice=''tablet'' > in your domU config instead of the usbdevice=''mouse'' default? If not, doing > so may resolve the mouse sync issue to a far better degree than simply > disabling the Windows option you mention. > > Dustin > > > > *From:* xen-users-bounces@lists.xensource.com [mailto: > xen-users-bounces@lists.xensource.com] *On Behalf Of *Zhi Wang > *Sent:* Thursday, October 23, 2008 11:33 > *To:* xen-users@lists.xensource.com > *Subject:* RE: [Xen-users] Building from Source > > > > I spent many hours to try to build a working Xen from source code. This is > what I found for fedora 9. > > *Build HVM client in Fedora 9* > > 1. When installing fedora core 9, partition the disk using LVM2. Create > two virtual group: one for host and the other one for guest. Select the > development tools when install the OS. > 2. yum install mercurial > 3. yum install dev86 (for bcc, hvmloader need this) > 4. mv /lib/tls /lib/tls.disabled > 5. echo "hwcap 0 nosegneg" > /etc/ld.so.conf.d/nosegneg.conf > 6. ldconfig > 7. make world > 8. ./install > 9. create an initrd by: > 1. # depmod 2.6.18-xen > 2. # mkinitrd -v -f --with=aacraid --with=sd_mod --with=scsi_mod > initrd-2.6.18-xen.img 2.6.18-xen > 10. If you will use, VNC''s mouse maybe out of sync with the host, in > Windows, disable the "Enhance Pointer Precision" option in the mouse > configuration > > As in steps 4 and 5, I tried to disable the nosegneg warning during Xen > start. But it may sometimes still appear. I have no idea why. > > About the Linux distribution, some developers of Xen I happen to know use > RHEL 5.2. Maybe you can try CentOS5.2. > > Thanks > > >Xen Users, > > > > > >I have always used XEN from the debian/ubuntu repositories, as I have had > very good experiences with the repository version. However, I now find > myself needing to build XEN from source, so that I can boot BSD based > >guests (needs to be compiled with vmxassist=n). > > > > > >I have now spent well over 12 hours trying to get a build-from source > installation of XEN 3.3 on Ubuntu. I have finally gotten myself to a > somewhat working place - Dom0 now boots (although I get some error messages > >about apparmor support, etc), but when I go to create a DomU, it instantly > flips the DomU back off. I get a message from QEMU in the qemu-domain > log.... "I/O request not ready: 0, pty:0, port: 0, data: 0, count: 0, size: > 0". >Ugh. > > > > > >Most likely, I need to start over (again), but I feel like I''m crawling > through this process. Are there any good guides out there on building 3.3 > from source on a clean system, or a repository with VMXASSIST=n already > >built in, or a workaround to rebuilding the whole thing? > > > > > >I''ll definitely owe someone a beer. > > > > > >Thank You, >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Franz, Thanks! That document is awesome! I followed it closely, modifying package names slightly where they differ in Ubuntu. However, I got the dom0 booted on 3.3. When I go to create a DomU, the same thing happens as before. It starts up for just a moment, and then disappears from xm list. nathan@ubuntu:~$ sudo xm create lb1 && sudo xm list && sleep 1 && sudo xm list Using config file "/etc/xen/lb1". Started domain lb1 Name ID Mem VCPUs State Time(s) Domain-0 0 3505 4 r----- 46.4 lb1 14 512 1 r----- 0.1 Name ID Mem VCPUs State Time(s) Domain-0 0 3505 4 r----- 47.0 nathan@ubuntu:~$ cat /var/log/xen/qemu-dm-lb1.log.6 domid: 4 qemu: the number of cpus is 1 Watching /local/domain/0/device-model/4/logdirty/next-active Watching /local/domain/0/device-model/4/command xs_read(): vncpasswd get error. /vm/d0050129-f2bb-7ce9-a443-d56a7e404781/vncpasswd. qemu_map_cache_init nr_buckets = 4000 size 196608 shared page at pfn 1fffe buffered io page at pfn 1fffc Time offset set 0 Register xen platform. Done register platform. I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0 nathan@ubuntu:~$ cat /etc/xen/lb1 name = "lb1" builder = "hvm" memory = "512" device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" disk = [''phy:/dev/loop0,hda,w''] boot="c" acpi="0" serial = "pty" vncpasswd = "test" Thank You, Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Franz Regensburger Sent: Thursday, October 23, 2008 1:01 AM To: xen-users@lists.xensource.com Subject: Re: [Xen-users] Building from Source Hello Nathan, yesterday I managed to compile Xen 3.3 from the sources on Debian Etch. I am not a XEN specialist myself but maybe my notes will help you since they say that Ubuntu is closely related to Debian. Especialy note the hints about configuring the XEN kernel below. cd /usr/src/xen-3.3.0 make linux-2.6-xen-config CONFIGMODE=menuconfig That may let you configure the VMXASSIST=n Regards, Franz ########################## Howto build Xen 3.3 from the sources on Debian Etch --------------------------------------------------- Base: Debian Etch 4.0R4a netinst for AMD64/Intel64 Hints on the WEB say that we need a newer mercurial (V 0.9.5 or newer). Newer than the standard V0.9.1 that is provided via Debian Etch Problem: from where do we get the newer mercurial? mkdir -p /usr/src/XEN_3.3.0 cd /usr/src/XEN_3.3.0 wget http://packages.debian.org/etch-backports/all/mercurial-common/download/mercurial-common_1.0.1-5.1~bpo40+1_all.deb wget \ http://www.backports.org/debian/pool/main/m/mercurial/mercurial_1.0.1-5.1~bpo40+1_amd64.deb dpkg -i ./mercurial-common_1.0.1-5.1~bpo40+1_all.deb dpkg -i ./mercurial_1.0.1-5.1~bpo40+1_amd64.deb ##################### # Download other build tools: # Attention: the apt-get will also deinstall packages # Use aptitude instead to see the conflicts etc # The problem is the ''hotplug'' # It conflicts with udev, kde and many others. # The xen Readme states that we need hotplug OR udev # --> we stay with udev and its dependent packages # apt-get install iproute bridge-utils hotplug python libz-dev python-dev gawk pciutils-dev # apt-get install graphviz texlive-latex-base texlive-latex-pdfetex transfig # apt-get install build-essential libssl-dev gettext python-dev libncurses5-dev xorg-dev bcc aptitude install iproute aptitude install bridge-utils # !!!! NO; do not install: aptitude install hotplug aptitude install python aptitude install libz-dev aptitude install python-dev aptitude install gawk aptitude install pciutils-dev aptitude install graphviz # this install texlive and de-installs our normal tetex! apt-get install tex-common texlive-base texlive-base-bin texlive-common \ texlive-doc-base texlive-doc-de texlive-lang-german \ texlive-latex-base texlive-pdfetex preview-latex-style \ texlive-latex-extra texlive-pictures texlive-fonts-recommended # aptitude install texlive-latex-pdfetex ??? apt-get install texlive-latex-recommended aptitude install texinfo aptitude install transfig aptitude install build-essential aptitude install libssl-dev aptitude install gettext aptitude install python-dev aptitude install libncurses5-dev aptitude install xorg-dev aptitude install bcc ##################### # Get the Xen sources # We download a tar ball of Xen 3.3 and clone the kernel tree ##################### mkdir -p /usr/src/XEN_3.3.0 cd /usr/src/XEN_3.3.0 # Get Xen 3.3.0 sources # Goto # http://www.xen.org/download/index.html # and download # http://bits.xensource.com/oss-xen/release/3.3.0/xen-3.3.0.tar.gz wget http://bits.xensource.com/oss-xen/release/3.3.0/xen-3.3.0.tar.gz # Get the xen kernel tree ## DEPRECATED: instead we clone ourselves (see below) # wget http://bits.xensource.com/oss-xen/release/3.3.0/linux-2.6.18-xen-3.3.0.tar.gz ### cleanup cd /usr/src rm -rf xen-3.3.0 rm -rf linux-2.6.18-xen.hg # unpack xen sources cd /usr/src tar xzf XEN_3.3.0/xen-3.3.0.tar.gz # Get the xen kernel tree via cloneing cd /usr/src hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg ################################################ # Now, let''s compile that Xen cd /usr/src/xen-3.3.0 make KERNELS=linux-2.6-xen world # Note: the option ''CONFIGMODE=menuconfig'' is meant to be used with other targets (see below) # make linux-2.6-xen-config CONFIGMODE=menuconfig # # It works at least if we run ''make KERNELS=linux-2.6-xen world'' once # See the addon at the end down below. # From the /usr/src/xen-3.3.0/README that contains all instruction for building/installing! # In /usr/src/xen-3.3.0 use # make help # to learn more about the targets. # # 5. To rebuild a kernel with a modified config: # # # make linux-2.6-xen-config CONFIGMODE=menuconfig (or xconfig) # # make linux-2.6-xen-build # # make linux-2.6-xen-install # Other systems may requires the use of ''mkinitramfs'' to create the # ram disk. # # depmod 2.6.18-xen # # mkinitramfs -o initrd-2.6.18-xen.img 2.6.18-xen # cleanup old xen-tools and kernels make uninstall make install depmod 2.6.18.8-xen # prepare the initrd config ## cp /etc/initramfs-tools/modules /etc/initramfs-tools/modules.orig cat > /etc/initramfs-tools/modules <<HERE # for Xen md_mod raid1 sd_mod HERE mkinitramfs -k -o /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen # edit the grub menu susi:/boot/grub# tail menu.lst ### END DEBIAN AUTOMAGIC KERNELS LIST title Xen 3.3.0 / kernel 2.6.18.8-xen root (hd0,0) kernel /xen-3.3.0.gz console=vga module /vmlinuz-2.6.18.8-xen root=/dev/mapper/RootVG-root ro console=tty0 module /initrd-2.6.18.8-xen.img savedefault OR as a refined test for HVM # Note: Adding the pciback.hide to the kernel options did not work as pciback is # only compiled as a module by default. # If we compile it as non-module (see below for instructions) it works # no pciback.hide title Xen 3.3.0 / kernel 2.6.18.8-xen no-backhide root (hd0,0) kernel /xen-3.3.0.gz console=vga noreboot max_loop=128 dom0_mem=1024M module /vmlinuz-2.6.18.8-xen root=/dev/mapper/RootVG-root ro console=tty0 module /initrd-2.6.18.8-xen.img savedefault # with pciback.hide and iommu for VT-d title Xen 3.3.0 / kernel 2.6.18.8-xen backhide the ATI Radeon root (hd0,0) #kernel /xen-3.3.0.gz console=vga noreboot max_loop=128 dom0_mem=1024M iommu=1 kernel /xen-3.3.0.gz console=vga noreboot max_loop=128 dom0_mem=1024M module /vmlinuz-2.6.18.8-xen root=/dev/mapper/RootVG-root ro console=tty0 pciback.hide=(01:00. 0)(01:00.1) module /initrd-2.6.18.8-xen.img savedefault ### link xen rc script update-rc.d xend defaults 20 21 update-rc.d xendomains defaults 21 20 ############################################ # Reboot your box and boot the Xen kernel ########## # Add on, from http://wiki.xensource.com/xenwiki/VTdHowTo # Compile PCI backend hide fixed into the kernel How to turn on VT-d in Xen 1 ) cd xen-unstable.hg 2 ) make install 3 ) make linux-2.6-xen-config CONFIGMODE=menuconfig 4 ) change XEN->"PCI-device backend driver" from "M" to "*". 5 ) make linux-2.6-xen-build 6 ) make linux-2.6-xen-install 7 ) depmod 2.6.18.8-xen 8 ) mkinitrd -v -f --with=ahci --with=aacraid --with=sd_mod --with=scsi_mod initrd-2.6.18-xen.img 2.6.1 8.8-xen 9 ) cp initrd-2.6.18-xen.img /boot 10) lspci - select the PCI BDF you want to assign to guest OS 11) "hide" pci device from dom0 as following sample grub entry: title Xen-Fedora Core (2.6.18-xen) root (hd0,0) kernel /boot/xen.gz com1=115200,8n1 console=com1 iommu=1 module /boot/vmlinuz-2.6.18.8-xen root=LABEL=/ ro xencons=ttyS console=tty0 console=ttyS0, pcib ack.hide=(01:00.0)(03:00.0) module /boot/initrd-2.6.18-xen.img 12) reboot system 13) add "pci" line in /etc/xen/hvm.conf for to assigned devices pci = [ ''01:00.0'', ''03:00.0'' ] 15) start hvm guest and use "lspci" to see the passthru device and "ifconfig" to see if IP address has been assigned to NIC devices. ## # Try that on our xen host cd /usr/src/xen-3.3.0 make linux-2.6-xen-config CONFIGMODE=menuconfig change XEN->"PCI-device backend driver" from "M" to "*". make linux-2.6-xen-build make linux-2.6-xen-install depmod 2.6.18.8-xen mkinitramfs -k -o /boot/initrd-2.6.18.8-xen.img 2.6.18.8-xen Boot .... and pciback.hide works as a kernel parameter _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello Nathan, Am Freitag, 24. Oktober 2008 00:28 schrieb Nathan Eisenberg:> Franz, > > Thanks! That document is awesome!You are welcome.> However, I got the dom0 booted on 3.3. When I go to create a DomU, the > same thing happens as before. It starts up for just a moment, and then > disappears from xm list.Hmm, my Xen experience only comprises about 5 days but let''s try: Your qemu-log says:> Done register platform. > I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0 >And you use the config> disk = [''phy:/dev/loop0,hda,w''] > boot="c"I for my part use the config: disk = [ ''file:/export/data1/XenGuestImages/WinXpProf_G1/WinXpProf_G1.disk,hda,w'', ''phy:/dev/cdrom,hdc:cdrom,r'' ] My qemu-log reads .. Register xen platform. Done register platform. medium change watch on `hdc'' (index: 1): /dev/cdrom gpe_sts_write: addr=0x1f68, val=0x0. gpe_sts_write: addr=0x1f69, val=0x0. ... I assume that you have problems with your disk image (or whatever) that you provide via loop back interface. [''phy:/dev/loop0,hda,w''] I installed into the file image /export/data1/XenGuestImages/WinXpProf_G1/WinXpProf_G1.disk and got no problem here. Is it possible that you use a file image instead? Why are you using some device that you provide via loop back to the HVM guest? Regards, Franz _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Franz, Actually, I get even the same results if there is no disk line in the configuration file at all. :( Very frustrating. Thank You, Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Franz Regensburger Sent: Friday, October 24, 2008 5:08 AM To: xen-users@lists.xensource.com Subject: Re: [Xen-users] Building from Source Hello Nathan, Am Freitag, 24. Oktober 2008 00:28 schrieb Nathan Eisenberg:> Franz, > > Thanks! That document is awesome!You are welcome.> However, I got the dom0 booted on 3.3. When I go to create a DomU, the > same thing happens as before. It starts up for just a moment, and then > disappears from xm list.Hmm, my Xen experience only comprises about 5 days but let''s try: Your qemu-log says:> Done register platform. > I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0 >And you use the config> disk = [''phy:/dev/loop0,hda,w''] > boot="c"I for my part use the config: disk = [ ''file:/export/data1/XenGuestImages/WinXpProf_G1/WinXpProf_G1.disk,hda,w'', ''phy:/dev/cdrom,hdc:cdrom,r'' ] My qemu-log reads .. Register xen platform. Done register platform. medium change watch on `hdc'' (index: 1): /dev/cdrom gpe_sts_write: addr=0x1f68, val=0x0. gpe_sts_write: addr=0x1f69, val=0x0. ... I assume that you have problems with your disk image (or whatever) that you provide via loop back interface. [''phy:/dev/loop0,hda,w''] I installed into the file image /export/data1/XenGuestImages/WinXpProf_G1/WinXpProf_G1.disk and got no problem here. Is it possible that you use a file image instead? Why are you using some device that you provide via loop back to the HVM guest? Regards, Franz _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Quoting Nathan Eisenberg <nathan@atlasnetworks.us>:> Franz, > > Actually, I get even the same results if there is no disk line in > the configuration file at all. :( Very frustrating. > > Thank You, > Nathan Eisenberg > Sr. Systems Administrator > Atlas Networks, LLC >Hello Nathan, Why are you trying to use one of the loop devices for your disk? I only ask in case there is a reason. I may be wrong but when you create a file based disk for Xen then use that in a domu when you create the domu it mounts that file on the loop device. I think what you want to do is create a file to use as the disk then reference that file in your domu config file. I usually use lv''s as disks but I think to create a file for use as a disk would be something like this: This would create a 4GB "disk"(file). dd if=/dev/zero of=/vms/vm_disk bs=1M count=1 seek=4095 You would then want to use mkfs.<filesystem> to put a file system on the file. e.g. mkfs.ext3 /opt/xendrives/vm_disk Then in your domu you would use that as the file: device instead of loop0. On a side note, if you have lv''s they are better than file based and easier to manage. Hope that helps, Jon _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jon, As I mentioned - the disk line seems to have no effect on whether or not the DomU boots. Even with no disk line, I get the same results. The loop device was just a temporary contrivance for testing, but is definitely not the cause of the issue. Thank You, Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jonr@destar.net Sent: Friday, October 24, 2008 10:05 AM To: xen-users@lists.xensource.com Subject: RE: [Xen-users] Building from Source Quoting Nathan Eisenberg <nathan@atlasnetworks.us>:> Franz, > > Actually, I get even the same results if there is no disk line in > the configuration file at all. :( Very frustrating. > > Thank You, > Nathan Eisenberg > Sr. Systems Administrator > Atlas Networks, LLC >Hello Nathan, Why are you trying to use one of the loop devices for your disk? I only ask in case there is a reason. I may be wrong but when you create a file based disk for Xen then use that in a domu when you create the domu it mounts that file on the loop device. I think what you want to do is create a file to use as the disk then reference that file in your domu config file. I usually use lv''s as disks but I think to create a file for use as a disk would be something like this: This would create a 4GB "disk"(file). dd if=/dev/zero of=/vms/vm_disk bs=1M count=1 seek=4095 You would then want to use mkfs.<filesystem> to put a file system on the file. e.g. mkfs.ext3 /opt/xendrives/vm_disk Then in your domu you would use that as the file: device instead of loop0. On a side note, if you have lv''s they are better than file based and easier to manage. Hope that helps, Jon _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Quoting Nathan Eisenberg <nathan@atlasnetworks.us>:> Jon, > > As I mentioned - the disk line seems to have no effect on whether or > not the DomU boots. Even with no disk line, I get the same > results. The loop device was just a temporary contrivance for > testing, but is definitely not the cause of the issue. >Nathan, Using your config file I can get the same results on a known working dom0. Whether I have the disk line in or not, when I boot the domu this is what I see: root@xenproof:/etc/xen# xm create nathan Using config file "./nathan". Started domain lb1 root@xenproof:/etc/xen# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 2367 2 r----- 2073.1 domutest 12 512 1 r----- 3662.0 Is this what you are seeing as well? What OS is on loop0? Did you already install an OS onto that device? I went back through the archives and couldn''t find the email that said you had already done that. I may have missed it though. Jon _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Jon, I guess I didn''t explain clearly... I cannot get a DomU to stay in a running state. It doesn''t matter if there is a disk attached or not, the DomU dies almost instantly. Thank You, Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jonr@destar.net Sent: Friday, October 24, 2008 12:13 PM To: xen-users@lists.xensource.com Subject: RE: [Xen-users] Building from Source Quoting Nathan Eisenberg <nathan@atlasnetworks.us>:> Jon, > > As I mentioned - the disk line seems to have no effect on whether or > not the DomU boots. Even with no disk line, I get the same > results. The loop device was just a temporary contrivance for > testing, but is definitely not the cause of the issue. >Nathan, Using your config file I can get the same results on a known working dom0. Whether I have the disk line in or not, when I boot the domu this is what I see: root@xenproof:/etc/xen# xm create nathan Using config file "./nathan". Started domain lb1 root@xenproof:/etc/xen# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 2367 2 r----- 2073.1 domutest 12 512 1 r----- 3662.0 Is this what you are seeing as well? What OS is on loop0? Did you already install an OS onto that device? I went back through the archives and couldn''t find the email that said you had already done that. I may have missed it though. Jon _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Oct 24, 2008 at 5:54 PM, Nathan Eisenberg <nathan@atlasnetworks.us> wrote:> Jon, > > I guess I didn''t explain clearly... > > I cannot get a DomU to stay in a running state. It doesn''t matter if there is a disk attached or not, the DomU dies almost instantly.Did you try booting the domU from a live/install CD? Cheers, Todd -- Todd Deshane http://todddeshane.net http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Are you using this config file for your domu? name = "lb1" builder = "hvm" memory = "512" device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" #disk = [''phy:/dev/loop0,hda,w''] boot="c" acpi="0" serial = "pty" vncpasswd = "test" I found this in one of your previous emails to the list. I used this to see if I could replicate your problem. Using the config file for domu that you supplied I get the exact same results on a working xen3.3 box. You are trying to use the loop device for a disk for a hvm machine. You are using ''boot="c"'' when there is nothing on the "disk". You need a line like this: disk=[''phy:/dev/rootvg/nathan,hda,w'',''file:/home/jonr/nevaeh-i386.iso,hdc:cdrom,r''] I am using your config file and booting just fine. Your problem is your "disk=" line in your config file. I am using LVM''s in this example but you could also use file based "disks". When I use the config file you supplied on the list I get the exact same errors in /var/log/xen/qemu-dm-lb1.log. You do not want to use /dev/loop0 as a disk. Jon Quoting Nathan Eisenberg <nathan@atlasnetworks.us>:> Jon, > > I guess I didn''t explain clearly... > > I cannot get a DomU to stay in a running state. It doesn''t matter > if there is a disk attached or not, the DomU dies almost instantly. > > Thank You, > Nathan Eisenberg > Sr. Systems Administrator > Atlas Networks, LLC > > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > jonr@destar.net > Sent: Friday, October 24, 2008 12:13 PM > To: xen-users@lists.xensource.com > Subject: RE: [Xen-users] Building from Source > > Quoting Nathan Eisenberg <nathan@atlasnetworks.us>: > >> Jon, >> >> As I mentioned - the disk line seems to have no effect on whether or >> not the DomU boots. Even with no disk line, I get the same >> results. The loop device was just a temporary contrivance for >> testing, but is definitely not the cause of the issue. >> > Nathan, > > Using your config file I can get the same results on a known working > dom0. Whether I have the disk line in or not, when I boot the domu > this is what I see: > > root@xenproof:/etc/xen# xm create nathan > Using config file "./nathan". > Started domain lb1 > > root@xenproof:/etc/xen# xm list > Name ID Mem VCPUs State > Time(s) > Domain-0 0 2367 2 > r----- 2073.1 > domutest 12 512 1 > r----- 3662.0 > > Is this what you are seeing as well? > > What OS is on loop0? Did you already install an OS onto that device? I > went back through the archives and couldn''t find the email that said > you had already done that. I may have missed it though. > > Jon > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Well, heck. Now I feel like a dummy. Thanks everyone, it seems I now have a build of XEN that can run BSD based guests. Who knows how long I''ve actually had this, now. All involved - if you''re ever in Seattle, I will make good on that beer offer. =) Thank you, Nathan Eisenberg Sr. Systems Administrator Atlas Networks, LLC. -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of jonr@destar.net Sent: Friday, October 24, 2008 3:27 PM To: xen-users@lists.xensource.com Subject: RE: [Xen-users] Building from Source Are you using this config file for your domu? name = "lb1" builder = "hvm" memory = "512" device_model = "/usr/lib/xen/bin/qemu-dm" kernel = "/usr/lib/xen/boot/hvmloader" #disk = [''phy:/dev/loop0,hda,w''] boot="c" acpi="0" serial = "pty" vncpasswd = "test" I found this in one of your previous emails to the list. I used this to see if I could replicate your problem. Using the config file for domu that you supplied I get the exact same results on a working xen3.3 box. You are trying to use the loop device for a disk for a hvm machine. You are using ''boot="c"'' when there is nothing on the "disk". You need a line like this: disk=[''phy:/dev/rootvg/nathan,hda,w'',''file:/home/jonr/nevaeh-i386.iso,hdc:cdrom,r''] I am using your config file and booting just fine. Your problem is your "disk=" line in your config file. I am using LVM''s in this example but you could also use file based "disks". When I use the config file you supplied on the list I get the exact same errors in /var/log/xen/qemu-dm-lb1.log. You do not want to use /dev/loop0 as a disk. Jon Quoting Nathan Eisenberg <nathan@atlasnetworks.us>:> Jon, > > I guess I didn''t explain clearly... > > I cannot get a DomU to stay in a running state. It doesn''t matter > if there is a disk attached or not, the DomU dies almost instantly. > > Thank You, > Nathan Eisenberg > Sr. Systems Administrator > Atlas Networks, LLC > > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > jonr@destar.net > Sent: Friday, October 24, 2008 12:13 PM > To: xen-users@lists.xensource.com > Subject: RE: [Xen-users] Building from Source > > Quoting Nathan Eisenberg <nathan@atlasnetworks.us>: > >> Jon, >> >> As I mentioned - the disk line seems to have no effect on whether or >> not the DomU boots. Even with no disk line, I get the same >> results. The loop device was just a temporary contrivance for >> testing, but is definitely not the cause of the issue. >> > Nathan, > > Using your config file I can get the same results on a known working > dom0. Whether I have the disk line in or not, when I boot the domu > this is what I see: > > root@xenproof:/etc/xen# xm create nathan > Using config file "./nathan". > Started domain lb1 > > root@xenproof:/etc/xen# xm list > Name ID Mem VCPUs State > Time(s) > Domain-0 0 2367 2 > r----- 2073.1 > domutest 12 512 1 > r----- 3662.0 > > Is this what you are seeing as well? > > What OS is on loop0? Did you already install an OS onto that device? I > went back through the archives and couldn''t find the email that said > you had already done that. I may have missed it though. > > Jon > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users