build-debian-cloud icon indicating copy to clipboard operation
build-debian-cloud copied to clipboard

VirtualBox failing

Open osallou opened this issue 12 years ago • 10 comments

Hi, I tried to create an image with the raw backing volume and it creates an error on parted:

Partitioning the volume Command '/sbin/parted --script --align none /dev/loop2 -- mkpart primary 1MiB 33MiB' returned non-zero exit status 1 Traceback (most recent call last): File "/home/osallou/build-debian-cloud/base/main.py", line 40, in run tasklist.run(info=bootstrap_info, dry_run=args.dry_run) File "/home/osallou/build-debian-cloud/base/tasklist.py", line 30, in run task.run(info) File "/home/osallou/build-debian-cloud/common/tasks/partitioning.py", line 12, in run info.volume.partition_map.create(info.volume) File "/home/osallou/build-debian-cloud/base/fs/partitionmaps/abstract.py", line 28, in create self.fsm.create(volume=volume) File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 131, in fn if self._before_event(e) is False: File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 151, in _before_event return getattr(self, fnname)(e) File "/home/osallou/build-debian-cloud/base/fs/partitionmaps/mbr.py", line 31, in _before_create partition.create(volume) File "/home/osallou/build-debian-cloud/base/fs/partitions/base.py", line 22, in create self.fsm.create(volume=volume) File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 131, in fn if self._before_event(e) is False: File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 151, in _before_event return getattr(self, fnname)(e) File "/home/osallou/build-debian-cloud/base/fs/partitions/mbr.py", line 19, in _before_create '--', parted_command]) File "/home/osallou/build-debian-cloud/common/tools.py", line 7, in log_check_call raise CalledProcessError(status, ' '.join(command), '\n'.join(stderr)) CalledProcessError: Command '/sbin/parted --script --align none /dev/loop2 -- mkpart primary 1MiB 33MiB' returned non-zero exit status 1 Rolling back

My server is using sid.

osallou avatar Dec 05 '13 12:12 osallou

Could you upload the corresponding logfile or try again with --debug? I don't see any output by parted.

It's not tested on sid yet, btw. Only wheezy.

andsens avatar Dec 05 '13 12:12 andsens

here is log with --debug

Loaded provider virtualbox' Loaded pluginuser_packages' Tasklist: <class 'common.tasks.workspace.CreateWorkspace'> <class 'common.tasks.packages.ImagePackages'> <class 'plugins.user_packages.user_packages.AddUserPackages'> <class 'providers.virtualbox.tasks.packages.ImagePackages'> <class 'common.tasks.packages.HostPackages'> <class 'common.tasks.host.CheckPackages'> <class 'common.tasks.loopback.Create'> <class 'common.tasks.volume.Attach'> <class 'common.tasks.partitioning.PartitionVolume'> <class 'common.tasks.partitioning.MapPartitions'> <class 'common.tasks.filesystem.Format'> <class 'common.tasks.filesystem.TuneVolumeFS'> <class 'common.tasks.filesystem.CreateMountDir'> <class 'common.tasks.filesystem.MountRoot'> <class 'common.tasks.filesystem.CreateBootMountDir'> <class 'common.tasks.filesystem.MountBoot'> <class 'common.tasks.bootstrap.Bootstrap'> <class 'common.tasks.filesystem.MountSpecials'> <class 'common.tasks.network.RemoveHostname'> <class 'plugins.user_packages.user_packages.AddLocalUserPackages'> <class 'common.tasks.initd.ResolveInitScripts'> <class 'common.tasks.initd.InstallInitScripts'> <class 'common.tasks.locale.SetTimezone'> <class 'common.tasks.network.ConfigureNetworkIF'> <class 'common.tasks.apt.DisableDaemonAutostart'> <class 'common.tasks.filesystem.FStab'> <class 'common.tasks.boot.BlackListModules'> <class 'common.tasks.boot.DisableGetTTYs'> <class 'common.tasks.locale.GenerateLocale'> <class 'common.tasks.apt.AptSources'> <class 'common.tasks.apt.AptUpgrade'> <class 'providers.virtualbox.tasks.boot.ConfigureGrub'> <class 'common.tasks.network.RemoveDNSInfo'> <class 'common.tasks.security.EnableShadowConfig'> <class 'common.tasks.apt.AptClean'> <class 'common.tasks.cleanup.ClearMOTD'> <class 'common.tasks.apt.PurgeUnusedPackages'> <class 'common.tasks.apt.EnableDaemonAutostart'> <class 'common.tasks.cleanup.CleanTMP'> <class 'common.tasks.filesystem.UnmountBoot'> <class 'common.tasks.filesystem.UnmountSpecials'> <class 'common.tasks.filesystem.UnmountRoot'> <class 'common.tasks.partitioning.UnmapPartitions'> <class 'common.tasks.volume.Detach'> <class 'common.tasks.filesystem.DeleteMountDir'> <class 'common.tasks.loopback.MoveImage'> <class 'common.tasks.workspace.DeleteWorkspace'> Creating workspace Determining required image packages Adding user defined packages to the image packages Determining required image packages Determining required host packages Checking installed host packages Executing: /usr/bin/dpkg-query -s qemu-utils Package: qemu-utils Status: install ok installed Priority: optional Section: otherosfs Installed-Size: 2439 Maintainer: Debian QEMU Team [email protected] Architecture: amd64 Multi-Arch: foreign Source: qemu Version: 1.7.0+dfsg-2 Depends: libaio1 (>= 0.3.93), libc6 (>= 2.14), libcurl3-gnutls (>= 7.16.2), libglib2.0-0 (>= 2.24.0), libiscsi1 (>= 1.4), libssh2-1 (>= 1.2.8), libuuid1 (>= 2.16), zlib1g (>= 1:1.1.4) Recommends: sharutils Suggests: debootstrap Description: QEMU utilities QEMU is a fast processor emulator: currently the package supports ARM, CRIS, i386, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, SH4, SPARC and x86-64 emulation. By using dynamic translation it achieves reasonable speed while being easy to port on new host CPUs. . This package provides QEMU related utilities:

  • qemu-img: QEMU disk image utility
  • qemu-io: QEMU disk exerciser
  • qemu-nbd: QEMU disk network block device server Homepage: http://www.qemu.org/ Executing: /usr/bin/dpkg-query -s parted Package: parted Status: install ok installed Priority: optional Section: admin Installed-Size: 264 Maintainer: Parted Maintainer Team [email protected] Architecture: amd64 Version: 2.3-16 Replaces: fsresize, parted1.6 Depends: libc6 (>= 2.11), libparted0debian1 (>= 2.2-1), libreadline6 (>= 6.0), libtinfo5 Suggests: parted-doc Conflicts: fsresize, parted1.6 Description: disk partition manipulator GNU Parted is a program that allows you to create, destroy, resize, move, and copy disk partitions. This is useful for creating space for new operating systems, reorganizing disk usage, and copying data to new hard disks. . This package contains the binary and manual page. Further documentation is available in parted-doc. . Parted currently supports DOS, Mac, Sun, BSD, GPT, MIPS, and PC98 partitioning formats, as well as a "loop" (raw disk) type which allows use on RAID/LVM. It can detect and remove ASFS/AFFS/APFS, Btrfs, ext2/3/4, FAT16/32, HFS, JFS, linux-swap, UFS, XFS, and ZFS file systems. Parted also has the ability to create and modify file systems of some of these types, but using it to perform file system operations is now deprecated. . The nature of this software means that any bugs could cause massive data loss. While there are no such bugs known at the moment, they could exist, so please back up all important files before running it, and do so at your own risk. Homepage: http://www.gnu.org/software/parted Executing: /usr/bin/dpkg-query -s debootstrap Package: debootstrap Status: install ok installed Priority: extra Section: admin Installed-Size: 227 Maintainer: Debian Install System Team [email protected] Architecture: all Version: 1.0.55 Depends: wget Recommends: gnupg, debian-archive-keyring Description: Bootstrap a basic Debian system debootstrap is used to create a Debian base system from scratch, without requiring the availability of dpkg or apt. It does this by downloading .deb files from a mirror site, and carefully unpacking them into a directory which can eventually be chrooted into. Executing: /usr/bin/dpkg-query -s kpartx Package: kpartx Status: install ok installed Priority: extra Section: admin Installed-Size: 102 Maintainer: Debian LVM Team [email protected] Architecture: amd64 Source: multipath-tools Version: 0.4.9+git0.9c3c5172-1 Replaces: multipath-tools (<< 0.4.7-3) Depends: libc6 (>= 2.7), libdevmapper1.02.1 (>= 2:1.02.36), udev (>> 0.086), dmsetup (>= 2:1.02.24) Description: create device mappings for partitions Kpartx can be used to set up device mappings for the partitions of any partitioned block device. It is part of the Linux multipath-tools. Homepage: http://christophe.varoqui.free.fr/ Creating a loopback volume Executing: /usr/bin/qemu-img create -f raw /target/e25b5b6f/volume.raw 3161M Formatting '/target/e25b5b6f/volume.raw', fmt=raw size=3314548736 Attaching the volume Executing: /sbin/losetup --show --find /target/e25b5b6f/volume.raw /dev/loop2 Partitioning the volume Executing: /sbin/parted --script --align none /dev/loop2 -- mklabel msdos Executing: /sbin/parted --script --align none /dev/loop2 -- mkpart primary 1MiB 33MiB Error: Error informing the kernel about modifications to partition /dev/loop2p1 -- Invalid argument. This means Linux won't know about any changes you made to /dev/loop2p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. Error: Failed to add partition 1 (Invalid argument) Command '/sbin/parted --script --align none /dev/loop2 -- mkpart primary 1MiB 33MiB' returned non-zero exit status 1 Traceback (most recent call last): File "/home/osallou/build-debian-cloud/base/main.py", line 40, in run tasklist.run(info=bootstrap_info, dry_run=args.dry_run) File "/home/osallou/build-debian-cloud/base/tasklist.py", line 30, in run task.run(info) File "/home/osallou/build-debian-cloud/common/tasks/partitioning.py", line 12, in run info.volume.partition_map.create(info.volume) File "/home/osallou/build-debian-cloud/base/fs/partitionmaps/abstract.py", line 28, in create self.fsm.create(volume=volume) File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 131, in fn if self._before_event(e) is False: File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 151, in _before_event return getattr(self, fnname)(e) File "/home/osallou/build-debian-cloud/base/fs/partitionmaps/mbr.py", line 31, in _before_create partition.create(volume) File "/home/osallou/build-debian-cloud/base/fs/partitions/base.py", line 22, in create self.fsm.create(volume=volume) File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 131, in fn if self._before_event(e) is False: File "/usr/local/lib/python2.7/dist-packages/fysom/init.py", line 151, in _before_event return getattr(self, fnname)(e) File "/home/osallou/build-debian-cloud/base/fs/partitions/mbr.py", line 19, in _before_create '--', parted_command]) File "/home/osallou/build-debian-cloud/common/tools.py", line 7, in log_check_call raise CalledProcessError(status, ' '.join(command), '\n'.join(stderr)) CalledProcessError: Command '/sbin/parted --script --align none /dev/loop2 -- mkpart primary 1MiB 33MiB' returned non-zero exit status 1 Rolling back

osallou avatar Dec 05 '13 12:12 osallou

Argg, previous insertion lost formating, sending file as attachement

2013/12/5 Anders Ingemann [email protected]

Could you upload the corresponding logfile or try again with --debug? I don't see any output by parted.

It's not tested on sid yet, btw. Only wheezy.

— Reply to this email directly or view it on GitHubhttps://github.com/andsens/build-debian-cloud/issues/115#issuecomment-29893799 .

gpg key id: 4096R/326D8438 (keyring.debian.org)

Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438

osallou avatar Dec 05 '13 12:12 osallou

Attachment not working, here is a gist link to log:

https://gist.github.com/osallou/7804506

osallou avatar Dec 05 '13 12:12 osallou

I have tested on wheezy in a virtualbox (to generate a virtualbox :-) ), and it works. So there may be an issue with upcoming packages....

osallou avatar Dec 05 '13 13:12 osallou

Grub install fails however on Wheezy with error:

Executing: /usr/sbin/chroot /target/af963f8b/root /usr/sbin/grub-install /dev/dm-0

/usr/sbin/grub-setup: warn: Your embedding area is unusually small. core.img won't fit in it..

/usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.

Debug log at: https://gist.github.com/osallou/7805556

My manifest: "volume": { "backing": "raw", "partitions": { "type": "mbr", "boot": { "size": 32, "filesystem": "ext2" }, "root": { "size": 1000, "filesystem": "ext4" }, "swap": {"size": 128} } },

I copied the VirtualBox example, just replacing vdi by raw. This may be a config issue with mbr boot partition but I see no documentation on this (and is set as this in virtualbox manifest)

osallou avatar Dec 05 '13 14:12 osallou

So this is the actual error:

Executing: /sbin/parted --script --align none /dev/loop2 -- mkpart primary 1MiB 33MiB Error: Error informing the kernel about modifications to partition /dev/loop2p1 -- Invalid argument. This means Linux won't know about any changes you made to /dev/loop2p1 until you reboot -- so you shouldn't mount it or use it in any way before rebooting. Error: Failed to add partition 1 (Invalid argument)

You should create another issue for the grub problem.

andsens avatar Dec 05 '13 17:12 andsens

For info, I tried a reboot of the server, just in case..., but this is the same.

osallou avatar Dec 06 '13 08:12 osallou

Are you still seeing this error?

andsens avatar Jan 12 '14 12:01 andsens

did'nt test it with latest. I will test next week and let you know

osallou avatar Jan 12 '14 13:01 osallou