Fedora 20 cloud image

250 views
Skip to first unread message

Vaidas Jablonskis

unread,
Feb 3, 2014, 5:08:16 PM2/3/14
to gce-dis...@googlegroups.com
Hi people,

I have been working on creating a fedora 20 cloud image for GCE recently which will eventually be continuously built by fedora project officially. GCE is great, but not being able to run my favourite OS on my favourite cloud provider really not great.

If you're interested, please have a look at my github repo to get started with Fedora on GCE: https://github.com/vaijab/fedora-gce-image

Any issues please let me know.

Thanks,
Vaidas

Tito Valentin

unread,
Feb 20, 2014, 8:27:16 PM2/20/14
to gce-dis...@googlegroups.com
Vaidas,

Have you had any success building a custom image for Fedora to run on GCE? I have been trying to get a bundle to build for Ubuntu Server for a few days with no luck. Here are my issues so far https://groups.google.com/forum/#!topic/gce-discussion/dzkrrDkhDxs

At this point, I am not even modifying the kernel. I am skipping all of those steps and only installing the gcimagebundle tools to get the image to bundle first. I have wasted too much time tuning the kernel and other OS tasks to then fail miserably at the bundle build portion. If you have any feedback, please let me know. If I am successful building an image, I'll share my details for everyone and then move on to trying other OS'.

Alex Gaysinsky

unread,
Feb 20, 2014, 9:58:20 PM2/20/14
to Tito Valentin, gce-dis...@googlegroups.com
Hi Tito,

Yes, I believe several folks successfully ran Fedora on GCE. 

I looked at your second thread. It seems that you're having issues with gcimagebundle. It's important to clarify that gcimagebundle is not 
supported on Ubuntu yet.

You can take a slightly different route for packaging:

Assuming that your boot disk is /dev/sda and that /mnt points to another disk device:

1. cp --sparse=always /dev/sda /mnt/disk.raw
2. tar -cSzf image.tar.gz disk.raw
3. proceed with uploading image.tar.gz into GCS and then creating an image with gcutil

Btw, have you looked at our "recipe" for building a FreeBSD image? You can extend it to other distros as well.

Please let me know if this helps.

Best Regards,
Alex



--
© 2013 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/69bf3817-79d6-44da-a2ec-a13e51339894%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Alex Gaysinsky | Product Manager | gays...@google.com | 310-406-4298

Tito Valentin

unread,
Feb 20, 2014, 10:43:11 PM2/20/14
to gce-dis...@googlegroups.com
Alex,

Thanks a bunch for getting back to me. I had no idea that gcimagebundle was not supported on Ubuntu yet. How do you know this? Is there a "supported OS" page for gcimagebundle that I could have looked at? If so, the documentation from GCE doesn't make this obvious.

I am going to try your three steps for packaging my image and see if that works out and report back here. I have actually been following your "recipe" for FreeBSD ;). However, whenever I boot the image, it freezes after it starts up "Firewall". I haven't been able to figure out why the OS freezes at the point during the boot process. The disk is recognized and everything looks good right up to starting that service. Here is what I use to run the installation:

qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -drive file="/home/gvale3/gc_custom_images/disk.raw",format=raw,cache=none -cdrom /home/gvale3

It is important to note that virtio-scsi doesn't work here:

qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -drive file="/home/gvale3/gc_custom_images/disk.raw",format=raw,cache=none,if=virtio-scsi -cdrom /home/gvale3

So I eliminated that option. My disk still comes up as /dev/sda, which is what we want. If you specify if=virtio only, the disk comes up as /dev/vda, though. With that said, I can't get the image to book fully after it installs when it reaches that "Firewall" service. There are other times where it freezes at checking the disk.

Here is a screenshot of where it gets stuck:


Any other advice you can provide will be appreciated. Since qemu hasn't been working out for me because of those issues, I have been installing with VMware Fusion. However, the disk it creates is a vmdk and I don't know if that will work even if I successfully create a bundle/package.

Venkatesh Srinivas

unread,
Feb 20, 2014, 10:53:23 PM2/20/14
to Tito Valentin, gce-dis...@googlegroups.com
I am going to try your three steps for packaging my image and see if that works out and report back here. I have actually been following your "recipe" for FreeBSD ;). However, whenever I boot the image, it freezes after it starts up "Firewall". I haven't been able to figure out why the OS freezes at the point during the boot process. The disk is recognized and everything looks good right up to starting that service. Here is what I use to run the installation:

qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -drive file="/home/gvale3/gc_custom_images/disk.raw",format=raw,cache=none -cdrom /home/gvale3

It is important to note that virtio-scsi doesn't work here:

qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -drive file="/home/gvale3/gc_custom_images/disk.raw",format=raw,cache=none,if=virtio-scsi -cdrom /home/gvale3

To run qemu with a disk attached to a virtio-scsi controller, you must use a newer device declaration syntax. if=virtio-scsi is not supported.

For example:
qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd,physical_block_size=4096 -drive if=none,file="/tmp/my_awesome_image.img",format=raw,cache=none,id=hd

Setting id=hd in the 'drive' declaration and using a -device scsi-hd,drive=hd stanza attaches the disk to a virtio-scsi controller.


Setting if=scsi in the drive declaration will also attach your disk to a SCSI controller, but it will be attached to a legacy LSI controller emulator. Setting if=virtio will attach your disk to a virtio-blk storage controller.

HTH,
-- vs; 

Jimmy Kaplowitz

unread,
Feb 20, 2014, 11:01:20 PM2/20/14
to Tito Valentin, gce-dis...@googlegroups.com
Hi Tito,


On Thu, Feb 20, 2014 at 7:43 PM, Tito Valentin <tito.v...@dainamiks.com> wrote:
Alex,

Thanks a bunch for getting back to me. I had no idea that gcimagebundle was not supported on Ubuntu yet. How do you know this? Is there a "supported OS" page for gcimagebundle that I could have looked at? If so, the documentation from GCE doesn't make this obvious.

"Support" implies more than whether something might work, it implies a level of human support, testing, bugfixing, etc. We list the available supported GCE images here: https://developers.google.com/compute/docs/images#availableimages

The exception thrown by your gcimagebundle attempt is because you're using it outside of GCE. Our GitHub repository has a pull request pending to make this work, but the mainline version doesn't have it yet. You might try applying that pull request to your local copy:

https://github.com/GoogleCloudPlatform/compute-image-packages/pull/32

You can also try doing your builds from within GCE - qemu works inside GCE as well as it does outside, except without KVM hardware support, so it's slower.
 
I am going to try your three steps for packaging my image and see if that works out and report back here. I have actually been following your "recipe" for FreeBSD ;). However, whenever I boot the image, it freezes after it starts up "Firewall". I haven't been able to figure out why the OS freezes at the point during the boot process. The disk is recognized and everything looks good right up to starting that service. Here is what I use to run the installation:

qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -drive file="/home/gvale3/gc_custom_images/disk.raw",format=raw,cache=none -cdrom /home/gvale3

It is important to note that virtio-scsi doesn't work here:

qemu-system-x86_64 --enable-kvm -smp 1 -m 3750m -net nic,model=virtio -net user -device virtio-scsi-pci,id=scsi -drive file="/home/gvale3/gc_custom_images/disk.raw",format=raw,cache=none,if=virtio-scsi -cdrom /home/gvale3

So I eliminated that option. My disk still comes up as /dev/sda, which is what we want. If you specify if=virtio only, the disk comes up as /dev/vda, though. With that said, I can't get the image to book fully after it installs when it reaches that "Firewall" service. There are other times where it freezes at checking the disk.

If you're getting /dev/vda, that means you're telling qemu to provide virtio-block hardware, which GCE doesn't provide. Guest images needs to support virtio-scsi or it won't be able to access GCE's disks. The qemu version in Ubuntu 12.04 precise is too old to have this support, but newer qemu will work.
 
Any other advice you can provide will be appreciated. Since qemu hasn't been working out for me because of those issues, I have been installing with VMware Fusion. However, the disk it creates is a vmdk and I don't know if that will work even if I successfully create a bundle/package.

Currently we don't support importing the vmdk format. However, if you extract the raw disk from the vmdk and convert it to our format, whether it works will depend on whether the disk image contents are bootable and compatible with our virtual hardware, regardless your VMware build environment. gcimagebundle is a convenience tool, not strictly a requirement.

We provide some guidance on building a Google Compute Engine image from scratch here:
https://developers.google.com/compute/docs/building-image

This includes an overview of the virtual hardware which GCE exposes, and gives requirements and recommendation for software choices and configuration, image packaging, and image uploading.

- Jimmy

--
© 2013 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.

Alex Gaysinsky

unread,
Feb 20, 2014, 11:12:09 PM2/20/14
to Jimmy Kaplowitz, Tito Valentin, gce-dis...@googlegroups.com
Hi Tito,

Thank you for your feedback. Indeed, we need to explain gcimagebundle distro support better in our documentation.

I hope that Jimmy and Venkatesh clarified any questions about qemu setup and flags. 

I'd also recommend to check that your guest Linux kernel is at very minimum 3.8 [or newer].

Best Regards,
Alex



For more options, visit https://groups.google.com/groups/opt_out.

Jimmy Kaplowitz

unread,
Feb 20, 2014, 11:28:51 PM2/20/14
to Alex Gaysinsky, Tito Valentin, gce-dis...@googlegroups.com
On Thu, Feb 20, 2014 at 8:12 PM, Alex Gaysinsky <gays...@google.com> wrote:
I'd also recommend to check that your guest Linux kernel is at very minimum 3.8 [or newer]

Since I know Ubuntu 12.04 LTS defaults to an older kernel, I want to address some likely confusion: Any kernel with the necessary hardware support should work, but Alex is right to recommend a 3.8 or newer kernel because of various performance improvements, features, and bugfixes. That said, some of these performance improvements, features, and bugfixes are backported by Linux distribution vendors to older kernels. We have no way of knowing what Ubuntu has or hasn't backported to the version you're using; determining that is not something we can help with. You may wish to see if Ubuntu offers a newer kernel for use with Ubuntu 12.04 LTS.

- Jimmy

Tito Valentin

unread,
Feb 21, 2014, 4:20:30 AM2/21/14
to gce-dis...@googlegroups.com
Thank you all for all of the feedback. I have a lot of trial/error to do here. Even with the pull request for the manifest.py file within Git, I still got the url error when running gcimagebundle:

urllib2.URLError: <urlopen error [Errno -2] Name or service not known>

I tried to get this done on GCE as suggested but it was painfully slow. Took a little over 2 hours to get a Ubuntu image base installed as a VM using qemu. I first had to install gnome with VNC on GCE and give myself the proper access. The entire process just seems more trouble than what it's worth since there is no direct guidance for this process. I am not discouraged but don't think the involvement to get an image installed is worth it at the moment. This issue is actually me just trying to get a successful image to build with gcimagebundle. I haven't even gotten to the point to upload to gs to try it.

In short, I can get an install going with qemu but once installed, I can't ever boot into the OS to get it tuned/tweaked for GCE. It gets stuck in the image I provided in an earlier post. The only options I have left is to try to install again with VMware Fusion or Virtualbox and then convert the vmdk to raw disk, then try to bundle from there, if possible...sigh

On Monday, February 3, 2014 5:08:16 PM UTC-5, Vaidas Jablonskis wrote:

Jimmy Kaplowitz

unread,
Feb 21, 2014, 5:12:56 AM2/21/14
to Tito Valentin, gce-dis...@googlegroups.com

At this point I'm going to have step back and simply give you my best wishes in the trial and error phase. In-depth from-scratch image creation assistance is beyond the scope of the assistance we can provide here.

Good luck!

- Jimmy

--
© 2013 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages