libguestfs-test-tool say "child process died" on ubuntu 11.10 x64
by lzy.dev@gmail.com
Hi all,
As title, thanks a lot. My test host configurations:
Linux desktop 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC
2011 x86_64 x86_64 x86_64 GNU/Linux
The test tool output as following:
xxx@desktop:~$ sudo libguestfs-test-tool
[sudo] password for xxx:
===== Test starts here =====
LIBGUESTFS_DEBUG=1
TMPDIR=(not set)
libguestfs: new guestfs handle 0x16cd0f0
library version: 1.15.11
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/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.0.0-13-generic is a directory
picked vmlinuz-3.0.0-13-generic because modpath
/lib/modules/3.0.0-13-generic exists
checking modpath /lib/modules/3.0.0-14-generic is a directory
picked vmlinuz-3.0.0-14-generic because modpath
/lib/modules/3.0.0-14-generic 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 [00001ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [00001ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
supermin helper [00031ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [00196ms] finished creating appliance
libguestfs: [00201ms] begin building supermin appliance
libguestfs: [00203ms] run febootstrap-supermin-helper
libguestfs: [00205ms] febootstrap-supermin-helper --verbose -f ext2
/usr/lib/guestfs/supermin.d x86_64 /var/tmp/guestfs.jgetV0/kernel
/var/tmp/guestfs.jgetV0/initrd /var/tmp/guestfs.jgetV0/root
supermin helper [00000ms] whitelist = (not specified), host_cpu =
x86_64, kernel = /var/tmp/guestfs.jgetV0/kernel, initrd =
/var/tmp/guestfs.jgetV0/initrd, appliance =
/var/tmp/guestfs.jgetV0/root
supermin helper [00000ms] inputs[0] = /usr/lib/guestfs/supermin.d
checking modpath /lib/modules/3.0.0-13-generic is a directory
picked vmlinuz-3.0.0-13-generic because modpath
/lib/modules/3.0.0-13-generic exists
checking modpath /lib/modules/3.0.0-14-generic is a directory
picked vmlinuz-3.0.0-14-generic because modpath
/lib/modules/3.0.0-14-generic exists
supermin helper [00000ms] finished creating kernel
supermin helper [01816ms] finished mke2fs
supermin helper [01816ms] visiting /usr/lib/guestfs/supermin.d
supermin helper [01817ms] visiting /usr/lib/guestfs/supermin.d/base.img
supermin helper [01923ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
supermin helper [01932ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
supermin helper [07257ms] visiting /usr/lib/guestfs/supermin.d/init.img
supermin helper [17331ms] finished creating appliance
libguestfs: [17547ms] finished building supermin appliance
libguestfs: [17581ms] begin testing qemu features
libguestfs: [17611ms] finished testing qemu features
libguestfs: accept_from_daemon: 0x16cd0f0 g->state = 1
[17614ms] /usr/bin/kvm \
-drive file=/tmp/libguestfs-test-tool-sda-6OA3hT,cache=off,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/libguestfsJF88Lr/guestfsd.sock,id=channel0 \
-device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \
-kernel /var/tmp/.guestfs-0/kernel.17521 \
-initrd /var/tmp/.guestfs-0/initrd.17521 \
-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.17521,snapshot=on,if=virtio,cache=unsafeSupported
machines are:
pc Standard PC (alias of pc-0.14)
pc-0.14 Standard PC (default)
pc-0.13 Standard PC
pc-0.12 Standard PC
pc-0.11 Standard PC, qemu 0.11
pc-0.10 Standard PC, qemu 0.10
isapc ISA-only PC
libguestfs: child_cleanup: 0x16cd0f0: child process died
libguestfs: error: child process died unexpectedly
libguestfs-test-tool: failed to launch appliance
libguestfs: closing guestfs handle 0x16cd0f0 (state 0)
Zhi Yan, Liu
12 years, 11 months
Re: [Libguestfs] libguestfs-test-tool say "child process died" on ubuntu 11.10 x64
by Wanlong Gao
On 12/30/2011 03:25 PM, lzy.dev(a)gmail.com wrote:
> On Fri, Dec 30, 2011 at 2:58 PM, Wanlong Gao <wanlong.gao(a)gmail.com> wrote:
>> On 12/30/2011 09:57 AM, lzy.dev(a)gmail.com wrote:
>>
>>> Hi all,
>>>
>>> As title, thanks a lot. My test host configurations:
>>>
>>> Linux desktop 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC
>>> 2011 x86_64 x86_64 x86_64 GNU/Linux
>>>
>>> The test tool output as following:
>>>
>>> xxx@desktop:~$ sudo libguestfs-test-tool
>>> [sudo] password for xxx:
>>> ===== Test starts here =====
>>> LIBGUESTFS_DEBUG=1
>>> TMPDIR=(not set)
>>> libguestfs: new guestfs handle 0x16cd0f0
>>> library version: 1.15.11
>>> 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/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.0.0-13-generic is a directory
>>> picked vmlinuz-3.0.0-13-generic because modpath
>>> /lib/modules/3.0.0-13-generic exists
>>> checking modpath /lib/modules/3.0.0-14-generic is a directory
>>> picked vmlinuz-3.0.0-14-generic because modpath
>>> /lib/modules/3.0.0-14-generic 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 [00001ms] visiting /usr/lib/guestfs/supermin.d/daemon.img
>>> supermin helper [00001ms] visiting /usr/lib/guestfs/supermin.d/hostfiles
>>> supermin helper [00031ms] visiting /usr/lib/guestfs/supermin.d/init.img
>>
>>
>> Here missed "add kernel modules".
>>
>> Did you test 1.15.11-1 here http://libguestfs.org/download/binaries/ubuntu1110-packages/ ?
>> I just tested on ubuntu-11.10 x86_64, but didn't see this error, can you test with the
>> 1.15.11-1 package again and send the result here?
>>
>> Thanks
>> -Wanlong Gao
>
> Hi,
>
> The version of libguestfs I have tested is 1.15.11-1. And there deb
> packages are all download from that official site.
> Thanks.
You can see this error every time?
>
> Zhi Yan, Liu
12 years, 12 months
P2V challenge that demands some creativity
by Greg Scott
Here is a P2V challenge I could use some advice with.
I have a source Windows 2003 physical machine that was upgraded several years ago from Windows 2000. So its system is at C:\WINNT instead of C:\Windows. The target is a RHEV VM.
Booting the source machine from the virt-p2v CD and trying virt-p2v-server fails apparently because the Windows directory is c:\WINNT.
What about the old-fashioned way - provision a new VM and use Microsoft ntbackup to backup the system drive and system state on the physical and restore to bare virtual metal on the newly provisioned VM? Well , that also blows up because Windows 2003 installs into C:\Windows and doesn't give an option to put it anywhere else. So the target VM has an existing installation in C:\Windows while the source physical machine uses C:\WINNT. So then the system state restore doesn't work right and the resulting VM ends up a horrible mess.
OK, so how do you build a new Windows 2003 system using C:\WINNT instead of C:\Windows? Microsoft has a KB article with some suggestions. The 2003 setup program will prompt for an alternate directory if it sees another installation on the target disk. So the trick is, format the target disk with NTFS, create a \Windows directory on the target disk, then run the 2003 setup program. It will find the \Windows directory and then prompt for an alternate directory. Build a fresh install into C:\WINNT and then the system state restore should work properly.
Wonderful, how to create that \Windows directory? Microsoft documents several suggestions including using an automated answer file on a floppy, or booting an old DOS flopppy or Windows 98 CD and formatting and creating the directory on the target disk by hand before doing the 2003 installation. None of these work. DOS and Windows 98 have no clue about virtio disks. I'm not sure how to go about making a floppy image with the answer file we need.
If this were all physical, the easiest way would take the target disk, plug it into a Windows system, format it and create the directory, then put the disk back in the target server, do the build into \WINNT, and then ntbackup restore. But I don't see any option for RHEV to allow the virtual equivalent. RHEV seems to go to lots of trouble to marry virtual disks to the VMs that create them and doesn't allow the flexibility to move those virtual disks around. This is a bummer.
I see a few options:
1 - Modify virt-p2v-server to also allow migrations with C:\WINNT - or even better, to parse boot.ini on the source physical machine to find the right Windows directory.
2 - A hack; Build a 2003 VM in the standard way in \Windows. Now build Windows 2003 again on the same virtual disk, this time into \WINNT. Boot the \WINNT copy, edit boot.ini to remove references to \Windows if present, delete the \Windows tree by hand. Reboot, test, and now ntbackup-restore.
3 - Preload the virtio block driver into the source physical machine. Grab a reputable disk image copier with the ability to store disk images on a network share someplace. Boot the source machine from CD and make an image of its C drive. Make an ISO file out of that CD, boot the target VM from the ISO and copy the image onto the target virtual disk.
4 - I wonder if a Fedora live CD/ISO has the ability to format and write to NTFS partitions? BTW, for any Fedora people reading this, I'm **BEGGING** you - get rid of the elaborate Gnome graphics background pictures! Do you have any idea how long that fancy background picture takes to paint when looking at the console of a Fedora VM inside RHEV Manager, inside a Windows RDP session, across a slow Internet link???
- Greg Scott
12 years, 12 months
Happy Holidays
by Richard W.M. Jones
Myself and most people at Red Hat are on holiday for the whole
of next week, back on the 3rd of January.
libguestfs 1.15.14 is being pushed out to the usual place.
Happy holiday, see you in January.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top
13 years
[PATCH] mkfs: optimization and code cleanup
by Wanlong Gao
Optimizations by reducing the STREQ operations and do some
code cleanup.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
daemon/mkfs.c | 29 +++++++++++++----------------
1 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/daemon/mkfs.c b/daemon/mkfs.c
index a2c2366..7757623 100644
--- a/daemon/mkfs.c
+++ b/daemon/mkfs.c
@@ -44,13 +44,16 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize,
int r;
char *err;
char mke2fs[] = "mke2fs";
+ int extfs = 0;
+
+ if (STREQ (fstype, "ext2") || STREQ (fstype, "ext3") ||
+ STREQ (fstype, "ext4")) extfs = 1;
/* For ext2/3/4 run the mke2fs program directly. This is because
* the mkfs program "eats" some options, in particular the -F
* option.
*/
- if (STREQ (fstype, "ext2") || STREQ (fstype, "ext3") ||
- STREQ (fstype, "ext4")) {
+ if (extfs) {
if (e2prog (mke2fs) == -1)
return -1;
ADD_ARG (argv, i, mke2fs);
@@ -64,9 +67,7 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize,
/* Force mke2fs to create a filesystem, even if it thinks it
* shouldn't (RHBZ#690819).
*/
- if (STREQ (fstype, "ext2") || STREQ (fstype, "ext3") ||
- STREQ (fstype, "ext4"))
- ADD_ARG (argv, i, "-F");
+ if (extfs) ADD_ARG (argv, i, "-F");
/* mkfs.ntfs requires the -Q argument otherwise it writes zeroes
* to every block and does bad block detection, neither of which
@@ -77,16 +78,13 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize,
/* mkfs.reiserfs produces annoying interactive prompts unless you
* tell it to be quiet.
+ * mkfs.jfs as the same
+ * mkfs.xfs must force to make xfs filesystem when the device already
+ * has a filesystem on it
*/
- if (STREQ (fstype, "reiserfs"))
- ADD_ARG (argv, i, "-f");
-
- /* Same for JFS. */
- if (STREQ (fstype, "jfs"))
- ADD_ARG (argv, i, "-f");
-
- if (STREQ (fstype, "xfs"))
- ADD_ARG (argv, i, "-f");
+ if (STREQ(fstype, "reiserfs") || STREQ(fstype, "jfs") ||
+ STREQ(fstype, "xfs"))
+ ADD_ARG(argv, i, "-f");
/* For GFS, GFS2, assume a single node. */
if (STREQ (fstype, "gfs") || STREQ (fstype, "gfs2")) {
@@ -147,8 +145,7 @@ do_mkfs_opts (const char *fstype, const char *device, int blocksize,
}
if (optargs_bitmask & GUESTFS_MKFS_OPTS_INODE_BITMASK) {
- if (!STREQ (fstype, "ext2") && !STREQ (fstype, "ext3") &&
- !STREQ (fstype, "ext4")) {
+ if (!extfs) {
reply_with_error ("inode size (-I) can only be set on ext2/3/4 filesystems");
return -1;
}
--
1.7.8.rc4
13 years
[PATCH] gitignore: ignore the guestfs.* directory
by Wanlong Gao
Let git ignore the guestfs.* directorys.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
.gitignore | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/.gitignore b/.gitignore
index dcf2af1..4d4556e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -367,3 +367,4 @@ tools/virt-*.pl
/gnulib
.git-module-status
.guestfs-*
+guestfs.*
--
1.7.8
13 years
[PATCH] extra-tests: add test-guests to prevent test error
by Wanlong Gao
extra-tests is depending on tests-guests.
We need guests/*.img when doing extra-tests.
/work/git/libguestfs/run valgrind --log-file=/work/git/libguestfs/tests/extra/valgrind.log --leak-check=full --error-exitcode=119 --suppressions=/work/git/libguestfs/tests/extra/suppressions ../../cat/virt-cat -a ../guests/fedora.img /etc/fstab >/dev/null
../guests/fedora.img: No such file or directory
make[1]: *** [test-tools-internal] Error 1
make[1]: Leaving directory `/work/git/libguestfs/tests/extra'
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
tests/extra/Makefile.am | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tests/extra/Makefile.am b/tests/extra/Makefile.am
index 582fa55..d129b6d 100644
--- a/tests/extra/Makefile.am
+++ b/tests/extra/Makefile.am
@@ -69,6 +69,7 @@ GUESTS = $(shell virsh -c $(LIBVIRT_DEFAULT_URI) list --all | \
awk '{print $$2}')
extra-tests: \
+ test-guests \
test-prerequisites \
test-c-api \
test-tools-null \
@@ -80,6 +81,9 @@ extra-tests: \
test-resize \
test-sparsify
+test-guests:
+ $(MAKE) -C ../guests check
+
test-prerequisites:
@libtool --help >/dev/null 2>&1 || { \
echo "extra-tests: libtool is not installed"; \
--
1.7.8
13 years
Windows P2V migration temporary recipe
by Greg Scott
These are the current steps we followed to set up and run Windows P2V migrations. Note that development is proceeding rapidly and the versions of all pieces below will likely be obsolete soon.
*************************************************************
Windows RHEV P2V Cookbook 2011-1122
1. Install 32 bit Fedora 14 as a virtual machine or physical host. You will use this system to
build a .ISO file to burn to CD. Later in the process, you'll boot a source physical machine from
this CD.
2. Install 64 bit Fedora 16 as another virtual machine or physical host. This will become your migration
server.
3 - Download and install virt-v2v on both the 32 and 64 bit systems. (yum install virt-v2v).
Virt-v2v is a package to migrate virtual machines from one virtual environment to either libvirt or RHEV. It
also includes the P2V extensions.
4 - Download, install, and run virt-p2v-image-builder (yum install virt-p2v-image-builder) on the 32 bit
system. virt-p2v-image-builder is a tool that builds a .ISO file for source physical machines to boot from.
Do this on the 32 bit system so it builds a 32 bit kernel so you can use it to boot 32 bit hardware. Burn the
.ISO file to a CD. You won't need the 32 bit system any more.
All subsequent Fedora operations will happen on the 64 bit system.
5. On the 64 bit Fedora system, edit /etc/yum.repos.d/fedora-updates-testing.repo; change "enabled=0" to
"enabled=1"
6. yum install and/or update libguestfs. This downloads and installs libguestfs-1.14.2-1.fc16.x86_64 and all
its dependencies. (Much easier than downloading all the RPMs by hand.)
7. Go to the link Matt provided:
http://koji.fedoraproject.org/koji/taskinfo?taskID=3531688
and install Matt's temporary bleeding edge version of virt-v2v. Edit /usr/bin/virt-p2v-server and uncomment
the line setting $ENV{'LIBGUESTFS_TRACE'} = 1;
7 - Edit the target profile on the Fedora system (/etc/virt-v2v.conf). This describes the environment to
migrate into. The .conf file is separated into sections. Copy the appropriate section, paste it in the
bottom, remove the comment markers, and customize with correct names of objects for this site.
8. From RHEL 6 supplementary RHN channel or other suitable source, download and install a copy of virtio-win-
1.3.3-0.el6.noarch.rpm on the Fedora migration server.
9. Install libguestfs-winsupport on a RHEL 6.1 or newer system. On that RHEL 6 system do:
cd /var/lib/virt-v2v/software
tar -cvf firstboot.tar windows
10. Copy firstboot.tar to /var/lib/virt-v2v/software on the Fedora migration server.
11. On the Fedora migration server:
cd /var/lib/virt-v2v/software
tar -xvf firstboot.tar
This should set up the following:
[root@Fedora16-64P2V software]# pwd
/var/lib/virt-v2v/software
[root@Fedora16-64P2V software]# ls -al -R
.:
total 4312
drwxr-xr-x. 3 root root 4096 Nov 22 10:49 .
drwxr-xr-x. 3 root root 4096 Nov 22 10:25 ..
-rw-r--r--. 1 root root 4403200 Nov 22 10:48 firstboot.tar
drwxr-xr-x. 2 root root 4096 Jun 23 05:53 windows
./windows:
total 4304
drwxr-xr-x. 2 root root 4096 Jun 23 05:53 .
drwxr-xr-x. 3 root root 4096 Nov 22 10:49 ..
-rw-r--r--. 1 root root 994 Feb 14 2011 firstboot.bat
-rw-r--r--. 1 root root 4324584 Feb 14 2011 rhev-apt.exe
-rw-r--r--. 1 root root 68928 Feb 14 2011 rhsrvany.exe
[root@Fedora16-64P2V software]#
12. Now try a P2V. Boot the source Windows system from the CD created earlier, connect to the Fedora
migration server IP Address, select the profile you made and start the migration. This should create a
virtual machine and virtual disk images in the RHEV Exports staging area.
13. When the migration finishes, use RHEV Manager to import the newly migrated virtual machine into the RHEV
environment.
13 years
[PATCH] blkid: remove the -o export option
by Wanlong Gao
The -o export option is the default, so remove this useless option.
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
daemon/blkid.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemon/blkid.c b/daemon/blkid.c
index f23eac6..e6bcf32 100644
--- a/daemon/blkid.c
+++ b/daemon/blkid.c
@@ -119,7 +119,7 @@ blkid_with_p_opt(const char *device)
int size = 0, alloc = 0;
r = command(&out, &err, "blkid", "-c", "/dev/null",
- "-p", "-i", "-o", "export", device, NULL);
+ "-p", "-i", device, NULL);
if (r == -1) {
reply_with_error("%s", err);
goto error;
@@ -132,7 +132,7 @@ blkid_with_p_opt(const char *device)
goto error;
}
- /* Parse the output of blkid -p -i -o export:
+ /* Parse the output of blkid -p -i:
* UUID=b6d83437-c6b4-4bf0-8381-ef3fc3578590
* VERSION=1.0
* TYPE=ext2
--
1.7.8
13 years