"Permission denied" while creating image

535 views
Skip to first unread message

Shruti Rane

unread,
Jan 7, 2015, 1:42:10 AM1/7/15
to euca-...@eucalyptus.com
Hi all,

I am trying to create my own image, but virt-install is giving "permission denied" error.

 # virt-install --name netbsd1 --ram 1024 --os-type linux -c amd64cd-5.1.iso --disk path=/root/netbsd1.img,device=disk,bus=virtio --graphics vnc,listen=0.0.0.0 --force

Starting install...
ERROR    internal error Process exited while reading console log output: char device redirected to /dev/pts/1
2015-01-07T06:29:23.912077Z qemu-kvm: -drive file=/root/netbsd1.img,if=none,id=drive-virtio-disk0,format=raw,cache=none: could not open disk image /root/netbsd1.img: Permission denied

Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start netbsd1
otherwise, please restart your installation.

Permissions are 755
#ls -l amd64cd-5.1.iso
-rwxr-xr-x. 1 qemu qemu 252114944 Jan  6 12:36 amd64cd-5.1.iso
# ls -l netbsd1.img
-rwxr-xr-x. 1 root root 5368709120 Jan  6 13:26 netbsd1.img


Also,
Is there any process to convert .iso image file into .raw file? I am tring to build my image since emis.eucalyptus.com dosen't have required image.

Park, Sang-Min

unread,
Jan 7, 2015, 7:47:27 AM1/7/15
to Shruti Rane, euca-...@eucalyptus.com
Have you checked our image-guide docs?
https://www.eucalyptus.com/docs/eucalyptus/4.0.2/index.html#image-guide/img_task_install_os_to_image.html

-------------------
Sang-Min Park – Software Engineer
HP Helion Cloud
--
You received this message because you are subscribed to the Google Groups "Eucalyptus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to euca-users+...@eucalyptus.com<mailto:euca-users+...@eucalyptus.com>.
To post to this group, send email to euca-...@eucalyptus.com<mailto:euca-...@eucalyptus.com>.
Visit this group at http://groups.google.com/a/eucalyptus.com/group/euca-users/.

Jason Kennedy

unread,
Jan 7, 2015, 10:48:36 AM1/7/15
to Eucalyptus Users

Shruti,

The issue that you're seeing relates to that virt-install can't get into /root due to permissions. Move your .img to / or someplace more public, and it should work.

In regards to converting .iso to .raw, yes! You'll want to do this (example is Ubuntu):

 qemu-img convert -O raw ubuntu.img ubuntu.raw

 Hope that helps!


--

Shruti Rane

unread,
Jan 7, 2015, 11:02:34 PM1/7/15
to Kennedy, Jason, Park, Sang-Min, euca-...@eucalyptus.com
Hi,

I tried qemu-img convert, but after creating emi and running instance with it, console output shows "Booting from harddisk" and fails.

On Wed, Jan 7, 2015 at 9:16 PM, Kennedy, Jason <jken...@hp.com> wrote:
Shruti,

The issue that you're seeing relates to that virt-install can't get into /root due to permissions. Move your .img to / or someplace more public, and it should work.

In regards to converting .iso to .raw, yes! You'll want to do this (example is Ubuntu):

qemu-img convert -O raw ubuntu.img ubuntu.raw

Hope that helps!

Jason Kennedy
Cloud Engineer 
HP Helion Eucalyptus

hp.com/helion
To unsubscribe from this group and stop receiving emails from it, send an email to euca-users+...@eucalyptus.com.
To post to this group, send email to euca-...@eucalyptus.com.

Shruti Rane

unread,
Jan 8, 2015, 12:30:19 AM1/8/15
to Kennedy, Jason, Park, Sang-Min, euca-...@eucalyptus.com
These are the steps which I followed:


# qemu-img convert -O raw ubuntunew.img ubuntunew.raw

#ls -l
-rwxrwxrwx. 1 root root 8589934592 Jan  8 10:20 ubuntunew.img
-rw-r--r--. 1 root root 8589934592 Jan  8 10:24 ubuntunew.raw

# euca-install-image -i ubuntunew.raw --name myubuntunew --virtualization-type hvm -r x86_64 -b myubuntunew-bucket
/var/tmp/bundle-_2Iz7K/ubuntunew.raw.part.00 100% |===============================================================================|   7.95 MB  23.69 MB/s Time: 0:00:00
/var/tmp/bundle-_2Iz7K/ubuntunew.raw.manifest.xml 100% |==========================================================================|   3.31 kB   1.53 kB/s Time: 0:00:02
IMAGE    emi-364321CF

# euca-describe-instances
RESERVATION    r-78D9BCC5    129218636875    default
INSTANCE    i-F34F267F    emi-364321CF    10.212.8.98    172.31.254.44    running    key115    0        m1.xlarge    2015-01-08T05:03:21.723Z    CLUSTER01                monitoring-disabled    10.212.8.98    172.31.254.44            instance-store                    hvm        sg-0CA93D4F                x86_64
TAG    instance    i-F34F267F    euca:node    172.31.252.1
# euca-get-console-output i-F34F267F
i-F34F267F

^[[1;256r^[[256;256H^[[6n
Google, Inc.
Serial Graphics Adapter 12/07/11
SGABIOS $Id: sgabios.S 8 2010-04-22 00:03:40Z nlaredo $ (mock...@c6b18n1.dev.centos.org) Wed Dec  7 17:04:47 UTC 2011
Term: 80x24
4 0
SeaBIOS (version seabios-0.6.1.2-28.el6)
Machine UUID 6a8f3aba-91a7-ce33-5131-92ddf0746cd4


gPXE (http://etherboot.org) - 00:03.0 C100 PCI2.10 PnP BBS PMM3FE0@10 C100
                                                                              

Booting from Hard Disk...
Boot failed: not a bootable disk

Booting from ROM...
gPXE (PCI 00:03.0) starting execution
gP^HPX^HXE^HE ^H i^Hin^Hni^Hit^Hti^Hia^Hal^Hli^His^Hsi^Hin^Hng^Hg ^H d^Hde^Hev^Hvi^Hic^Hce^Hes^Hs.^H..^H..^H.



g^[[40;37;1mP^[[m^HP^[[40;37;1mX^[[m^HX^[[40;37;1mE^[[m^HE^[[40;37;1m ^[[m^H ^[[40;37;1m0^[[m^H0^[[40;37;1m.^[[m^H.^[[40;37;1m9^[[m^H9^[[40;37;1m.^[[m^H.^[[40;37;1m7^[[m^H7 ^H -^H--^H- ^H O^HOp^Hpe^Hen^Hn ^H S^HSo^Hou^Hur^Hrc^Hce^He ^H B^HBo^Hoo^Hot^Ht ^H F^HFi^Hir^Hrm^Hmw^Hwa^Har^Hre^He ^H -^H--^H- ^H ^[[40;36;22mh^[[m^Hh^[[40;36;22mt^[[m^Ht^[[40;36;22mt^[[m^Ht^[[40;36;22mp^[[m^Hp^[[40;36;22m:^[[m^H:^[[40;36;22m/^[[m^H/^[[40;36;22m/^[[m^H/^[[40;36;22me^[[m^He^[[40;36;22mt^[[m^Ht^[[40;36;22mh^[[m^Hh^[[40;36;22me^[[m^He^[[40;36;22mr^[[m^Hr^[[40;36;22mb^[[m^Hb^[[40;36;22mo^[[m^Ho^[[40;36;22m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^Hio^Hon^Hn ^H t^Hti^Him^Hme^Hed^Hd ^H o^Hou^Hut^Ht ^H (^H(0^H0x^Hx4^H4c^Hc1^H10^H06^H60^H03^H35^H5)^H)
No^Ho ^H m^Hmo^Hor^Hre^He ^H n^Hne^Het^Htw^Hwo^Hor^Hrk^Hk ^H d^Hde^Hev^Hvi^Hic^Hce^Hes^Hs

Booting from Floppy...^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H  ^H
Boot failed: could not read the boot disk

No bootable device.



Shruti Rane

unread,
Jan 11, 2015, 11:07:06 PM1/11/15
to Kennedy, Jason, Park, Sang-Min, euca-...@eucalyptus.com
Yes it was netBSD image, but then I tried with centos image and it worked. It worked then.
Thank you


On Sat, Jan 10, 2015 at 3:50 AM, Kennedy, Jason <jken...@hp.com> wrote:

What image are you working from? Was it prepped properly? It’s a netBSD image?

 

Jason Kennedy

Cloud Engineer 

HP Helion Eucalyptus

cid:4A8F788A-1922-43FB-B393-4E7352311BBA

hp.com/helion

Facebook Twitter Google Plus Youtube Linkedin

 

From: Shruti Rane [mailto:shrut...@gmail.com]
Sent: Wednesday, January 7, 2015 9:30 PM
To: Kennedy, Jason
Cc: Park, Sang-Min; euca-...@eucalyptus.com
Subject: Re: "Permission denied" while creating image

 

These are the steps which I followed:

Reply all
Reply to author
Forward
0 new messages