Creating virtual system with Xen .. creation failed : Failed to create partition

I downloaded asterisknow32.iso to the server and would like to create a guest called asterisk from the iso. AsteriskNow is based on CentOS and was downloaded from asterisk.org.

Following the directions from the Cloudmin website: 1. Created a New System Image through the Cloudmin GUI and it completed without error. 2. AsteriskNow appears as the only option in Create New System - Create empty system. When I enter the info in the GUI, the process runs but ends with an error about partitions not being created and I'm not sure how to resolve.

Copying 605.10 MB CD image to host system xxx.xxxxxx.xx .. .. already on host

Creating virtual system with Xen .. .. creation failed : Failed to create partition : Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xfd90d2bf. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. You must set cylinders. You can do this from the extra functions menu. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): You must set cylinders. You can do this from the extra functions menu. Command (m for help): Disk /xen/asterisk.img: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0xfd90d2bf Device Boot Start End Blocks Id System Command (m for help): 1: unknown command Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): Command (m for help): +: unknown command Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 25: Inappropriate ioctl for device. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.

Status: 
Closed (fixed)

Comments

When you added the CD image to Cloudmin on the New System Images page, did you select the type as a CD/DVD image?

Yes, CD or DVD ISO was the option selected.

Operation System - CentOS File on Cloudmin master - selected the asterisknow32.iso Copy to Cloudmin storage locations - Yes Unique ID for image - xen.asterisknow-171 Compress image file - No HVM virtualization required - No

cat xen-asterisknow-171.img

dest=master:/var/webmin/server-manager files=asterisknow32.iso nocompress=1 file=/var/webmin/server-manager/xen-asterisknow-171.img size=634492928 rawsize=634492928 manager=xen format=cd xen_hvm=0 desc=AsteriskNow 1.7.1 i386 type=centos id=xen-asterisknow-171

adding me to the ticket

whoops so about that Jamie -- I forgot to refresh the page :D

Try editing xen-asterisknow-171.img and changing xen_hvm to xen_hvm=1

cat /var/webmin/server-manager/xen-asterisknow-171.img dest=master:/var/webmin/server-manager files=asterisknow32.iso nocompress=1 file=/var/webmin/server-manager/xen-asterisknow-171.img size=634492928 rawsize=634492928 manager=xen format=cd xen_hvm=1 desc=AsteriskNow 1.7.1 i386 type=centos id=xen-asterisknow-171

Creating virtual system with Xen .. .. creation failed : Failed to create partition : Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x5ff5ebe4. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. You must set cylinders. You can do this from the extra functions menu. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): You must set cylinders. You can do this from the extra functions menu. Command (m for help): Disk /xen/asterisk.img: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders, total 0 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x5ff5ebe4 Device Boot Start End Blocks Id System Command (m for help): 1: unknown command Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): Command (m for help): +: unknown command Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition l list known partition types m print this menu n add a new partition o create a new empty DOS partition table p print the partition table q quit without saving changes s create a new empty Sun disklabel t change a partition's system id u change display/entry units v verify the partition table w write table to disk and exit x extra functionality (experts only) Command (m for help): The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 25: Inappropriate ioctl for device. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks.

This is way over my head and I figured out how to install windows as a xen guest in linux manually.

I don't even understand why fdisk is failing here, ext3 is what centos uses by default.

Even trying to create the guest I get errors that really don't make sense unless the step to create and install the partitions is messed up...

# cat asterisk.cfg
memory = 2048
maxmem = 4096
name = 'asterisk'
vif = [ 'ip=98.188.37.249,mac=00:16:3e:AA:BF:E0' ]
address = '98.188.37.249'
netmask = '255.255.255.0'
disk = ['file:/xen/asterisk.img,hda,w']
boot = 'dc'

[root@ns1 xen]
# file asterisk.img
asterisk.img: x86 boot sector

[root@ns1 xen]
# xm create asterisk.cfg
Using config file "./asterisk.cfg".
Error: Bootloader isn't executable

Ok, I see the cause of the original problem now - if the parted command isn't installed on the host system, Cloudmin will use fdisk instead. However, in some cases fdisk can falsely report an error when it has really succeeded.

The work-around is to install parted on the host system. This should be do-able with apt-get install parted

Installing parted did the trick. Thank you very much.

Great! The next Cloudmin release will fix the way fdisk is called to avoid the original issue..