[RFC PATCH] virt-sysprep:add ipconfig for preparation
by Wanlong Gao
Hi Rich:
I just send a patch to request for your comments,
then will do further work about this.
things like this:
[root@Allen ~]# virt-sysprep --ipconfig="eth0:192.168.1.2,255.255.255.0,192.168.1.1" --enable=ipconfig -d clone-6u1
OR
[root@Allen ~]# virt-sysprep -d clone-6u1
Please comments.
Thanks
-Wanlong Gao
Signed-off-by: Wanlong Gao <gaowanlong(a)cn.fujitsu.com>
---
clone/virt-sysprep.in | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)
diff --git a/clone/virt-sysprep.in b/clone/virt-sysprep.in
index d505532..e4486d0 100644
--- a/clone/virt-sysprep.in
+++ b/clone/virt-sysprep.in
@@ -26,7 +26,7 @@ version="@PACKAGE_VERSION@"
TEMP=`getopt \
-o a:c:d:vVx \
- --long help,add:,connect:,domain:,enable:,format::,hostname:,list-operations,selinux-relabel,no-selinux-relabel,verbose,version \
+ --long help,add:,connect:,domain:,enable:,format::,hostname:,ipconfig:,list-operations,selinux-relabel,no-selinux-relabel,verbose,version \
-n $program -- "$@"`
if [ $? != 0 ]; then
echo "$program: problem parsing the command line arguments"
@@ -91,6 +91,9 @@ while true; do
--hostname)
hostname_param="$2"
shift 2;;
+ --ipconfig)
+ ipconfig_param="$2"
+ shift 2;;
--list-operations)
enable=list
shift;;
@@ -135,6 +138,7 @@ if [ -z "$enable" ]; then
dhcp_client_state=yes
dhcp_server_state=yes
hostname=yes
+ ipconfig=yes
logfiles=yes
mail_spool=yes
net_hwaddr=yes
@@ -150,6 +154,7 @@ elif [ "$enable" = "list" ]; then
echo "dhcp-client-state"
echo "dhcp-server-state"
echo "hostname"
+ echo "ipconfig"
echo "logfiles"
echo "mail-spool"
echo "net-hwaddr"
@@ -168,6 +173,7 @@ else
dhcp-client-state) dhcp_client_state=yes ;;
dhcp-server-state) dhcp_server_state=yes ;;
hostname) hostname=yes ;;
+ ipconfig) ipconfig=yes ;;
logfiles) logfiles=yes ;;
mail-spool) mail_spool=yes ;;
net-hwaddr) net_hwaddr=yes ;;
@@ -286,6 +292,48 @@ if [ "$hostname" = "yes" ]; then
esac
fi
+if [ "$ipconfig" = "yes" ]; then
+ case "$type/$distro" in
+ linux/fedora|linux/rhel)
+ if [ -d $mnt/etc/sysconfig/network-scripts ]; then
+ if [ -z $ipconfig_param ]; then
+ rm_ipconfig ()
+ {
+ sed '/^IPADDR=/d;/^BOOTPROTO=/d;/^NETMASK=/d;/^GATEWAY=/d;/^DNS/d' \
+ < "$1" > "$1.new"
+ echo "BOOTPROTO=dhcp" >> "$1.new"
+ mv -f "$1.new" "$1"
+ }
+ export -f rm_ipconfig
+ find $mnt/etc/sysconfig/network-scripts \
+ -name 'ifcfg-*' -type f \
+ -exec bash -c 'rm_ipconfig "$0"' {} \;
+ else
+ for (( i=1; i<8 ; i+=2 )); do
+ __device=$(echo "$ipconfig_param" | awk -v j=$i -F: '{print $j}')
+ if [ -z $__device ]; then
+ break
+ fi
+ __ipconfig=$(echo "$ipconfig_param" | awk -v j=$((i+1)) -F: '{print $j}')
+ __config_file=$(echo "$mnt/etc/sysconfig/network-scripts/ifcfg-$__device")
+ if [ -e $__config_file ]; then
+ __ip=$(echo "$__ipconfig" | awk -F, '{print $1}')
+ __mask=$(echo "$__ipconfig" | awk -F, '{print $2}')
+ __gw=$(echo "$__ipconfig" | awk -F, '{print $3}')
+ sed '/^IPADDR=/d;/^BOOTPROTO=/d;/^NETMASK=/d;/^GATEWAY=/d;/^DNS/d' \
+ < "$__config_file" > "$__config_file.new"
+ echo "IPADDR=$__ip" >> "$__config_file.new"
+ echo "BOOTPROTO=static" >> "$__config_file.new"
+ echo "NETMASK=$__mask" >> "$__config_file.new"
+ echo "GATEWAY=$__gw" >> "$__config_file.new"
+ mv -f "$__config_file.new" "$__config_file"
+ fi
+ done
+ fi
+ fi
+ esac
+fi
+
if [ "$logfiles" = "yes" ]; then
case "$type" in
linux)
--
1.7.9.2
12 years, 9 months
[PATCH] Remove call to set_autosync.
by Richard W.M. Jones
From: "Richard W.M. Jones" <rjones(a)redhat.com>
This is the default since libguestfs 1.6. It does not need to be
explicitly set.
See also https://bugzilla.redhat.com/show_bug.cgi?id=799798#c6
---
lib/Sys/VirtConvert/GuestfsHandle.pm | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/lib/Sys/VirtConvert/GuestfsHandle.pm b/lib/Sys/VirtConvert/GuestfsHandle.pm
index 01d7eb0..c370007 100644
--- a/lib/Sys/VirtConvert/GuestfsHandle.pm
+++ b/lib/Sys/VirtConvert/GuestfsHandle.pm
@@ -103,9 +103,6 @@ sub new
&$open();
}
- # Enable autosync to defend against data corruption on unclean shutdown
- $g->set_autosync(1);
-
$self->{g} = $g;
$self->{onclose} = [];
--
1.7.9.1
12 years, 9 months
can`t start guestfsd daemon inside guest
by THO HUYNH
hi Mr Rich
As you recommended, I switched to Fedora 16.
I also built a guest machine with Fedora 16 Mini version.
Inside the guest I installed libguestfs-live-service package but I failed to start the guestfsd daemon :
[root@Fedora16 ~]# guestfsd -vr
verbose daemon enabled
linux commmand line: BOOT_IMAGE=/vmlinuz-3.2.7-1.fc16.i686.PAE root=/dev/mapper/vg_fedora16-lv_root ro rd.md=0 rd.dm=0 KEYTABLE=us quiet rd.lvm.lv=vg_fedora16/lv_root rhgb rd.lvm.lv=vg_fedora16/lv_swap rd.luks=0 SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8
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
Moreover, I managed VMs with virt-manager, and I tried to edit the XML file of the guest from the path
/etc/libvirt/qemu/FedoraMini16.xml (FedoraMini16 is the name of the guest), here is the content of the xml file
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit FedoraMini16
or other application using the libvirt API.
-->
<domain type='kvm'>
<name>FedoraMini16</name>
<uuid>9d33d233-cedc-fd7c-658e-578358b7f7cf</uuid>
<memory>1048576</memory>
<currentMemory>1048576</currentMemory>
<vcpu>1</vcpu>
<os>
<type arch='i686' machine='pc-0.14'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/bin/qemu-kvm</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/home/feeliwood/VMs/Fedora16Mini/Fedora16Mini.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
</disk>
<interface type='network'>
<mac address='52:54:00:ae:47:e7'/>
<source network='default'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target port='0'/>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<graphics type='vnc' port='-1' autoport='yes'/>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</memballoon>
<channel type='unix'> <source mode='bind'path='/var/lib/libvirt/qemu/FedoraMini16.libguestfs' /> <target type='virtio'name='org.libguestfs.channel.0'/> </channel> </devices>
</domain>
but whenever I restart the guest with virt-manager, the clause that I added was deleted.
could you help me please !!!
thank you
12 years, 9 months
Rebélate by self-management, first project of free software by which we bet all / Rebélate por la autogestión, primer proyecto de software libre por el que apostamos todas
by Orquidea Salt mas
Inglés :
Many already we have contributed to the first project of free software
dedicated to self-management in this campaign of collective financing,
it collaborates and it spreads!/
Beginning campaign collective financing
http://www.goteo.org/project/rebelaos-publicacion-por-la-autogestion?lang=en
Login to enter with user of social networks and for would register in Goteo :
http://www.goteo.org/user/login?lang=en
Rebelaos! Publication by self-management A massive publication that
floods the public transport, the work centers, the parks, the
consumption centers, by means of distribution of 500,000 gratuitous
units, acting simultaneously in all sides and nowhere.
We announce the main tool of a vestibule Web for the management of
self-sustaining resources by means of Drupal, in addition in the
publication there will be an article dedicated to free software,
hardware, It is being prepared in inglès, the machinery You can see
more details in the index of the
publication https://n-1.cc/pg/file/read/1151902/indexresumen-de-los-contenidos-pdf
. A computer system that allows us to share resources in all the
scopes of our life so that we do not have to generate means different
for each subject nor for each territory.
A point of contact digitalis to generate projects of life outside
Capitalism and to margin of the State.
A tool to spread and to impel the social transformation through the
resources that will set out in their contents around self-management,
the autoorganización, the disobedience and the collective action.
In which the capitalist system goes to the collapse, in a while
immersed in a deep systemic crisis (ecological, political and
economic, but mainly of values), where individual and collective of
people they are being lacking of his fundamental rights, is necessary
to develop a horizontal collective process where all the human beings
we pruned to interact in equality of conditions and freedom.
To interact means to relate to us (as much human as economically), to
communicate to us, to cover our basic needs, to generate and to
protect communal properties, to know and to provide collective
solutions us problematic that our lives interfere. We want abrir a
breach within normality in the monotonous life state-capitalist, a day
anyone, that finally will not be any day.
By means of this publication we try:
- To drive a horizontal collective process where all and all we pruned
to interact in equality of conditions and freedom.
- To create communications network between the people it jeopardize
with the change and arranged to act.
- To find collective solutions to problematic that our lives interfere
- To facilitate the access to resources that make possible self-management.
- To participate in the construction of networks of mutual support,
generated horizontals, asamblearias and from the base.
- To publish all this information in an attractive format stops to
facilitate the access to all the society.
There are 15 days remaining for the upcoming March 15, the day that
will come Rebelaos!, Magazine for the selfmanagement
Today, we issue the cover of Rebelaos! (Castilian version) that can be
displayed on the following link:
https://n-1.cc/pg/file/read/1200503/portada-15-de-marzo-rebelaos
The contents of the store owners to us by 15 March. Do you? Do you
keep on 15 March?
In addition, we have over 200 distribution nodes, distributed
throughout the Spanish state. Check the map:
https://afinidadrebelde.crowdmap.com/
On the other hand, the funding campaign continues to move and still
have 12 days to collect the remaining 6,000 euros. We can all make a
bit for all the grains of sand become a great beach on March 15. You
can access the co-financing campaign:
http://www.goteo.org/project/rebelaos-publicacion-por-la-autogestion
Rebel Affinity group
www.rebelaos.net
-------------------------------------------------------------------------------
Castellano:
Muchos ya hemos aportado al primer proyecto de software libre dedicado
a la la financiación colectiva, colabora y diffunde !!!!!
Inicio campaña financiación colectiva goteo.org
www.goteo.org/project/rebelaos-publicacion-por-la-autogestion
Link para registrarse en Goteo y acceder a redes sociales para
colaborar en la difusín
http://www.goteo.org/user/login
¡Rebelaos! Publicación por la autogestión
Una publicación masiva que inunde el transporte público, los centros
de trabajo, los parques, los centros de consumo, mediante la
distribución de 500.000 ejemplares gratuitos, actuando simultáneamente
en todos lados y en ninguna parte.
Anunciamos la herramienta principal de un portal web para la gestión
de recursos autogestionados mediante Drupal, además en la publicación
habrá un artículo dedicado al software libre, el hardware, la
maquinaria... Puedes ver más detalles en el índice de la publicación
https://n-1.cc/pg/file/read/1151902/indexresumen-de-los-contenidos-pdf
Un sistema infórmatico que nos permita compartir recursos en todos los
ámbitos de nuestra vida de forma que no tengamos que generar un medio
distinto para cada tema ni para cada territorio. Un punto de encuentro
digital para generar proyectos de vida fuera del capitalismo y al
margen del Estado.
Una herramienta para difundir e impulsar la transformación social a
través de los recursos que se propondrán en sus contenidos en torno a
la autogestión, la autoorganización, la desobediencia y la acción
colectiva.
En un momento en que el sistema capitalista se dirige al colapso,
inmerso en una profunda crisis sistémica (ecológica, política y
económica, pero principalmente de valores), donde individuos y
colectivos de personas están siendo desprovistos de sus derechos
fundamentales, es necesario desarrollar un proceso colectivo
horizontal donde todos los seres humanos podamos interactuar en
igualdad de condiciones y en libertad.
Interactuar significa relacionarnos (tanto humana como
económicamente), comunicarnos, cubrir nuestras necesidades básicas,
generar y proteger bienes comunes, conocernos y dar soluciones
colectivas a problemáticas que interfieren nuestras vidas. Queremos
abrir una brecha dentro de la normalidad en la monótona vida
estatal-capitalista, un día cualquiera, que finalmente no será
cualquier día.
Mediante esta publicación pretendemos:
- Impulsar un proceso colectivo horizontal donde todos y todas podamos
interactuar en igualdad de condiciones y en libertad.
- Crear red de comunicaciones entre las personas comprometidas con el
cambio y dispuestas a actuar.
- Encontrar soluciones colectivas a problemáticas que interfieren
nuestras vidas.
- Facilitar el acceso a recursos que posibiliten la autogestión.
- Participar en la construcción de redes de apoyo mutuo, horizontales,
asamblearias y generadas desde la base.
- Publicar toda esta información en un formato atractivo para
facilitar el acceso a toda la sociedad.
Son 15 los días que restan para el próximo 15 de marzo, día en el que
verá la luz ¡Rebelaos!, publicación por la autogestión.
Hoy, hacemos pública la portada de ¡Rebelaos! (versión en castellano)
que podéis visualizar en el siguiente enlace:
https://n-1.cc/pg/file/read/1200503/portada-15-de-marzo-rebelaos
El contenido de los titulares nos los guardamos para el 15 de marzo.
¿Y tú? ¿Te guardas el 15 de marzo?
Además, ya hemos superado los 200 nodos de distribución, repartidos
por todo el estado español. Ver el mapa:
https://afinidadrebelde.crowdmap.com/
Por otro lado, la campaña de financiación continúa avanzando y todavía
quedan 12 días para reunir los 6.000 euros que restan. Todas podemos
aportar un poco para que todos los granitos de arena se conviertan en
una gran playa el 15 de marzo. Podéis acceder a la campaña de
cofinanciación en:
http://www.goteo.org/project/rebelaos-publicacion-por-la-autogestion
Colectivo Afinidad Rebelde
www.rebelaos.net
12 years, 9 months
Re: [Libguestfs] can`t install libguestfs-live-service package with Fedora 15
by Richard W.M. Jones
On Fri, Mar 02, 2012 at 07:28:13AM -0800, THO HUYNH wrote:
> I`m using Fedora 15 as the host.
> And on this physical machine, I created a virtual machine with Fedora 15 minimal version installed on it.
> When I tried to install the libguestfs-live-package inside the virtual machine, here is the result I got :
> [root@fedora15 ~]# yum install libguestfs-live-service
> Loaded plugins: langpacks, presto, refresh-packagekit
> Setting up Install Process
> No package libguestfs-live-service available.
libguestfs-live-service was added in 1.11.13 (July 2011, Fedora 16).
For best results you should be using libguestfs 1.16 or later (Fedora 16
and up).
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
12 years, 9 months
Re: [Libguestfs] [virt-tools-list] virt-p2v failure
by Richard W.M. Jones
On Wed, Feb 29, 2012 at 07:23:20PM -0500, Cole Robinson wrote:
> On 02/29/2012 06:17 PM, Mike Brady wrote:
> > I have been doing some testing with v2v and p2v and have got stuck on with p2v
> > failing on mmy test systems and need some pointers.
> >
> > I got v2v working for Centos 5 Xen to Centos 6 KVM for both Linux (Centos) and
> > Windows (2008) with out too much problem.
> >
> > I then installed Win2008R2 native on the hardware that was the Centos 5 server
> > to test p2v. The virt-p2v ISO boots fine and starts the disk transfer, but
> > the transfer fails at the same point, 21% into the transfer of the disk. The
> > "disk" is a single 320GB RAID 10 array on an HP CCISS controller.
> >
> > The virt-p2v.iso was created on a Fedora 16 i386 machine and has v2v/p2v 0.8.5
> > on it.
> >
> > The Centos 6 KVM server started with virt-v2v 0.8.3, but I have built 0.8.6
> > RPMs and updated due to this issue, with no change in behavior.
> >
> > I have enabled DEBUG logging on the virt-p2v-server and get the following out
> > put:
> > Mar 1 10:44:16 c2cl00 virt-v2v[6721]: p2v-server started.
> > Mar 1 10:44:16 c2cl00 virt-v2v[6721]: Received: LIST_PROFILES
> > Mar 1 10:44:16 c2cl00 virt-v2v[6721]: Sent: LIST 1#012libvirt
> > Mar 1 10:45:50 c2cl00 kernel: lo: Disabled Privacy Extensions
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Received: SET_PROFILE libvirt
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Sent: OK
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Received: METADATA 224
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Read 224 bytes
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Sent: OK
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Received: PATH 320016572416
> > /dev/cciss/c0d0
> > Mar 1 10:46:24 c2cl00 virt-v2v[6721]: Pool: $VAR1 = bless( do{\(my $o =
> > 23313248)}, 'Sys::Virt::StoragePool' );
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Sent: OK
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Received: CONTAINER RAW
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Sent: OK
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Received: DATA 320016572416
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Read 4194304 bytes
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Read 4194304 bytes
> > Mar 1 10:46:25 c2cl00 virt-v2v[6721]: Read 4194304 bytes
> > .
> > .
> > .
> > .
> > .
> > Mar 1 11:33:12 c2cl00 virt-v2v[6721]: Read 4194304 bytes
> > Mar 1 11:33:12 c2cl00 virt-v2v[6721]: Read 4194304 bytes
> > Mar 1 11:33:12 c2cl00 virt-v2v[6721]: Read 65536 bytes
> > Mar 1 11:33:14 c2cl00 virt-v2v[6721]: Sent: ERROR Error receiving data:
> > Mar 1 11:33:14 c2cl00 virt-v2v[6721]: FATAL: Error receiving data:
> > Mar 1 11:33:14 c2cl00 virt-v2v[6721]: WARNING: Error messages were written to
> > /var/log/virt-p2v-server.1330551856.log.
> > Mar 1 11:33:14 c2cl00 virt-v2v[6721]: p2v-server exited.
> > Mar 1 11:33:14 c2cl00 virt-v2v[6721]: Automatically cleaning up volume
> > win2008-cciss_c0d0 from pool {pool}.
> >
> > /var/log/virt-p2v-server.1330551856.log contains:
> > virt-v2v: Error receiving data:
> >
> > Any pointers on what to look at next?
> >
>
> CCing to virt-tools-list (this was sent to virt-tools-list-owner)
Thanks but virt-p2v & v2v questions should go to the
libguestfs mailing list.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
12 years, 9 months
Re: [Libguestfs] [virt-tools-list] find0 in (perl) Sys::Guestfs
by Richard W.M. Jones
On Tue, Jan 31, 2012 at 01:29:58PM -0800, dan farmer wrote:
> Is there anyway to convince find0 to put the results in memory rather than
> writing to a file? I really don't want to have to write it to a file and
> then read it again just to process the results. I see guestfish has an
> option to write to stdout (but the lib doesn't have a documented way) for
> some reason.
These so-called "FileIn" and "FileOut" APIs only read and write to
files. However in Linux you can easily convert this to a file
descriptor, or even in-memory operation. This page describes the
/dev/fd method:
http://libguestfs.org/guestfs.3.html#uploading_and_downloading_to_pipes_a...
Note that if you want to actively read or write from the other end of
the /dev/fd file descriptor, then there has to be another process or
thread involved. This is because the libguestfs API is synchronous
and so the thread which makes the guestfs_* call will be doing
blocking read(2) and write(2) system calls. This makes it rather hard
to use /dev/fd/* from guestfish, which is single-threaded, but you can
still use pipes, eg:
find0 / - | <some other program>
> It'd be nice to point to either a scalar (or w/e var) or filename and let me
> worry if I have enough memory to hold all that. I suppose I could write
> my own walker, try to intercept the writes of guestfish, change the
> source, try tricks with named pipes, (not going to call guestfish from
> inside perl!) hoping for an easier answer.
At some point you hit the limits of guestfish and it's better to use
the real perl bindings, ie. Sys::Guestfs.
[...]
> P.s. If there's a better place to ask for such things, let me know; looking
> at
> archives it seems more patch/dev stuff here than the charter suggests,
> but I'm fine with w/e.
Usually better to ask libguestfs questions here:
https://www.redhat.com/mailman/listinfo/libguestfs
Rich.
> P.p.s. Is there a repository for scripts or things written for libguestfs?
> I'm
> familiar with the recipes page
> (http://libguestfs.org/guestfs-recipes.1.html)
> but haven't found much else other than rich's blog. But unless libguestfs
> dies on me along the way I'm planning on writing various things in the next
> few months that may or may not see the light of day, but don't want to spam
> folks if there's another option or no interest.
>
> ^..^
>
>
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list(a)redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
--
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, 9 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, 9 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, 9 months