Problem with backporting libguestfs 1.16.5 to squeeze
by Nikita A Menkovich
Hello
I am trying to backport package from debian sid to squeeze.
I backport some needed packages(some dependencies to qemu-kvm, libvirt, etc)
Before building I disable gobject in debian/{control,rules}
--- debian/rules 2012-02-13 22:51:18.000000000 +0400
+++ ../libguestfs-1.16.5_new/debian/rules 2012-02-28 23:53:50.307471412 +0400
@@ -11,7 +11,8 @@
--disable-appliance \
--with-readline \
--disable-haskell \
- --disable-php
+ --disable-php \
+ --disable-gobject
BARE_CONFIG_FLAGS = \
$(DEFAULT_CONFIG_FLAGS) \
@@ -136,4 +138,4 @@
%:
dh $@ \
--without=python-support \
- --with=autotools-dev,ocaml,python2,python3,bash-completion,ruby,gir
+ --with=autotools-dev,ocaml,python2,python3,bash-completion,ruby
When I try to build libguestfs I receive an error(full log attached):
cat: ../podfiles: No such file or directory
make[6]: Entering directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default/po-docs/ja'
make[7]: Entering directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default'
make[7]: Leaving directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default'
/bin/mkdir -p /home/lib/projects/libguestfs-1.16.5/debian/tmp/usr/share/man/ja/man1
/usr/bin/install -c -m 0644 guestfish.1
/home/lib/projects/libguestfs-1.16.5/debian/tmp/usr/share/man/ja/man1
/usr/bin/install: cannot stat `guestfish.1': No such file or directory
make[6]: *** [install-data-hook] Error 1
make[6]: Leaving directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default/po-docs/ja'
make[5]: *** [install-data-am] Error 2
make[5]: Leaving directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default/po-docs/ja'
make[4]: *** [install-am] Error 2
make[4]: Leaving directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default/po-docs/ja'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default/po-docs'
make[2]: *** [install-recursive] Ошибка 1
make[2]: Leaving directory
`/home/lib/projects/libguestfs-1.16.5/debian/build-default'
dh_auto_install: make -j1 install
DESTDIR=/home/lib/projects/libguestfs-1.16.5/debian/tmp returned exit
code 2
make[1]: *** [override_dh_auto_install] Ошибка 29
--
Nikita A Menkovich
http://libc6.org/
JID: menkovich(a)gmail.com
12 years, 4 months
Test fails in arch linux
by Nikos Skalkotos
Hello all,
I 've compiled libguestfs 1.16.5 on arch linux and the tests fail. This is
the output I get when I run libguestfs-test-tool:
LIBGUESTFS_DEBUG=1
TMPDIR=(not set)
libguestfs: new guestfs handle 0xcf4310
library version: 1.16.5
guestfs_get_append: (null)
guestfs_get_attach_method: appliance
guestfs_get_autosync: 1
guestfs_get_direct: 0
guestfs_get_memsize: 500
guestfs_get_network: 0
guestfs_get_path: /usr/lib/guestfs
guestfs_get_pgroup: 0
guestfs_get_qemu: /usr/bin/qemu-kvm
guestfs_get_recovery_proc: 1
guestfs_get_selinux: 0
guestfs_get_smp: 1
guestfs_get_trace: 0
guestfs_get_verbose: 1
host_cpu: x86_64
Launching appliance, timeout set to 600 seconds.
libguestfs: [00000ms] febootstrap-supermin-helper --verbose -f checksum
'/usr/lib/guestfs/supermin.d' x86_64
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64,
kernel = (null), initrd = (null), appliance = (null)
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
checking modpath /lib/modules/3.2.6-2-ARCH is a directory
picked vmlinuz-linux because modpath /lib/modules/3.2.6-2-ARCH exists
supermin helper [00000ms] finished creating kernel
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/base.img
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [00000ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
supermin helper [00062ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [00062ms] adding kernel modules
supermin helper [00229ms] finished creating appliance
libguestfs: [00235ms] begin building supermin appliance
libguestfs: [00235ms] run febootstrap-supermin-helper
libguestfs: [00235ms] febootstrap-supermin-helper --verbose -f ext2
/usr/lib/guestfs/supermin.d x86_64 /var/tmp/guestfs.iFiYfq/kernel
/var/tmp/guestfs.iFiYfq/initrd /var/tmp/guestfs.iFiYfq/root
supermin helper [00000ms] whitelist = (not specified), host_cpu = x86_64,
kernel = /var/tmp/guestfs.iFiYfq/kernel, initrd =
/var/tmp/guestfs.iFiYfq/initrd, appliance = /var/tmp/guestfs.iFiYfq/root
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
checking modpath /lib/modules/3.2.6-2-ARCH is a directory
picked vmlinuz-linux because modpath /lib/modules/3.2.6-2-ARCH exists
supermin helper [00000ms] finished creating kernel
supermin helper [00740ms] finished mke2fs
supermin helper [00740ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [00740ms] visiting /usr/lib/guestfs/supermin.d/base.img
supermin helper [00891ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [00893ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
supermin helper [26662ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [26665ms] adding kernel modules
supermin helper [37998ms] closing ext2 filesystem
supermin helper [37998ms] finished creating appliance
libguestfs: [38235ms] finished building supermin appliance
libguestfs: [38237ms] begin testing qemu features
libguestfs: [38343ms] finished testing qemu features
libguestfs: accept_from_daemon: 0xcf4310 g->state = 1
[38344ms] /usr/bin/qemu-kvm \
-global virtio-blk-pci.scsi=off \
-drive file=/tmp/libguestfs-test-tool-sda-RpHepM,format=raw,if=virtio \
-nodefconfig \
-machine accel=kvm:tcg \
-nodefaults \
-nographic \
-m 500 \
-no-reboot \
-no-hpet \
-device virtio-serial \
-serial stdio \
-chardev socket,path=/tmp/libguestfs5oN1U5/guestfsd.sock,id=channel0 \
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-kernel /var/tmp/.guestfs-0/kernel.11353 \
-initrd /var/tmp/.guestfs-0/initrd.11353 \
-append 'panic=1 console=ttyS0 udevtimeout=300 no_timer_check acpi=off
printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1 TERM=xterm
' \
-drive
file=/var/tmp/.guestfs-0/root.11353,snapshot=on,if=virtio,cache=unsafefebootstrap:
mounting /proc
febootstrap: uptime: 0.31 0.13
febootstrap: ext2 mini initrd starting up: 3.13 zlib
febootstrap: mounting /sys
febootstrap: internal insmod libcrc32c.ko.gz
insmod: init_module: libcrc32c.ko.gz: Unknown symbol in module
febootstrap: internal insmod crc-ccitt.ko.gz
febootstrap: internal insmod crc7.ko.gz
febootstrap: internal insmod crc16.ko.gz
febootstrap: internal insmod crc8.ko.gz
febootstrap: internal insmod crc-itu-t.ko.gz
febootstrap: internal insmod crc32c.ko.gz
febootstrap: internal insmod crc32c-intel.ko.gz
insmod: init_module: crc32c-intel.ko.gz: No such device
febootstrap: internal insmod crc-t10dif.ko.gz
febootstrap: internal insmod mbcache.ko.gz
febootstrap: internal insmod scsi_mod.ko.gz
febootstrap: internal insmod cdrom.ko.gz
febootstrap: internal insmod sr_mod.ko.gz
febootstrap: internal insmod libata.ko.gz
febootstrap: internal insmod ata_piix.ko.gz
febootstrap: internal insmod scsi_transport_spi.ko.gz
febootstrap: internal insmod sym53c8xx.ko.gz
febootstrap: internal insmod sd_mod.ko.gz
febootstrap: internal insmod rfkill.ko.gz
febootstrap: internal insmod sparse-keymap.ko.gz
febootstrap: internal insmod ideapad-laptop.ko.gz
insmod: init_module: ideapad-laptop.ko.gz: No such device
febootstrap: internal insmod virtio_ring.ko.gz
febootstrap: internal insmod virtio.ko.gz
febootstrap: internal insmod virtio_mmio.ko.gz
febootstrap: internal insmod virtio_net.ko.gz
febootstrap: internal insmod virtio-rng.ko.gz
febootstrap: internal insmod virtio_blk.ko.gz
febootstrap: internal insmod virtio_console.ko.gz
febootstrap: internal insmod virtio_pci.ko.gz
febootstrap: internal insmod virtio_balloon.ko.gz
febootstrap: internal insmod jbd2.ko.gz
febootstrap: internal insmod ext4.ko.gz
febootstrap: internal insmod ext2.ko.gz
febootstrap: picked /sys/block/vdb/dev as root device
febootstrap: creating /dev/root as block special 254:16
febootstrap: mounting new root on /root
febootstrap: chroot
/proc/uptime: No such file or directory
Starting /init script ...
rm: cannot remove `/proc': Is a directory
mkdir: cannot create directory `/proc': File exists
rm: cannot remove `/sys': Is a directory
mkdir: cannot create directory `/sys': File exists
/init: line 40: /sbin/udevadm: No such file or directory
/init: line 41: /sbin/udevadm: No such file or directory
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCADDRT: No such process
mdadm: No arrays found in config file or automatically
Reading all physical volumes. This may take a while...
No volume groups found
No volume groups found
/dev:
total 0
c--------- 1 root root 10, 235 Feb 23 18:17 autofs
c--------- 1 root root 10, 234 Feb 23 18:17 btrfs-control
drwxr-xr-x 2 root root 60 Feb 23 18:17 char
crw------- 1 root root 5, 1 Feb 23 18:17 console
lrwxrwxrwx 1 root root 11 Feb 23 18:17 core -> /proc/kcore
drwxr-xr-x 2 root root 60 Feb 23 18:17 cpu
crw------- 1 root root 10, 62 Feb 23 18:17 cpu_dma_latency
lrwxrwxrwx 1 root root 13 Feb 23 18:17 fd -> /proc/self/fd
crw-rw-rw- 1 root root 1, 7 Feb 23 18:17 full
crw-rw-rw- 1 root root 10, 229 Feb 23 18:17 fuse
drwxr-xr-x 2 root root 60 Feb 23 18:17 input
crw------- 1 root root 1, 11 Feb 23 18:17 kmsg
c--------- 1 root root 10, 237 Feb 23 18:17 loop-control
brw-r--r-- 1 root disk 7, 0 Feb 23 18:17 loop0
drwxr-xr-x 2 root root 60 Feb 23 18:17 mapper
crw------- 1 root root 10, 227 Feb 23 18:17 mcelog
crw------- 1 root root 1, 1 Feb 23 18:17 mem
drwxr-xr-x 2 root root 60 Feb 23 18:17 net
crw------- 1 root root 10, 61 Feb 23 18:17 network_latency
crw------- 1 root root 10, 60 Feb 23 18:17 network_throughput
crw-rw-rw- 1 root root 1, 3 Feb 23 18:17 null
crw------- 1 root root 1, 4 Feb 23 18:17 port
c--------- 1 root root 108, 0 Feb 23 18:17 ppp
crw------- 1 root root 10, 1 Feb 23 18:17 psaux
crw-rw-rw- 1 root root 5, 2 Feb 23 18:17 ptmx
crw-rw-rw- 1 root root 1, 8 Feb 23 18:17 random
crw------- 1 root root 10, 59 Feb 23 18:17 rfkill
crw------- 1 root root 254, 0 Feb 23 18:17 rtc0
crw------- 1 root root 10, 231 Feb 23 18:17 snapshot
drwxr-xr-x 2 root root 80 Feb 23 18:17 snd
lrwxrwxrwx 1 root root 15 Feb 23 18:17 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Feb 23 18:17 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Feb 23 18:17 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root 5, 0 Feb 23 18:17 tty
crw------- 1 root root 4, 0 Feb 23 18:17 tty0
crw------- 1 root root 4, 1 Feb 23 18:17 tty1
crw------- 1 root root 4, 10 Feb 23 18:17 tty10
crw------- 1 root root 4, 11 Feb 23 18:17 tty11
crw------- 1 root root 4, 12 Feb 23 18:17 tty12
crw------- 1 root root 4, 13 Feb 23 18:17 tty13
crw------- 1 root root 4, 14 Feb 23 18:17 tty14
crw------- 1 root root 4, 15 Feb 23 18:17 tty15
crw------- 1 root root 4, 16 Feb 23 18:17 tty16
crw------- 1 root root 4, 17 Feb 23 18:17 tty17
crw------- 1 root root 4, 18 Feb 23 18:17 tty18
crw------- 1 root root 4, 19 Feb 23 18:17 tty19
crw------- 1 root root 4, 2 Feb 23 18:17 tty2
crw------- 1 root root 4, 20 Feb 23 18:17 tty20
crw------- 1 root root 4, 21 Feb 23 18:17 tty21
crw------- 1 root root 4, 22 Feb 23 18:17 tty22
crw------- 1 root root 4, 23 Feb 23 18:17 tty23
crw------- 1 root root 4, 24 Feb 23 18:17 tty24
crw------- 1 root root 4, 25 Feb 23 18:17 tty25
crw------- 1 root root 4, 26 Feb 23 18:17 tty26
crw------- 1 root root 4, 27 Feb 23 18:17 tty27
crw------- 1 root root 4, 28 Feb 23 18:17 tty28
crw------- 1 root root 4, 29 Feb 23 18:17 tty29
crw------- 1 root root 4, 3 Feb 23 18:17 tty3
crw------- 1 root root 4, 30 Feb 23 18:17 tty30
crw------- 1 root root 4, 31 Feb 23 18:17 tty31
crw------- 1 root root 4, 32 Feb 23 18:17 tty32
crw------- 1 root root 4, 33 Feb 23 18:17 tty33
crw------- 1 root root 4, 34 Feb 23 18:17 tty34
crw------- 1 root root 4, 35 Feb 23 18:17 tty35
crw------- 1 root root 4, 36 Feb 23 18:17 tty36
crw------- 1 root root 4, 37 Feb 23 18:17 tty37
crw------- 1 root root 4, 38 Feb 23 18:17 tty38
crw------- 1 root root 4, 39 Feb 23 18:17 tty39
crw------- 1 root root 4, 4 Feb 23 18:17 tty4
crw------- 1 root root 4, 40 Feb 23 18:17 tty40
crw------- 1 root root 4, 41 Feb 23 18:17 tty41
crw------- 1 root root 4, 42 Feb 23 18:17 tty42
crw------- 1 root root 4, 43 Feb 23 18:17 tty43
crw------- 1 root root 4, 44 Feb 23 18:17 tty44
crw------- 1 root root 4, 45 Feb 23 18:17 tty45
crw------- 1 root root 4, 46 Feb 23 18:17 tty46
crw------- 1 root root 4, 47 Feb 23 18:17 tty47
crw------- 1 root root 4, 48 Feb 23 18:17 tty48
crw------- 1 root root 4, 49 Feb 23 18:17 tty49
crw------- 1 root root 4, 5 Feb 23 18:17 tty5
crw------- 1 root root 4, 50 Feb 23 18:17 tty50
crw------- 1 root root 4, 51 Feb 23 18:17 tty51
crw------- 1 root root 4, 52 Feb 23 18:17 tty52
crw------- 1 root root 4, 53 Feb 23 18:17 tty53
crw------- 1 root root 4, 54 Feb 23 18:17 tty54
crw------- 1 root root 4, 55 Feb 23 18:17 tty55
crw------- 1 root root 4, 56 Feb 23 18:17 tty56
crw------- 1 root root 4, 57 Feb 23 18:17 tty57
crw------- 1 root root 4, 58 Feb 23 18:17 tty58
crw------- 1 root root 4, 59 Feb 23 18:17 tty59
crw------- 1 root root 4, 6 Feb 23 18:17 tty6
crw------- 1 root root 4, 60 Feb 23 18:17 tty60
crw------- 1 root root 4, 61 Feb 23 18:17 tty61
crw------- 1 root root 4, 62 Feb 23 18:17 tty62
crw------- 1 root root 4, 63 Feb 23 18:17 tty63
crw------- 1 root root 4, 7 Feb 23 18:17 tty7
crw------- 1 root root 4, 8 Feb 23 18:17 tty8
crw------- 1 root root 4, 9 Feb 23 18:17 tty9
crw------- 1 root root 4, 64 Feb 23 18:17 ttyS0
crw------- 1 root root 4, 65 Feb 23 18:17 ttyS1
crw------- 1 root root 4, 66 Feb 23 18:17 ttyS2
crw------- 1 root root 4, 67 Feb 23 18:17 ttyS3
c--------- 1 root root 10, 223 Feb 23 18:17 uinput
crw-rw-rw- 1 root root 1, 9 Feb 23 18:17 urandom
crw------- 1 root root 7, 0 Feb 23 18:17 vcs
crw------- 1 root root 7, 1 Feb 23 18:17 vcs1
crw------- 1 root root 7, 128 Feb 23 18:17 vcsa
crw------- 1 root root 7, 129 Feb 23 18:17 vcsa1
brw------- 1 root root 254, 0 Feb 23 18:17 vda
brw------- 1 root root 254, 16 Feb 23 18:17 vdb
crw------- 1 root root 10, 63 Feb 23 18:17 vga_arbiter
crw------- 1 root root 252, 1 Feb 23 18:17 vport0p1
crw-rw-rw- 1 root root 1, 5 Feb 23 18:17 zero
/dev/char:
total 0
lrwxrwxrwx 1 root root 17 Feb 23 18:17 10:236 -> ../mapper/control
/dev/cpu:
total 0
c--------- 1 root root 10, 184 Feb 23 18:17 microcode
/dev/input:
total 0
crw------- 1 root root 13, 63 Feb 23 18:17 mice
/dev/mapper:
total 0
crw------- 1 root root 10, 236 Feb 23 18:17 control
/dev/net:
total 0
crw-rw-rw- 1 root root 10, 200 Feb 23 18:17 tun
/dev/snd:
total 0
crw-rw---- 1 root audio 116, 1 Feb 23 18:17 seq
crw-rw---- 1 root audio 116, 33 Feb 23 18:17 timer
rootfs / rootfs rw 0 0
proc /proc proc rw,relatime 0 0
/dev/root / ext2 rw,noatime,errors=continue,user_xattr,acl 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
/dev /dev devtmpfs rw,relatime,size=245292k,nr_inodes=61323,mode=755 0 0
No volume groups found
No volume groups found
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436 metric 1
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt
Iface
Module Size Used by
dm_mod 71260 0
ext2 63387 1
ext4 417116 0
jbd2 71243 1 ext4
virtio_balloon 3764 0
virtio_pci 6671 0
virtio_console 14591 0
virtio_blk 5786 1
virtio_rng 1870 0
virtio_net 12496 0
virtio_mmio 4196 0
virtio 3682 7
virtio_mmio,virtio_net,virtio_rng,virtio_blk,virtio_console,virtio_pci,virtio_balloon
virtio_ring 4406 7
virtio_mmio,virtio_net,virtio_rng,virtio_blk,virtio_console,virtio_pci,virtio_balloon
sparse_keymap 3120 0
rfkill 15498 0
sd_mod 28307 0
sym53c8xx 71263 0
scsi_transport_spi 20564 1 sym53c8xx
ata_piix 21830 0
libata 166654 1 ata_piix
sr_mod 14951 0
cdrom 36681 1 sr_mod
scsi_mod 133443 5
sr_mod,libata,scsi_transport_spi,sym53c8xx,sd_mod
mbcache 5881 2 ext4,ext2
crc_t10dif 1332 0
crc32c 2888 0
crc_itu_t 1363 0
crc8 1186 0
crc16 1359 1 ext4
crc7 1073 0
crc_ccitt 1363 0
Thu Feb 23 18:17:55 UTC 2012
uptime: 2.63 1.21
verbose daemon enabled
linux commmand line: panic=1 console=ttyS0 udevtimeout=300 no_timer_check
acpi=off printk.time=1 cgroup_disable=memory selinux=0 guestfs_verbose=1
TERM=xterm
Failed to connect to virtio-serial channel.
This is a fatal error and the appliance will now exit.
Usually this error is caused by either QEMU or the appliance
kernel not supporting the vmchannel method that the
libguestfs library chose to use. Please run
'libguestfs-test-tool' and provide the complete, unedited
output to the libguestfs developers, either in a bug report
or on the libguestfs redhat com mailing list.
/dev/virtio-ports/org.libguestfs.channel.0: No such file or directory
/init: line 146: /sbin/reboot: No such file or directory
[ 2.688514] Kernel panic - not syncing: Attempted to kill init!
[ 2.689399] Pid: 1, comm: init Not tainted 3.2.6-2-ARCH #1
[ 2.690241] Call Trace:
[ 2.690742] [<ffffffff81452925>] panic+0xa0/0x1b6
[ 2.691509] [<ffffffff8106a740>] do_exit+0x880/0x8e0
[ 2.692255] [<ffffffff811672a1>] ? rw_verify_area+0x61/0xf0
[ 2.693104] [<ffffffff8106aaf4>] do_group_exit+0x44/0xa0
[ 2.693911] [<ffffffff8106ab67>] sys_exit_group+0x17/0x20
[ 2.694721] [<ffffffff8145d382>] system_call_fastpath+0x16/0x1b
[ 2.695655] Rebooting in 1 seconds..libguestfs: error: unexpected end of
file when reading from daemon.
See earlier debug messages.
Or you can run 'libguestfs-test-tool' and post the complete output into
a bug report or message to the libguestfs mailing list.
libguestfs: child_cleanup: 0xcf4310: child process died
libguestfs-test-tool: failed to launch appliance
libguestfs: closing guestfs handle 0xcf4310 (state 0)
Any Hints?
Thank you in advance,
Nikos Skalkotos
12 years, 6 months
Whenjobs automating libguestfs development version test & build
by Richard W.M. Jones
Just a note that 'whenjobs'[1] is now automating libguestfs test and
build, along the development branch.
Simply tagging a new release in git will trigger a cycle of packaging,
test, build, updating the website, and performing a new build in
Fedora Rawhide.
At the moment I'm only doing the tests on Fedora, but I will extend it
later so it tests both individual commits and released tarballs on
Debian, Ubuntu & RHEL.
I also want to extend it to build/test/release stable branches.
The current whenjobs script is attached.
Rich.
[1] http://people.redhat.com/~rjones/whenjobs/
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
12 years, 6 months
Extend disk image type
by Kai Meyer
How can I add an image file type to the list of image types that
libguestfs supports? I see raw, qcow2, vmdk, ect. I would like to add
support for a new type. Where should I begin?
-Kai Meyer
12 years, 6 months
[PATCH 1/2] Check that directory path is not too long (found by Coverity).
by Richard W.M. Jones
From: "Richard W.M. Jones" <rjones(a)redhat.com>
Since we copy dirname + "/" + path to a fixed buffer of size PATH_MAX,
we need to check that the buffer cannot overflow.
---
helper/appliance.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/helper/appliance.c b/helper/appliance.c
index c4d0b32..05ad3e5 100644
--- a/helper/appliance.c
+++ b/helper/appliance.c
@@ -168,15 +168,23 @@ iterate_input_directory (const char *dirname, int dirfd, struct writer *writer)
sort (entries, string_compare);
char path[PATH_MAX];
- strcpy (path, dirname);
+ char *inputs[] = { path };
size_t len = strlen (dirname);
+
+ if (len + 1 >= PATH_MAX)
+ error (EXIT_FAILURE, 0, "%s: directory name too long", __func__);
+
+ strcpy (path, dirname);
path[len++] = '/';
- char *inputs[] = { path };
+ for (size_t i = 0; entries[i] != NULL; ++i) {
+ size_t len2 = strlen (entries[i]);
+
+ if (len + 1 + len2 >= PATH_MAX)
+ error (EXIT_FAILURE, 0, "%s: path name too long", __func__);
- size_t i;
- for (i = 0; entries[i] != NULL; ++i) {
strcpy (&path[len], entries[i]);
+
iterate_inputs (inputs, 1, writer);
}
}
--
1.7.9.1
12 years, 6 months
[PATCH] virt-sysprep: add the hostname and net_hwaddr support for rhel
by Wanlong Gao
Add the support for rhel.
Change the hostname and delete the HWADDR for rhel.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
clone/virt-sysprep.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
index 833a31d..d505532 100644
--- a/clone/virt-sysprep.in
+++ b/clone/virt-sysprep.in
@@ -273,7 +273,7 @@ fi
if [ "$hostname" = "yes" ]; then
case "$type/$distro" in
- linux/fedora)
+ linux/fedora|linux/rhel)
echo "HOSTNAME=$hostname_param" > $mnt/etc/sysconfig/network.new
sed '/^HOSTNAME=/d' < $mnt/etc/sysconfig/network >> $mnt/etc/sysconfig/network.new
mv -f $mnt/etc/sysconfig/network.new $mnt/etc/sysconfig/network
@@ -313,7 +313,7 @@ fi
if [ "$net_hwaddr" = "yes" ]; then
case "$type/$distro" in
- linux/fedora)
+ linux/fedora|linux/rhel)
if [ -d $mnt/etc/sysconfig/network-scripts ]; then
rm_hwaddr ()
{
--
1.7.9
12 years, 6 months
KVM Image not working after expansion
by vipul borikar
Hello,
I expanded a KVM image of 4gb to 10 gb ....
My Host machine is RHEL 6.1 and Guest is RHEL 5.5
Command i used is:
virt-resize --expand /dev/sda1 RHEL5.5-64bit.img RHEL5.5-10gb
Commands successfully gets executed...
Old disk works fine i mean it boots properly but the new disk stucks at
GRUB...
Has any one seen this behavior...
What should i do to debug this problem..
--
Thanks
Vipul Borikar
"Our task must be to free ourselves...by widening our circle of compassion
to embrace all living creatures and the whole of nature and its beauty."
12 years, 6 months
[PATCH 0/4] Add various ntfs* tools and unify label setting.
by Richard W.M. Jones
This miscellaneous patch adds bindings for:
- ntfsfix
- ntfsclone
- ntfslabel
and unifies filesystem label setting through a single API 'set-label'
which replaces 'set-e2label' and is also able to set labels on NTFS
using the ntfslabel program.
'ntfsfix' has been added as a possible way to fix RHBZ#797760.
However I have not found a way to fully fix this bug. See discussion
in the bug.
'ntfsclone-in' and 'ntfsclone-out' have been added at the request of a
user.
Rich.
12 years, 6 months
[PATCH RFC] blkid: start using libblkid directly instead
by Wanlong Gao
Hi Rich:
What do you think about this idea?
although this still has some problems like do 'vfs-type /dev/vda'.
Can you give some comments about this? Is this a bad idea?
Thanks
-Wanlong Gao
-----------------------------------------------------------------------------
Use libblkid directly instead of the binary command in blkid.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
appliance/packagelist.in | 1 +
configure.ac | 10 ++++++++
daemon/Makefile.am | 1 +
daemon/blkid.c | 55 ++++++++++++++++++++++-----------------------
4 files changed, 39 insertions(+), 28 deletions(-)
diff --git a/appliance/packagelist.in b/appliance/packagelist.in
index 2ab6b80..575b8dd 100644
--- a/appliance/packagelist.in
+++ b/appliance/packagelist.in
@@ -45,6 +45,7 @@
vim-minimal
xz
zfs-fuse
+ libblkid
#endif /* REDHAT */
#ifdef DEBIAN
diff --git a/configure.ac b/configure.ac
index cc11b2f..0beef28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -393,6 +393,16 @@ if test "x$have_libselinux" = "xyes"; then
AC_DEFINE([HAVE_LIBSELINUX],[1],[Define to 1 if you have libselinux])
fi
AC_SUBST([SELINUX_LIB])
+AC_CHECK_HEADERS([blkid/blkid.h])
+AC_CHECK_LIB([blkid],[blkid_new_probe],[
+ have_libblkid="$ac_cv_header_blkid_blkid_h"
+ LIBBLKID="-lblkid"
+ LIBS="$LIBS $LIBBLKID"
+ ],[have_libblkid=no])
+if test "x$have_libblkid" = "xyes"; then
+ AC_DEFINE([HAVE_LIBBLKID],[1],[Define to 1 if you have libblkid])
+fi
+AC_SUBST([LIBBLKID])
dnl Check for systemtap/DTrace userspace probes (optional).
dnl http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index 3a698cc..5e4db57 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -167,6 +167,7 @@ guestfsd_LDADD = \
liberrnostring.a \
libprotocol.a \
$(SELINUX_LIB) \
+ $(LIBBLKID) \
$(AUGEAS_LIBS) \
$(top_builddir)/gnulib/lib/.libs/libgnu.a \
$(GETADDRINFO_LIB) \
diff --git a/daemon/blkid.c b/daemon/blkid.c
index 8728c29..0c4ca71 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -23,6 +23,8 @@
#include <string.h>
#include <unistd.h>
#include <limits.h>
+#include <fcntl.h>
+#include <blkid/blkid.h>
#include "daemon.h"
#include "actions.h"
@@ -30,40 +32,37 @@
static char *
get_blkid_tag (const char *device, const char *tag)
{
- char *out, *err;
- int r;
+ int fd, rc;
+ const char *data = NULL;
+ blkid_probe blkprobe;
- r = commandr (&out, &err,
- "blkid",
- /* Adding -c option kills all caching, even on RHEL 5. */
- "-c", "/dev/null",
- "-o", "value", "-s", tag, device, NULL);
- if (r != 0 && r != 2) {
- if (r >= 0)
- reply_with_error ("%s: %s (blkid returned %d)", device, err, r);
- else
- reply_with_error ("%s: %s", device, err);
- free (out);
- free (err);
+ if (!device || !tag)
return NULL;
- }
- free (err);
+ fd = open (device, O_RDONLY);
+ if (fd < 0)
+ return NULL;
- if (r == 2) { /* means UUID etc not found */
- free (out);
- out = strdup ("");
- if (out == NULL)
- reply_with_perror ("strdup");
- return out;
- }
+ blkprobe = blkid_new_probe ();
+ if (!blkprobe)
+ goto done;
+ if (blkid_probe_set_device (blkprobe, fd, 0, 0))
+ goto done;
+
+ blkid_probe_enable_superblocks(blkprobe, 1);
+
+ blkid_probe_set_superblocks_flags (blkprobe, BLKID_SUBLKS_LABEL |
+ BLKID_SUBLKS_UUID | BLKID_SUBLKS_TYPE);
- /* Trim trailing \n if present. */
- size_t len = strlen (out);
- if (len > 0 && out[len-1] == '\n')
- out[len-1] = '\0';
+ rc = blkid_do_safeprobe (blkprobe);
+ if (!rc)
+ blkid_probe_lookup_value (blkprobe, tag, &data, NULL);
- return out; /* caller frees */
+done:
+ close (fd);
+ if (blkprobe)
+ blkid_free_probe (blkprobe);
+ return data ? strdup ((char *) data) : NULL;
}
char *
--
1.7.9
12 years, 6 months
[PATCH] set-smp: limit the number of cpus below 255
by Wanlong Gao
From: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
Limit the number of cpus below 255, since qemu can't support.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
src/guestfs.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/guestfs.c b/src/guestfs.c
index 3607eaa..f5875e6 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -794,7 +794,10 @@ guestfs__get_pgroup (guestfs_h *g)
int
guestfs__set_smp (guestfs_h *g, int v)
{
- if (v >= 1) {
+ if (v > 255) {
+ error (g, "Unsupported number of smp cpus: %d", v);
+ return -1;
+ } else if (v >= 1) {
g->smp = v;
return 0;
} else {
--
1.7.9
12 years, 6 months