We are using Ubuntu images. I see the VCL trying to configure the RedHat-type 
network files and failing to do so since those files don't exist in Ubuntu. 
However in our case, the failures are harmless because we use DHCP, so I set 
the /etc/network/interface file accordingly in the initial image, and it 
doesn't need changing after that.

/etc/network/interfaces entries:
==========================
# The primary network interface
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet dhcp
==========================

I don't think the disk type error is related to Ubuntu, seems to be coming from 
the vmware provisioning piece.

I also had to make the following changes in the Ubuntu images to prevent the 
network interfaces from being given different device names each time, e.g. 
eth2, eth3, etc.

For Ubuntu 9.04 and earlier:
Create /etc/udev/rules.d/90-persistent-net.rules file.
 Contents:
   SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{type}=="1", 
KERNEL=="eth*", OPTIONS="ignore_device"

This prevents the device rules from assigning eth0 and eth1 different names 
because the mac addresses don't match the original machine.

For Ubuntu 10.04 and later:
Instead of creating 90-persistent-net.rules file, create 
/etc/init.d/udev-netrule script to remove
70-persistent-net.rules file on shutdown, so it doesn't exist when image is 
captured.
Contents:
  /bin/rm -f /etc/udev/rules.d/70-persistent-net.rules
Link to /etc/rc0.d/S10udev-netrule and /etc/rc6.d/S10udev-netrule.


Mike Waldron
Systems Specialist
ITS Research Computing
University of North Carolina at Chapel Hill
CB #3420, ITS Manning, Rm 2509
919-962-9778
________________________________________
From: Josh Thompson [josh_thomp...@ncsu.edu]
Sent: Tuesday, November 15, 2011 12:33 PM
To: vcl-user@incubator.apache.org
Subject: Re: Problems in Ubuntu image creation

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lei,

I was hoping someone actually using Ubuntu images would respond to this.

Here at NCSU, we aren't using Ubuntu images, but VCL should support them (at
least it did in the past).  Did you select Ubuntu as the OS when capturing the
image?

It is also possible that the Ubuntu module may need to be updated.

Josh

On Friday November 11, 2011, Huang,Lei wrote:
> Dear all,
>
>   I have to bother you again. I tried to create an Ubuntu image, but I
> found some problems during the base image creation. Ubuntu uses
> /etc/network/interfaces to manage networks, but I see VCL is still looking
> for ifcfg-eth0 and ifcfg-eth1. Another problem was unable to determine the
> disk type, which I am not sure if it is specific to Ubuntu.
>
>   Does VCL support Ubuntu image?
>
> Thanks,
> Lei Huang
>
> ============
>
> 2011-11-11 01:18:43|14199|856:856|image|
Linux.pm:set_static_public_address(508)|attempting to set static public IP
address on vmguest-1:
> |14199|856:856|image| public interface name: eth1
> |14199|856:856|image| public IP address: 129.207.46.17
> |14199|856:856|image| public subnet mask: 255.255.255.0
> |14199|856:856|image| public default gateway: 129.207.46.1
> |14199|856:856|image| public DNS server(s): 8.8.8.8
>
> 2011-11-11
> 01:18:43|14199|856:856|image|Linux.pm:set_static_public_address(514)|publi
> c interface ifcfg file path: /etc/sysconfig/network-scripts/ifcfg-eth1
>
> |14199|856:856|image| ---- WARNING ----
> |14199|856:856|image| 2011-11-11
> |01:19:04|14199|856:856|image|Linux.pm:set_static_public_address(534)|fail
> |ed to recreate /etc/sysconfig/network-scripts/ifcfg-eth1 on vmguest-1,
> |exit status: 1, command: 'echo "DEVICE=eth1 14199|856:856|image|
> |BOOTPROTO=static
> |14199|856:856|image| IPADDR=129.207.46.17
> |14199|856:856|image| NETMASK=255.255.255.0
> |14199|856:856|image| STARTMODE=onboot
> |14199|856:856|image| ONBOOT=yes
> |14199|856:856|image| " > /etc/sysconfig/network-scripts/ifcfg-eth1',
> |output: 14199|856:856|image| bash: line 6:
> |/etc/sysconfig/network-scripts/ifcfg-eth1: No such file or directory
> |14199|856:856|image| ( 0) Linux.pm, set_static_public_address (line: 534)
> |14199|856:856|image| (-1) Linux.pm, pre_capture (line: 154)
> |14199|856:856|image| (-2) VMware.pm, capture (line: 556)
> |14199|856:856|image| (-3) image.pm, process (line: 162)
> |14199|856:856|image| (-4) vcld, make_new_child (line: 568)
> |14199|856:856|image| (-5) vcld, main (line: 346)
>
> …..
>
> |14199|856:856|image| ---- WARNING ----
> |14199|856:856|image| 2011-11-11
> |01:21:58|14199|856:856|image|vmware_cmd.pm:get_virtual_disk_type(593)|una
> |ble to determine disk type configured in
> |'vmwarelinux-ubuntuLab63-v0.vmdk', command: 'grep -i createType
> |"/install/vmware_files/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63
> |-v0.vmdk"', output: 14199|856:856|image| Binary file
> |/install/vmware_files/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63-
> |v0.vmdk matches 14199|856:856|image| ( 0) vmware_cmd.pm,
> |get_virtual_disk_type (line: 593) 14199|856:856|image| (-1) VMware.pm,
> |capture (line: 615)
> |14199|856:856|image| (-2) image.pm, process (line: 162)
> |14199|856:856|image| (-3) vcld, make_new_child (line: 568)
> |14199|856:856|image| (-4) vcld, main (line: 346)
> |14199|856:856|image| ---- WARNING ----
> |14199|856:856|image| 2011-11-11
> |01:21:58|14199|856:856|image|VMware.pm:capture(616)|failed to determine
> |the virtual disk type of the vmdk being captured:
> |/install/vmware_files/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63-
> |v0.vmdk 14199|856:856|image| ( 0) VMware.pm, capture (line: 616)
> |14199|856:856|image| (-1) image.pm, process (line: 162)
> |14199|856:856|image| (-2) vcld, make_new_child (line: 568)
> |14199|856:856|image| (-3) vcld, main (line: 346)
> |14199|856:856|image| ---- WARNING ----
> |14199|856:856|image| 2011-11-11
> |01:21:58|14199|856:856|image|VMware.pm:capture(662)|failed to find the
> |vmdk files on VM host CSB302 to copy back to the managment node's image
> |repository 14199|856:856|image| ( 0) VMware.pm, capture (line: 662)
> |14199|856:856|image| (-1) image.pm, process (line: 162)
> |14199|856:856|image| (-2) vcld, make_new_child (line: 568)
> |14199|856:856|image| (-3) vcld, main (line: 346)
>
> 2011-11-11
> 01:21:58|14199|856:856|image|Linux.pm:file_exists(1404)|'/install/vmware_f
> iles/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63-v0.vmdk' exists on
> CSB302, files: 1, directories: 0, links: 0 2011-11-11
> 01:21:58|14199|856:856|image|Linux.pm:file_exists(1390)|file or directory
> does not exist on CSB302: '/install/vmware_files/Lubuntu/Lubuntu.vmdk'
> 2011-11-11
> 01:21:58|14199|856:856|image|VMware.pm:rename_vmdk(5026)|attempting to
> rename vmdk:
> '/install/vmware_files/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63-
> v0.vmdk' --> '/install/vmware_files/Lubuntu/Lubuntu.vmdk' 2011-11-11
> 01:21:59|14199|856:856|image|Linux.pm:create_directory(1524)|directory
> already exists on CSB302: '/install/vmware_files/Lubuntu' 2011-11-11
> 01:21:59|14199|856:856|image|VMware.pm:rename_vmdk(5049)|'move_virtual_dis
> k' subroutine has not been implemented by the API:
> VCL::Module::Provisioning::VMware::vmware_cmd 2011-11-11
> 01:21:59|14199|856:856|image|VMware.pm:rename_vmdk(5056)|attempting to
> rename vmdk file using vmware-vdiskmanager:
> /install/vmware_files/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63-v
> 0.vmdk --> /install/vmware_files/Lubuntu/Lubuntu.vmdk
>
> 2011-11-11 01:21:59|14199|856:856|image|VMware.pm:rename_vmdk(5063)|renamed
vmdk file by executing 'vmware-vdiskmanager' command on VM host:
> |14199|856:856|image| command: vmware-vdiskmanager -n
> |"/install/vmware_files/vmwarelinux-ubuntuLab63-v0/vmwarelinux-ubuntuLab63
> |-v0.vmdk" "/install/vmware_files/Lubuntu/Lubuntu.vmdk"
> |14199|856:856|image| output: Using log file
> |/tmp/vmware-root/vdiskmanager.log 14199|856:856|image| Renaming completed
> |successfully.
>
> 2011-11-11 01:21:59|14199|856:856|image|VMware.pm:capture(693)|attempting
> to delete directory where renamed vmdk resided before reverting the name
> back to the original: /install/vmware_files/vmwarelinux-ubuntuLab63-v0
> 2011-11-11 01:21:59|14199|856:856|image|Linux.pm:delete_file(1459)|deleted
> '/install/vmware_files/vmwarelinux-ubuntuLab63-v0' on CSB302 2011-11-11
> 01:21:59|14199|856:856|image|Linux.pm:file_exists(1390)|file or directory
> does not exist on CSB302:
> '/install/vmware_files/vmwarelinux-ubuntuLab63-v0' 2011-11-11
> 01:21:59|14199|856:856|image|Linux.pm:delete_file(1473)|confirmed file
> does not exist on CSB302:
> '/install/vmware_files/vmwarelinux-ubuntuLab63-v0' 2011-11-11
> 01:21:59|14199|856:856|image|VMware.pm:capture(699)|attempting to power
> the VM back on so that it can be captured again 2011-11-11
> 01:22:00|14199|856:856|image|vmware_cmd.pm:vm_power_on(300)|powered on VM:
> 'Lubuntu.vmx'
>
> |14199|856:856|image| ---- WARNING ----
> |14199|856:856|image| 2011-11-11
> |01:22:00|14199|856:856|image|image.pm:process(166)|vmwarelinux-ubuntuLab6
> |3-v0 image failed to be captured by provisioning module
> |14199|856:856|image| ( 0) image.pm, process (line: 166)
> |14199|856:856|image| (-1) vcld, make_new_child (line: 568)
> |14199|856:856|image| (-2) vcld, main (line: 346)
- --
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk7ConIACgkQV/LQcNdtPQOMEQCfcivPt8lPxT/gdPLo15R1Zd8Q
JK8An10uOyGPvEXU7K2zbOfR5ToqBmj2
=KbFg
-----END PGP SIGNATURE-----

Reply via email to