Error: Defining virtual machine (using vmbuilder)

Asked by Hassan Abbas

I have Ubuntu Server 12.10 installed on to a Lenovo ThinkServer Machine. I am trying to do virualization using KVM. I used the following command to define a virtual machine:

sudo vmbuilder kvm ubuntu --suite quantal --flavour virtual --arch amd64 -o --libvirt qemu:///system --ip 192.168.0.110 --hostname BasicVM --part vmbuilder.partition --user basicvm --name basicvm--pass basicvm --bridge br0 --tmpfs -

This apparently did not work and I got the following error:

The following extra packages will be installed:
  linux-image-3.5.0-21-generic
Suggested packages:
  fdutils linux-doc-3.5.0 linux-source-3.5.0 linux-tools
The following NEW packages will be installed:
  linux-image-3.5.0-21-generic linux-image-virtual
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.8 MB of archives.
After this operation, 31.5 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-3.5.0-21-generic amd64 3.5.0-21.32 [11.8 MB]
Get:2 http://archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-virtual amd64 3.5.0.21.27 [2622 B]
Fetched 11.8 MB in 6s (1722 kB/s)
Selecting previously unselected package linux-image-3.5.0-21-generic.
(Reading database ... 10116 files and directories currently installed.)
Unpacking linux-image-3.5.0-21-generic (from .../linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb) ...
Selecting previously unselected package linux-image-virtual.
Unpacking linux-image-virtual (from .../linux-image-virtual_3.5.0.21.27_amd64.deb) ...
, stderr: grep: /proc/cpuinfo: No such file or directory
This kernel does not support a non-PAE CPU.
dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any suggestions?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu kvm Edit question
Assignee:
No assignee Edit question
Solved by:
Hassan Abbas
Solved:
Last query:
Last reply:
Revision history for this message
Hassan Abbas (habbas99) said :
#1

Here is the entire thing (including command and result):

primaryuser@LenovoThinkServer:~$ sudo vmbuilder kvm ubuntu --suite quantal --flavour virtual --arch amd64 -o --libvirt qemu:///system --ip 192.168.0.110 --part vmbuilder.partition --user basicvm --name basicvm --pass basicvm --hostname BasicVM --bridge br0
2012-12-18 22:45:09,435 INFO : Calling hook: preflight_check
2012-12-18 22:45:09,437 INFO : Calling hook: set_defaults
2012-12-18 22:45:09,438 INFO : Calling hook: bootstrap
2012-12-18 22:50:39,505 INFO : Calling hook: configure_os
2012-12-18 22:50:59,328 INFO :
2012-12-18 22:50:59,328 INFO : Current default time zone: 'Etc/UTC'
2012-12-18 22:50:59,332 INFO : Local time is now: Tue Dec 18 22:50:59 UTC 2012.
2012-12-18 22:50:59,332 INFO : Universal Time is now: Tue Dec 18 22:50:59 UTC 2012.
2012-12-18 22:50:59,332 INFO :
2012-12-18 22:51:26,967 INFO : gpg: key 437D05B5: "Ubuntu Archive Automatic Signing Key <email address hidden>" not changed
2012-12-18 22:51:26,971 INFO : gpg: key FBB75451: "Ubuntu CD Image Automatic Signing Key <email address hidden>" not changed
2012-12-18 22:51:26,973 INFO : gpg: key C0B21F32: "Ubuntu Archive Automatic Signing Key (2012) <email address hidden>" not changed
2012-12-18 22:51:26,975 INFO : gpg: key EFE21092: "Ubuntu CD Image Automatic Signing Key (2012) <email address hidden>" not changed
2012-12-18 22:51:26,975 INFO : gpg: Total number processed: 4
2012-12-18 22:51:26,975 INFO : gpg: unchanged: 4
2012-12-18 22:51:50,743 INFO : Cleaning up
2012-12-18 22:51:50,745 INFO : Calling hook: preflight_check
2012-12-18 22:51:50,892 INFO : Calling hook: configure_networking
2012-12-18 22:51:50,913 INFO : Calling hook: configure_mounting
2012-12-18 22:51:50,919 INFO : Calling hook: mount_partitions
2012-12-18 22:51:50,920 INFO : Mounting target filesystems
2012-12-18 22:51:50,920 INFO : Creating disk image: "/tmp/tmpRuqy7D" of size: 12001MB
2012-12-18 22:51:50,949 INFO : Adding partition table to disk image: /tmp/tmpRuqy7D
2012-12-18 22:51:51,065 INFO : Adding type 4 partition to disk image: /tmp/tmpRuqy7D
2012-12-18 22:51:51,065 INFO : Partition at beginning of disk - reserving first cylinder
2012-12-18 22:51:51,114 INFO : Adding type 3 partition to disk image: /tmp/tmpRuqy7D
2012-12-18 22:51:51,119 INFO : [0] ../../libparted/filesys.c:148 (ped_file_system_type_get): File system alias linux-swap(new) is deprecated
2012-12-18 22:51:51,163 INFO : Creating loop devices corresponding to the created partitions
2012-12-18 22:51:51,172 INFO : Creating file systems
2012-12-18 22:51:51,194 INFO : mke2fs 1.42.5 (29-Jul-2012)
2012-12-18 22:51:54,776 INFO : mkswap: /dev/mapper/loop0p2: warning: don't erase bootbits sectors
2012-12-18 22:51:54,776 INFO : on whole disk. Use -f to force.
2012-12-18 22:51:54,838 INFO : Creating disk image: "/tmp/tmpjFO2ce" of size: 20001MB
2012-12-18 22:51:54,850 INFO : Adding partition table to disk image: /tmp/tmpjFO2ce
2012-12-18 22:51:54,929 INFO : Adding type 4 partition to disk image: /tmp/tmpjFO2ce
2012-12-18 22:51:54,929 INFO : Partition at beginning of disk - reserving first cylinder
2012-12-18 22:51:54,985 INFO : Creating loop devices corresponding to the created partitions
2012-12-18 22:51:54,993 INFO : Creating file systems
2012-12-18 22:51:54,996 INFO : mke2fs 1.42.5 (29-Jul-2012)
2012-12-18 22:51:54,999 INFO : warning: 128 blocks unused.
2012-12-18 22:51:54,999 INFO :
2012-12-18 22:52:02,106 INFO : Calling hook: install_bootloader
2012-12-18 22:52:34,209 INFO : Removing update-grub hooks from /etc/kernel-img.conf in favour of
2012-12-18 22:52:34,209 INFO : /etc/kernel/ hooks.
2012-12-18 22:52:34,319 INFO : Searching for GRUB installation directory ... found: /boot/grub
2012-12-18 22:52:34,398 INFO : Searching for default file ... Generating /boot/grub/default file and setting the default boot entry to 0
2012-12-18 22:52:34,399 INFO : Searching for GRUB installation directory ... found: /boot/grub
2012-12-18 22:52:34,406 INFO : Testing for an existing GRUB menu.lst file ...
2012-12-18 22:52:34,406 INFO :
2012-12-18 22:52:34,407 INFO : Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) /usr/sbin/update-grub: line 1094: read: read error: 0: Bad file descriptor
2012-12-18 22:52:37,678 INFO : Searching for GRUB installation directory ... found: /boot/grub
2012-12-18 22:52:37,755 INFO : Searching for default file ... found: /boot/grub/default
2012-12-18 22:52:37,760 INFO : Testing for an existing GRUB menu.lst file ...
2012-12-18 22:52:37,760 INFO :
2012-12-18 22:52:37,760 INFO : Could not find /boot/grub/menu.lst file.
2012-12-18 22:52:37,760 INFO : Generating /boot/grub/menu.lst
2012-12-18 22:52:37,846 INFO : Searching for splash image ... none found, skipping ...
2012-12-18 22:52:38,034 INFO : grep: /boot/config*: No such file or directory
2012-12-18 22:52:38,139 INFO : Updating /boot/grub/menu.lst ... done
2012-12-18 22:52:38,139 INFO :
2012-12-18 22:52:38,542 INFO : Searching for GRUB installation directory ... found: /boot/grub
2012-12-18 22:52:38,619 INFO : Searching for default file ... found: /boot/grub/default
2012-12-18 22:52:38,625 INFO : Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
2012-12-18 22:52:38,770 INFO : Searching for splash image ... none found, skipping ...
2012-12-18 22:52:38,803 INFO : grep: /boot/config*: No such file or directory
2012-12-18 22:52:38,911 INFO : Updating /boot/grub/menu.lst ... done
2012-12-18 22:52:38,911 INFO :
2012-12-18 22:52:39,056 INFO : Searching for GRUB installation directory ... found: /boot/grub
2012-12-18 22:52:39,071 INFO : Calling hook: install_kernel
2012-12-18 22:52:50,394 INFO : grep: /proc/cpuinfo: No such file or directory
2012-12-18 22:52:50,395 INFO : This kernel does not support a non-PAE CPU.
2012-12-18 22:52:50,401 INFO : dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb (--unpack):
2012-12-18 22:52:50,401 INFO : subprocess new pre-installation script returned error exit status 1
2012-12-18 22:52:50,415 INFO : Examining /etc/kernel/postrm.d .
2012-12-18 22:52:50,416 INFO : run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
2012-12-18 22:52:50,418 INFO : run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
2012-12-18 22:52:51,778 INFO : Errors were encountered while processing:
2012-12-18 22:52:51,778 INFO : /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb
2012-12-18 22:52:51,781 INFO : E: Sub-process /usr/bin/dpkg returned an error code (1)
2012-12-18 22:52:51,782 INFO : Cleaning up
2012-12-18 22:52:59,037 ERROR : Process (['chroot', '/tmp/tmpVimx9T', 'apt-get', '--force-yes', '-y', 'install', 'linux-image-virtual']) returned 100. stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  linux-image-3.5.0-21-generic
Suggested packages:
  fdutils linux-doc-3.5.0 linux-source-3.5.0 linux-tools
The following NEW packages will be installed:
  linux-image-3.5.0-21-generic linux-image-virtual
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.8 MB of archives.
After this operation, 31.5 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-3.5.0-21-generic amd64 3.5.0-21.32 [11.8 MB]
Get:2 http://archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-virtual amd64 3.5.0.21.27 [2622 B]
Fetched 11.8 MB in 9s (1201 kB/s)
Selecting previously unselected package linux-image-3.5.0-21-generic.
(Reading database ... 10116 files and directories currently installed.)
Unpacking linux-image-3.5.0-21-generic (from .../linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb) ...
Selecting previously unselected package linux-image-virtual.
Unpacking linux-image-virtual (from .../linux-image-virtual_3.5.0.21.27_amd64.deb) ...
, stderr: grep: /proc/cpuinfo: No such file or directory
This kernel does not support a non-PAE CPU.
dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Traceback (most recent call last):
  File "/usr/bin/vmbuilder", line 24, in <module>
    cli.main()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/contrib/cli.py", line 223, in main
    hypervisor.install_os()
  File "/usr/lib/python2.7/dist-packages/VMBuilder/hypervisor.py", line 70, in install_os
    self.call_hooks('install_kernel', self.chroot_dir)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/distro.py", line 67, in call_hooks
    call_hooks(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 158, in call_hooks
    getattr(plugin, func, log_no_such_method)(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/distro.py", line 189, in install_kernel
    self.suite.install_kernel(destdir)
  File "/usr/lib/python2.7/dist-packages/VMBuilder/plugins/ubuntu/dapper.py", line 303, in install_kernel
    run_cmd('chroot', destdir, 'apt-get', '--force-yes', '-y', 'install', self.kernel_name(), env={ 'DEBIAN_FRONTEND' : 'noninteractive' })
  File "/usr/lib/python2.7/dist-packages/VMBuilder/util.py", line 120, in run_cmd
    raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.exception.VMBuilderException: Process (['chroot', '/tmp/tmpVimx9T', 'apt-get', '--force-yes', '-y', 'install', 'linux-image-virtual']) returned 100. stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  linux-image-3.5.0-21-generic
Suggested packages:
  fdutils linux-doc-3.5.0 linux-source-3.5.0 linux-tools
The following NEW packages will be installed:
  linux-image-3.5.0-21-generic linux-image-virtual
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.8 MB of archives.
After this operation, 31.5 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-3.5.0-21-generic amd64 3.5.0-21.32 [11.8 MB]
Get:2 http://archive.ubuntu.com/ubuntu/ quantal-updates/main linux-image-virtual amd64 3.5.0.21.27 [2622 B]
Fetched 11.8 MB in 9s (1201 kB/s)
Selecting previously unselected package linux-image-3.5.0-21-generic.
(Reading database ... 10116 files and directories currently installed.)
Unpacking linux-image-3.5.0-21-generic (from .../linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb) ...
Selecting previously unselected package linux-image-virtual.
Unpacking linux-image-virtual (from .../linux-image-virtual_3.5.0.21.27_amd64.deb) ...
, stderr: grep: /proc/cpuinfo: No such file or directory
This kernel does not support a non-PAE CPU.
dpkg: error processing /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.5.0-21-generic /boot/vmlinuz-3.5.0-21-generic
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-3.5.0-21-generic_3.5.0-21.32_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Hassan Abbas (habbas99) said :
#2