Hi, Host: CentOS 5.5 Guest: Ubuntu maverick I am having a horrid time trying to create a guest on my xen machine. I have tried several method. The method that I have had the most success with is `xm create`. The problem I have is that once the I have run: xm create -c myconfig.cfg install=true install-mirror=http://mirror.bytemark.co.uk/ubuntu/ install-suite=maverick and go all the way throught the installation, the guest does not appear in `xm list`. It appears in the list during the installation but once the install is complete and I reboot, it never comes back. If I try to start it with `xm create myconfig.cfg` # # Hostname # name = ''testhost'' # # Networking # dhcp = ''dhcp'' vif = [ ''mac=00:16:3E:1E:65:85'' ] # # Behaviour # on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' # Debian Installer specific variables def check_bool(name, value): value = str(value).lower() if value in (''t'', ''tr'', ''tru'', ''true''): return True return False global var_check_with_default def var_check_with_default(default, var, val): if val: return val return default xm_vars.var(''install'', use=''Install Debian, default: false'', check=check_bool) xm_vars.var("install-method", use=''Installation method to use "cdrom" or "network" (default: network)'', check=lambda var, val: var_check_with_default(''network'', var, val)) # install-method == "network" xm_vars.var("install-mirror", use=''Debian mirror to install from (default: http://archive.ubuntu.com/ubuntu)'', check=lambda var, val: var_check_with_default(''http://archive.ubuntu.com/ubuntu'', var, val)) xm_vars.var("install-suite", use=''Debian suite to install (default: maverick)'', check=lambda var, val: var_check_with_default(''maverick'', var, val)) # install-method == "cdrom" xm_vars.var("install-media", use=''Installation media to use (default: None)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-cdrom-device", use=''Installation media to use (default: xvdd)'', check=lambda var, val: var_check_with_default(''xvdd'', var, val)) # Common options xm_vars.var("install-arch", use=''Debian mirror to install from (default: amd64)'', check=lambda var, val: var_check_with_default(''amd64'', var, val)) xm_vars.var("install-extra", use=''Extra command line options (default: None)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-installer", use=''Debian installer to use (default: network uses install-mirror; cdrom uses /install.ARCH)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-kernel", use=''Debian installer kernel to use (default: uses install-installer)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-ramdisk", use=''Debian installer ramdisk to use (default: uses install-installer)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.check() if not xm_vars.env.get(''install''): bootloader="pygrub" elif xm_vars.env[''install-method''] == "network": import os.path print "Install Mirror: %s" % xm_vars.env[''install-mirror''] print "Install Suite: %s" % xm_vars.env[''install-suite''] if xm_vars.env[''install-installer'']: installer = xm_vars.env[''install-installer''] else: installer xm_vars.env[''install-mirror'']+"/dists/"+xm_vars.env[''install-suite''] + \ "/main/installer-"+xm_vars.env[''install-arch'']+"/current/images" print "Installer: %s" % installer print print "WARNING: Installer kernel and ramdisk are not authenticated." print if xm_vars.env.get(''install-kernel''): kernelurl = xm_vars.env[''install-kernel''] else: kernelurl = installer + "/netboot/xen/vmlinuz" if xm_vars.env.get(''install-ramdisk''): ramdiskurl = xm_vars.env[''install-ramdisk''] else: ramdiskurl = installer + "/netboot/xen/initrd.gz" import urllib class MyUrlOpener(urllib.FancyURLopener): def http_error_default(self, req, fp, code, msg, hdrs): raise IOError("%s %s" % (code, msg)) urlopener = MyUrlOpener() try: print "Fetching %s" % kernelurl kernel, _ = urlopener.retrieve(kernelurl) print "Fetching %s" % ramdiskurl ramdisk, _ = urlopener.retrieve(ramdiskurl) except IOError, _: raise elif xm_vars.env[''install-method''] == "cdrom": arch_path = { ''i386'': "/install.386", ''amd64'': "/install.amd" } if xm_vars.env[''install-media'']: print "Install Media: %s" % xm_vars.env[''install-media''] else: raise OptionError("No installation media given.") if xm_vars.env[''install-installer'']: installer = xm_vars.env[''install-installer''] else: installer = arch_path[xm_vars.env[''install-arch'']] print "Installer: %s" % installer if xm_vars.env.get(''install-kernel''): kernelpath = xm_vars.env[''install-kernel''] else: kernelpath = installer + "/xen/vmlinuz" if xm_vars.env.get(''install-ramdisk''): ramdiskpath = xm_vars.env[''install-ramdisk''] else: ramdiskpath = installer + "/xen/initrd.gz" disk.insert(0, ''file:%s,%s:cdrom,r'' % (xm_vars.env[''install-media''], xm_vars.env[''install-cdrom-device''])) bootloader="/usr/bin/pygrub" bootargs="--kernel=%s --ramdisk=%s" % (kernelpath, ramdiskpath) print "From CD" else: print "WARNING: Unknown install-method: %s." % xm_vars.env[''install-method''] if xm_vars.env.get(''install''): # Figure out command line if xm_vars.env[''install-extra'']: extras=[xm_vars.env[''install-extra'']] else: extras=[] # Reboot will just restart the installer since this file is not # reparsed, so halt and restart that way. extras.append("debian-installer/exit/always_halt=true") extras.append("--") extras.append("quiet") console="hvc0" try: if len(vfb) >= 1: console="tty0" except NameError, e: pass extras.append("console="+ console) extra = str.join(" ", extras) print "command line is \"%s\"" % extra _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Are you able to create Ubuntu 10.10 HVM guest ? Boris. --- On Fri, 11/5/10, Dermot <paikkos@gmail.com> wrote: From: Dermot <paikkos@gmail.com> Subject: [Xen-users] Unable to create (and keep) guest To: xen-users@lists.xensource.com Date: Friday, November 5, 2010, 10:38 AM Hi, Host: CentOS 5.5 Guest: Ubuntu maverick I am having a horrid time trying to create a guest on my xen machine. I have tried several method. The method that I have had the most success with is `xm create`. The problem I have is that once the I have run: xm create -c myconfig.cfg install=true install-mirror=http://mirror.bytemark.co.uk/ubuntu/ install-suite=maverick and go all the way throught the installation, the guest does not appear in `xm list`. It appears in the list during the installation but once the install is complete and I reboot, it never comes back. If I try to start it with `xm create myconfig.cfg` # # Hostname # name = ''testhost'' # # Networking # dhcp = ''dhcp'' vif = [ ''mac=00:16:3E:1E:65:85'' ] # # Behaviour # on_poweroff = ''destroy'' on_reboot = ''restart'' on_crash = ''restart'' # Debian Installer specific variables def check_bool(name, value): value = str(value).lower() if value in (''t'', ''tr'', ''tru'', ''true''): return True return False global var_check_with_default def var_check_with_default(default, var, val): if val: return val return default xm_vars.var(''install'', use=''Install Debian, default: false'', check=check_bool) xm_vars.var("install-method", use=''Installation method to use "cdrom" or "network" (default: network)'', check=lambda var, val: var_check_with_default(''network'', var, val)) # install-method == "network" xm_vars.var("install-mirror", use=''Debian mirror to install from (default: http://archive.ubuntu.com/ubuntu)'', check=lambda var, val: var_check_with_default(''http://archive.ubuntu.com/ubuntu'', var, val)) xm_vars.var("install-suite", use=''Debian suite to install (default: maverick)'', check=lambda var, val: var_check_with_default(''maverick'', var, val)) # install-method == "cdrom" xm_vars.var("install-media", use=''Installation media to use (default: None)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-cdrom-device", use=''Installation media to use (default: xvdd)'', check=lambda var, val: var_check_with_default(''xvdd'', var, val)) # Common options xm_vars.var("install-arch", use=''Debian mirror to install from (default: amd64)'', check=lambda var, val: var_check_with_default(''amd64'', var, val)) xm_vars.var("install-extra", use=''Extra command line options (default: None)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-installer", use=''Debian installer to use (default: network uses install-mirror; cdrom uses /install.ARCH)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-kernel", use=''Debian installer kernel to use (default: uses install-installer)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.var("install-ramdisk", use=''Debian installer ramdisk to use (default: uses install-installer)'', check=lambda var, val: var_check_with_default(None, var, val)) xm_vars.check() if not xm_vars.env.get(''install''): bootloader="pygrub" elif xm_vars.env[''install-method''] == "network": import os.path print "Install Mirror: %s" % xm_vars.env[''install-mirror''] print "Install Suite: %s" % xm_vars.env[''install-suite''] if xm_vars.env[''install-installer'']: installer = xm_vars.env[''install-installer''] else: installer xm_vars.env[''install-mirror'']+"/dists/"+xm_vars.env[''install-suite''] + \ "/main/installer-"+xm_vars.env[''install-arch'']+"/current/images" print "Installer: %s" % installer print print "WARNING: Installer kernel and ramdisk are not authenticated." print if xm_vars.env.get(''install-kernel''): kernelurl = xm_vars.env[''install-kernel''] else: kernelurl = installer + "/netboot/xen/vmlinuz" if xm_vars.env.get(''install-ramdisk''): ramdiskurl = xm_vars.env[''install-ramdisk''] else: ramdiskurl = installer + "/netboot/xen/initrd.gz" import urllib class MyUrlOpener(urllib.FancyURLopener): def http_error_default(self, req, fp, code, msg, hdrs): raise IOError("%s %s" % (code, msg)) urlopener = MyUrlOpener() try: print "Fetching %s" % kernelurl kernel, _ = urlopener.retrieve(kernelurl) print "Fetching %s" % ramdiskurl ramdisk, _ = urlopener.retrieve(ramdiskurl) except IOError, _: raise elif xm_vars.env[''install-method''] == "cdrom": arch_path = { ''i386'': "/install.386", ''amd64'': "/install.amd" } if xm_vars.env[''install-media'']: print "Install Media: %s" % xm_vars.env[''install-media''] else: raise OptionError("No installation media given.") if xm_vars.env[''install-installer'']: installer = xm_vars.env[''install-installer''] else: installer = arch_path[xm_vars.env[''install-arch'']] print "Installer: %s" % installer if xm_vars.env.get(''install-kernel''): kernelpath = xm_vars.env[''install-kernel''] else: kernelpath = installer + "/xen/vmlinuz" if xm_vars.env.get(''install-ramdisk''): ramdiskpath = xm_vars.env[''install-ramdisk''] else: ramdiskpath = installer + "/xen/initrd.gz" disk.insert(0, ''file:%s,%s:cdrom,r'' % (xm_vars.env[''install-media''], xm_vars.env[''install-cdrom-device''])) bootloader="/usr/bin/pygrub" bootargs="--kernel=%s --ramdisk=%s" % (kernelpath, ramdiskpath) print "From CD" else: print "WARNING: Unknown install-method: %s." % xm_vars.env[''install-method''] if xm_vars.env.get(''install''): # Figure out command line if xm_vars.env[''install-extra'']: extras=[xm_vars.env[''install-extra'']] else: extras=[] # Reboot will just restart the installer since this file is not # reparsed, so halt and restart that way. extras.append("debian-installer/exit/always_halt=true") extras.append("--") extras.append("quiet") console="hvc0" try: if len(vfb) >= 1: console="tty0" except NameError, e: pass extras.append("console="+ console) extra = str.join(" ", extras) print "command line is \"%s\"" % extra _______________________________________________ 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 5 November 2010 16:17, Boris Derzhavets <bderzhavets@yahoo.com> wrote:> > Are you able to create Ubuntu 10.10 HVM guest ? > > Boris.I haven''t tried...yet but I need this guest to perform as best as it can so I want to use paravirtualisation if possible. I think the error from pygrub might be due to the fact that the guest OS has a single root partition (noswap) and the default is to format in ext4. From I have read pygrub doesn''t read ext4 partitions yet. I am stepping through the installation again and will modify the partition layout. Will report back. Dp. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Image device of HVM guest say just /dev/sda(X) may used for immediate load PV guest via pygrub. View XenWiki 4.0 Tutorial 1 http://bderzhavets.wordpress.com/2010/04/24/set-up-ubuntu-10-04-server-pv-domu-at-xen-4-0-dom0-pvops-2-6-32-10-kernel-dom0-on-top-of-ubuntu-10-04-server/ Boris. --- On Fri, 11/5/10, Dermot <paikkos@gmail.com> wrote: From: Dermot <paikkos@gmail.com> Subject: Re: [Xen-users] Unable to create (and keep) guest To: xen-users@lists.xensource.com Date: Friday, November 5, 2010, 12:27 PM On 5 November 2010 16:17, Boris Derzhavets <bderzhavets@yahoo.com> wrote:> > Are you able to create Ubuntu 10.10 HVM guest ? > > Boris.I haven''t tried...yet but I need this guest to perform as best as it can so I want to use paravirtualisation if possible. I think the error from pygrub might be due to the fact that the guest OS has a single root partition (noswap) and the default is to format in ext4. From I have read pygrub doesn''t read ext4 partitions yet. I am stepping through the installation again and will modify the partition layout. Will report back. Dp. _______________________________________________ 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