Fail to create disk.img
Hi folks,
Ubuntu 8.04 server amd64 - host - headless (w/o X packages) Ubuntu 6.06 server amd64 - guest - headless (w/o X packages) KVM
Previously I ran;
# qemu-img create -f qcow2 disk.img 10G
then
# kvm -hda disk.img -cdrom /dev/scd0 -m 512 -boot d
to create a working disk.img. It works on the VM.
But I couldn't create direct on running;
# kvm -hda disk.img -cdrom /dev/scd0 -m 512 -boot d
must be in 2 steps.
Now I tried creating another disk.img but the above steps did not work.
# qemu-img create -f qcow2 ubuntu6.06_080805.img 10G Formatting 'ubuntu6.06_080805.img', fmt=qcow2, size=10485760 kB
# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2
=======================| DirectFB 1.0.1 |=======================
(c) 2001-2007 The DirectFB Organization (directfb.org)
(c) 2000-2004 Convergence (integrated media) GmbH
------------------------------------------------------------(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) (*) Direct/Memcpy: Using libc memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed
--> No such file or directory
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
--> Initialization error!
Could not initialize SDL - exiting
* end *
without "-smp 2" still the same.
I don't know what mistake I have committed. I didn't done anything on the host except running apt-get update/upgrade. Please advise.
TIA
B.R.
Stephen L
Send instant messages to your online friends http://uk.messenger.yahoo.com
Quoted 1 line · Stephen Liu
must be in 2 steps.
Correct, as far as I know you have to use qemu-img.
Quoted 1 line
Could not initialize SDL - exiting
Maybe this is your problem.
Quoted 25 lines · Stephen Liu
Hi folks,
Ubuntu 8.04 server amd64 - host - headless (w/o X packages) Ubuntu 6.06 server amd64 - guest - headless (w/o X packages) KVM
# qemu-img create -f qcow2 ubuntu6.06_080805.img 10G Formatting 'ubuntu6.06_080805.img', fmt=qcow2, size=10485760 kB# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 =======================| DirectFB 1.0.1 |======================= (c) 2001-2007 The DirectFB Organization (directfb.org) (c) 2000-2004 Convergence (integrated media) GmbH ------------------------------------------------------------(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) (*) Direct/Memcpy: Using libc
memcpy()(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed--> No such file or directory(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
Quoted 6 lines
--> Initialization error!Could not initialize SDL - exiting
* end *without "-smp 2" still the same.
Does xterm work ?
Try adding "-vnc :9" and connect with a vnc viewer, or use xauth (or ssh -X) to set permissions to run with SDL.
Quoted 30 lines · --- Uri Lublin
Quoted 6 lines · Stephen Liu
Quoted 2 lines
# qemu-img create -f qcow2 ubuntu6.06_080805.img 10GFormatting 'ubuntu6.06_080805.img', fmt=qcow2, size=10485760 kB
# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d-smp 2
Quoted 1 line
=======================| DirectFB 1.0.1|=======================
Quoted 3 lines
(c) 2001-2007 The DirectFB Organization (directfb.org) (c) 2000-2004 Convergence (integrated media) GmbH------------------------------------------------------------
Quoted 7 lines
(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) (*) Direct/Memcpy: Using libc
memcpy()
(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed--> No such file or directory(!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER
environment
Quoted 7 lines
variable.
(!) DirectFB/Core: Could not initialize 'system' core!--> Initialization error!Could not initialize SDL - exiting
* end *
Quoted 3 lines
Quoted 1 line
without "-smp 2" still the same.
Does xterm work ?
Hi Uri,
Yes, it is working. I'm configuring the server remotely.
Quoted 1 line
Try adding "-vnc :9"
# kvm -hdb ubuntu6.06_20080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 -vnc :9
It is hanging here,
Quoted 1 line
and connect with a vnc viewer,
$ vncviewer 192.168.0.110:9
VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 16:58:22 Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
The viewer did not start
$ vncviewer 192.168.0.110:9 1024x768
VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 16:58:22 Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Viewer started;
VNC Viewer: Information
unable to resolve host by name: Connection timed out (110) [OK]
clicking [OK] the viewer closed.
Tue Aug 5 17:24:56 2008
main: unable to resolve host by name: Connection timed out
(110)
- end -
Quoted 3 lines
or use xauth (or
ssh -X) to
set permissions to run with SDL.
Please explain in detail how to do that? TIA
B.R.
Stephen
Send instant messages to your online friends http://uk.messenger.yahoo.com
Quoted 52 lines · Stephen Liu
Quoted 27 lines · --- Uri Lublin
Quoted 5 lines · Stephen Liu
Quoted 1 line
# qemu-img create -f qcow2 ubuntu6.06_080805.img 10GFormatting 'ubuntu6.06_080805.img', fmt=qcow2, size=10485760 kB
# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d-smp 2
Quoted 1 line
=======================| DirectFB 1.0.1|=======================
Quoted 3 lines
(c) 2001-2007 The DirectFB Organization (directfb.org) (c) 2000-2004 Convergence (integrated media) GmbH------------------------------------------------------------
Quoted 5 lines
(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) (*) Direct/Memcpy: Using libc
memcpy()(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed--> No such file or directory(!) DirectFB/FBDev: Error opening framebuffer device! (!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER
environment
Quoted 7 lines
variable.
(!) DirectFB/Core: Could not initialize 'system' core!--> Initialization error!Could not initialize SDL - exiting
* end *Quoted 2 lines
Quoted 1 line
without "-smp 2" still the same.
Does xterm work ?
Yes, it is working. I'm configuring the server remotely.
Quoted 1 line
Try adding "-vnc :9"
# kvm -hdb ubuntu6.06_20080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 -vnc :9It is hanging here,
Quoted 1 line
and connect with a vnc viewer,
$ vncviewer 192.168.0.110:9VNC Viewer Free Edition 4.1.1 for X - built Sep 10 2007 16:58:22 Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Quoted 8 lines
The viewer did not start
Quoted 2 lines
or use xauth (or
ssh -X) to set permissions to run with SDL.Please explain in detail how to do that? TIA
I thought it might be something with X permissions, but it is not.
Quoted 3 lines · Stephen Liu
# kvm -hda disk.img -cdrom /dev/scd0 -m 512 -boot dto create a working disk.img. It works on the VM.
No. We've been through all of this just a few days ago. If you don't tell kvm differently, it will attempt to use SDL (which uses X). You probably want to use -vnc <something>.
Please take a minute to look at documentation and to read error messages before you start a thread here. There are *many* subscribers to this list, most of whom are very busy people. When you post here, you're taking time out of everyone's day to read your questions. Please keep that in mind before posting.
Signature · 3 lines
Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/
Quoted 5 lines · Stephen Liu
Quoted 1 line
Try adding "-vnc :9"
# kvm -hdb ubuntu6.06_20080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 -vnc :9It is hanging here,
You absolutely must be kidding.
It has only been 7 days since this was all explained to you once:
http://thread.gmane.org/gmane.comp.emulators.kvm.devel/20004
You've been told how to use kvm's built-in VNC server. You've been told that it is not hanging; it is simply running in the background. Please reread that thread, and think very thoroughly before you ask questions. I find your behaviour quite rude.
Quoted 2 lines
Quoted 1 line
or use xauth (or ssh -X) to set permissions to run with SDL.
Please explain in detail how to do that? TIA
Are you familiar with man? It will show you documentation for most commands available on your linux system. For example "man ssh" will show you the man page for ssh. On that page, you will see a bit of explanation of what the "-X" option does. At the bottom of the man page, you'll see references to other ssh related man page, which might explain things in more detail. This might not explain everything, but at the very least, please have the courtesy to read everything you can about the subject before bothering everyone else with your questions, and then be *very* specific about what you don't understand.
Signature · 3 lines
Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/
Quoted 24 lines · Stephen Liu
Hi folks,
Ubuntu 8.04 server amd64 - host - headless (w/o X packages) Ubuntu 6.06 server amd64 - guest - headless (w/o X packages) KVM
# qemu-img create -f qcow2 ubuntu6.06_080805.img 10G Formatting 'ubuntu6.06_080805.img', fmt=qcow2, size=10485760 kB# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 =======================| DirectFB 1.0.1 |======================= (c) 2001-2007 The DirectFB Organization (directfb.org) (c) 2000-2004 Convergence (integrated media) GmbH ------------------------------------------------------------(*) DirectFB/Core: Single Application Core. (2008-04-08 15:15) (*) Direct/Memcpy: Using libc
memcpy()(!) Direct/Util: opening '/dev/fb0' and '/dev/fb/0' failed--> No such file or directory(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system' core!
Quoted 7 lines
--> Initialization error!Could not initialize SDL - exiting
* end *without "-smp 2" still the same.
Look at the thread below, does it help ?
http://www.mail-archive.com/[email protected]/msg04447.html
http://www.mail-archive.com/[email protected]/msg04449.html
http://www.mail-archive.com/[email protected]/msg04451.html
--- Uri Lublin <[email protected]> wrote:
- snip -
Quoted 3 lines
Look at the thread below, does it help ?
http://www.mail-archive.com/[email protected]/msg04447.html
Quoted 1 line
http://www.mail-archive.com/[email protected]/msg04449.html
Quoted 1 line
http://www.mail-archive.com/[email protected]/msg04451.html
Hi Uri and folks.
Thanks for your advice.
I found the cause. It was iptables. After flushing all rules, the problem gone.
Xterm-1
# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 -vnc :9 (starting)
Xterm-2
$ vncviewer 192.168.0.110:9
viewer popup and installation began. After finish it reboots.
However on Xterm-1
it popup ;-
kvm_run: failed entry, reason 65535kvm_run returned -8
Testing:-
Xterm-1
Ran
# kvm ubuntu6.06_080805.img -vnc :0 Starting
Xterm-2
$ vncviewer 192.168.0.110:0
viewer starts displaying;
.....
Booting the kernel
.....
Alert! /dev/hdb1 does not exist. Dropping to a shell!
BusyBox v1.01 (Debian 1:1.01-4ubuntu3) Built-in shell (ash) Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty: job control turned off
#
* end *
Any mistake committed? Please advice. TIA
Remark: AMD dual core CPU
B.R.
Stephen
Send instant messages to your online friends http://uk.messenger.yahoo.com
Quoted 2 lines · Stephen Liu
# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d -smp 2 -vnc :9 (starting)
Here, you're attaching your disk image to /dev/hdb.
Quoted 1 line
# kvm ubuntu6.06_080805.img -vnc :0
Here... not so much.
Quoted 5 lines
viewer starts displaying;
.....
Booting the kernel
.....
Alert!/dev/hdb1does not exist. Dropping to a shell!
Obviously, since what you called /dev/hdb during installation is now /dev/hda.
Signature · 3 lines
Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/
Re: Fail to create disk.img (SOLVED)
Quoted 10 lines · --- Soren Hansen
Quoted 1 line · Stephen Liu
# kvm -hdb ubuntu6.06_080805.img -cdrom /dev/scd0 -m 512 -boot d-smp
Quoted 1 line
2 -vnc :9 (starting)
Here, you're attaching your disk image to
/dev/hdb.Quoted 1 line
# kvm ubuntu6.06_080805.img -vnc :0Here... not so much.
Hi Soren,
I got it. Thanks
Xterm-1
# kvm -hdb ubuntu6.06_080805.img -vnc :0 starting
Xterm-2
$ vncviewer 192.168.0.110:0
Viewer starts. Also Ubuntu6.06 start to boot. Finally I can login as user as well as root.
In these couple days I made heavy googling and found many documents. Because I can't get the guest to ping website (it can update/upload files on repo). However the more I read more confuse I'm.
If creating the disk.img running;
$ sudo kvm -hda disk.img -cdrom ........
I can start the guest with;
$ kvm disk.img ip-address..... (without -hda)
If creating the disk.img running;
$ sudo kvm -hdb disk.img -cdrom ......
I must run;
$ kvm -hdb disk.img ip-address..... (must add -hdb)
I'm NOT very clear, WHY?
I'm following;
https://help.ubuntu.com/community/KVM#Creating%20a%20network%20bridge%20on%20the%20host
trying to sort out the problem on networking
On running
$ sudo kvm-bridge -m 512 -hdb disk.img -cdrom /dev/scd0 -boot d -smp 2 nohup: appending output to `nohup.out'
It always appends output to `nohup.out'
I'm still struggling.
B.R.
Stephen
Quoted 8 lines
Quoted 5 lines
viewer starts displaying;
.....
Booting the kernel
.....
Alert!/dev/hdb1does not exist. Dropping to a shell!Obviously, since what you called
/dev/hdbduring installation is now/dev/hda.
Send instant messages to your online friends http://uk.messenger.yahoo.com
Re: Fail to create disk.img (SOLVED)
Quoted 5 lines · Stephen Liu
In these couple days I made heavy googling and found many documents. Because I can't get the guest to ping website (it can update/upload files on repo). However the more I read more confuse I'm.
Quoted 8 lines
If creating the disk.img running;
$ sudo kvm -hda disk.img -cdrom ........I can start the guest with;
$ kvm disk.img ip-address..... (without -hda)
A disk image corresponds exactly to a hard drive. If you do "-hdb disk.img", it corresponds to connecting a hard drive as primary slave to your virtual machine. If you do "-hda disk.img" or just "disk.img", you're connecting it as primary master.
Quoted 11 lines
I'm following;
https://help.ubuntu.com/community/KVM#Creating%20a%20network%20bridge%20on%20the%20hosttrying to sort out the problem on networking
On running
$ sudo kvm-bridge -m 512 -hdb disk.img -cdrom /dev/scd0 -boot d -smp 2 nohup: appending output to `nohup.out'It always appends output to `nohup.out'
What is the problem?
Signature · 3 lines
Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/
Re: Fail to create disk.img (SOLVED)
In reply to a message not in the archiveQuoted 6 lines · Stephen Liu
Quoted 5 lines
Quoted 4 lines
On running $ sudo kvm-bridge -m 512 -hdb disk.img -cdrom
/dev/scd0-boot d -smp 2
nohup: appending output to `nohup.out'
It always appends output to `nohup.out'What is the problem?
Hi Soren,
Hello.
Quoted 1 line
What I have been trying around is to solve networking problem on VM.
How is that related to appending output to nohup.out?
Quoted 4 lines
However it is quite slow on booting and on starting other Window applications as well. IIRC during installing KVM packages I came across a document on Internet informing me to install a package qemu-??? (something like that).
I have no clue as to what this might be.
Quoted 4 lines
Following packages have been installed on Host
kqemu-common
kqemu-source
kqemu-modules
kqemu has nothing to do with kvm. It's a different means for "accelerating" qemu.
Quoted 11 lines
Each time to start Vista I have to run;
# kvm -hdb vista.img -cdrom /dev/scd0 -m 1024 -vnc :1and put the Vista installer on CDRom. The above command was run by me creating vista.img
If running;
# kvm vista.img -vnc :1I can't start Vista.
Stephen, this shall be my last e-mail to you.
Having to explain everything multiple times is tiring, and a very poor use of my (or anyone's) time. This particular issue, I've already explained twice; both times in this thread. Last time was in the very e-mail to which you have just responded. I find it mind boggling that I need to remind you that this list is read by many people, most of whom are very busy. Yet you have the audacity to ask the same questions and report the same "problems" over and over. I shall not allow you to steal any more of my time, so you have just become only the second person ever to be redirected to /dev/null (in case you don't know what /dev/null is, it's where I keep all my very special e-mail).
For the third time: When you put "-hdb vista.img" on your command line, you're attaching vista.img as primary slave. If you put "-hda vista.img" or just "vista.img" you're attaching it as primary master. Very few bootloaders will be happy about being installed in one place only to be moved to another place when actually booting. It seems Vista's bootloader is no different.
Signature · 3 lines
Soren Hansen | Virtualisation specialist | Ubuntu Server Team Canonical Ltd. | http://www.ubuntu.com/