Skip to content

Commit

Permalink
preparing to making changes in appliance vmx files after conversion f…
Browse files Browse the repository at this point in the history
…rom .xml files
  • Loading branch information
goldmann committed Jan 22, 2009
1 parent eb7e507 commit 76a9496
Show file tree
Hide file tree
Showing 113 changed files with 37,440 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ rpms-cache
sources-cache
extra-rpms
build
*.pyc

30 changes: 28 additions & 2 deletions lib/jboss-cloud/appliance-vmx-image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,41 @@ def define_precursors
description_elem.text = "#{@simple_name} Appliance\n Version: #{@version}-#{@release}"
doc.root.insert_after( name_elem, description_elem )
end
# updating xml the file according to selected build architecture
# update xml the file according to selected build architecture
arch_elem = doc.elements["//arch"]
arch_elem.text = @arch
File.open( "#{@appliance_xml_file}.vmx-input", 'w' ) {|f| f.write( doc ) }
abort
end

file appliance_vmx_package => [ "#{@appliance_xml_file}.vmx-input" ] do
execute_command( "virt-pack -o $PWD/#{@build_dir}/appliances/#{@arch} #{@appliance_xml_file}.vmx-input" )
#execute_command( "virt-pack -o $PWD/#{@build_dir}/appliances/#{@arch} #{@appliance_xml_file}.vmx-input" )
execute_command( "#{Dir.pwd}/lib/python-virtinst/virt-convert -o vmx #{@appliance_xml_file}.vmx-input #{File.dirname( @appliance_xml_file)}/" )
vmx_file = File.dirname( @appliance_xml_file) + "/" + File.basename( @appliance_xml_file, ".xml" ) + '.vmx'

if ( File.exists?( vmx_file ) )

vmx_data = File.open( vmx_file).readlines

vmx_data.map! do |line|
# replace guestOS informations to: other26xlinux or other26xlinux-64, this seems to be the savests values (tm)
line = line.gsub(/guestOS = (.*)/, "guestOS = #{@arch == "x86_64" ? "other26xlinux-64" : "other26xlinux"}")

# replace IDE disk with SCSI, it's recommended (don't know about source, but it is)
# IDE disks aren't working for ESXi, so we must have generated SCSI
# changing only vmx file won't work because of 'IDE disk geometry' message after power on
# currently commented out
#
# line = line.gsub(/ide0:0/, "scsi0:0")
end

# yes, we want a SCSI controller because we have SCSI disks!
# vmx_data += ["scsi0.present = \"true\""] unless vmx_data.grep(/scsi0.present = "true"/).length > 0
# vmx_data += ["scsi0.virtualDev = \"lsilogic\""] unless vmx_data.grep(/scsi0.virtualDev = "lsilogic"/).length > 0

# write changes to file
File.new( vmx_file , "w+" ).puts( vmx_data )
end
end

super_simple_name = File.basename( @simple_name, '-appliance' )
Expand Down
45 changes: 45 additions & 0 deletions lib/python-virtinst/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
virtinst Authors
=================

The virtinst library / virt-install tool are written and maintained
by

Jeremy Katz <katzj-at-redhat-dot-com>
Daniel Berrange <berrange-at-redhat-dot-com>
Hugh Brock <hbrock-at-redhat-dot-com>

Patches also received from

Glauber de Oliveira Costa <gcosta-at-redhat-dot-com>
Saori Fukuta <fukuta-dot-saori-at-jp-dot-fujitsu-dot-com>
Jim Meyering <jim-at-meyering-dot-net>
Nobuhiro Itou <fj0873gn-at-aa-dot-jp-dot-fujitsu-dot-com>
Takahashi Tomohiro <takatom-at-jp-dot-fujitsu-dot-com>
Tatsuro Enokura <fj7716hz-at-aa-dot-jp-dot-fujitsu-dot-com>
Shigeki Sakamoto <fj0588di-at-aa-dot-jp-dot-fujitsu-dot-com>
Rich Jones <rjones-at-redhat-dot-com>
Kazuki Mizushima <mizushima-dot-kazuk-at-jp-dot-fujitsu-dot-com>
Cole Robinson <crobinso-at-redhat-dot-com>
Robert Nelson <robertn-at-the-nelsons-dot-org>
John Danielson <john.danielson-at-sun-dot-com>
Mark Johnson <johnson.nh-at-gmail-dot-com>
Alexander Todorov <atodorov-at-redhat-dot-com>
Joey Boggs <jboggs-at-redhat-dot-com>
Bryan Mason <bjmason-at-redhat-dot-com>
Michael "wart" Thomas <wart-at-kobold-dot-org>
John Levon <john-dot-levon-at-sun-dot-com>
Bryan Kearney <bkearney-at-redhat-dot-com>
Guido Guenther <agx-at-sigxcpu-dot-org>
Francois Kooman <fkooman-at-tuxed-dot-net>
Tom Hughes <thh-at-cyberspace-dot-com>
Alan Pevec <apevec-at-redhat-dot-com>
Andreas Schneider <anschneider-at-suse-dot-de>
Michael Marineau <marineam-at-gentoo-dot-org>
Tomas Hoger <thoger-at-redhat-dot-com>

...send patches and get your name here...

Also lots of translations from the Fedora translation team. See
the individual .po files for the translators.

-- That's all folks !
339 changes: 339 additions & 0 deletions lib/python-virtinst/COPYING

Large diffs are not rendered by default.

0 comments on commit 76a9496

Please sign in to comment.