Bug 822723 - virt-install problem
virt-install problem
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-virtinst (Show other bugs)
6.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Cole Robinson
Virtualization Bugs
:
: 846890 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-17 18:57 EDT by mnobile
Modified: 2012-08-08 23:12 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-08 17:33:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
KVM Debug log ran on jun 7 (326.12 KB, application/octet-stream)
2012-06-07 02:31 EDT, mnobile
no flags Details

  None (edit)
Description mnobile 2012-05-17 18:57:09 EDT
Description of problem:
I'm using centos and trying to install a virt machine under KVM using the command line. I have 4 running right now that i installed through the gui. I can even install through the kickstarterfile in the gui.

However when i try to install in the command prompt i get these errors
this is from tail -f /var/log/messages
kvm: 5964: cpu unimplemented perfctr wrmsr 0xc1 data 0x0
kvm: 5964: cpu unimplemented perfctr wrmsr 0x186 data 0x130079
kvm: 5964: cpu unimplemented perfctr wrmsr 0xc1 data 0xffd74fa0
kvm: 5964: cpu unimplemented perfctr wrmsr 0x186 data 0x530079


the command that i use to install is this

virt-install -n tester3.example.com -r 1500 --disk path=/home/user/KVM/images/tester3.example.com.img,size=20 -l /home/user/RHSCA/CentOS-6.0.iso

i have tried virt-install --prompt, and also the above virt-install command with a kickstart file changing the locations and adding the -x flag as well.

[edit]
the only help i found on google was this website http://wiki.atollon.com/en/tech/KVM i followed the "solution" and typed
yum upgrade kernel kvm kvm-kmod kvm-tools
reboot
and still no luck....

Please help guys

Version-Release number of selected component (if applicable):
6.2

How reproducible:
in command prompt, it works in the GUI

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 2 yuping zhang 2012-05-25 02:52:46 EDT
Hi,

What's the version you used?
#rpm -q kernel qemu-kvm libvirt python-virtinst

I can install guest successfully on RHEL environment with virt-install and virt-manager without any erros:
# virt-install -n test -r 1500 --disk path=/var/lib/libvirt/images/rhel6.2 -c /tmp/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso

Since virt-install is python-virtinst command,I change the component to python-virtinst.
Comment 3 mnobile 2012-05-28 16:42:05 EDT
(In reply to comment #2)
> Hi,
> 
> What's the version you used?
> #rpm -q kernel qemu-kvm libvirt python-virtinst
> 
> I can install guest successfully on RHEL environment with virt-install and
> virt-manager without any erros:
> # virt-install -n test -r 1500 --disk path=/var/lib/libvirt/images/rhel6.2
> -c /tmp/en_windows_7_ultimate_with_sp1_x64_dvd_618240.iso
> 
> Since virt-install is python-virtinst command,I change the component to
> python-virtinst.

yuping zhang,

i have ran the following command
rpm -q kernel qemu-kvm libvirt python-virtinst
and here is the output from the command

kernel-2.6.32-71.el6.x86_64
kernel-2.6.32-220.2.1.el6.x86_64
kernel-2.6.32-220.13.1.el6.x86_64
kernel-2.6.32-220.17.1.el6.x86_64
qemu-kvm-0.12.1.2-2.209.el6_2.5.x86_64
libvirt-0.9.4-23.el6_2.8.x86_64
python-virtinst-0.600.0-5.el6.noarch


let me know if you need any other information. thanks!!
Comment 4 yuping zhang 2012-05-31 05:44:55 EDT
> 
> i have ran the following command
> rpm -q kernel qemu-kvm libvirt python-virtinst
> and here is the output from the command
> 
> kernel-2.6.32-71.el6.x86_64
> kernel-2.6.32-220.2.1.el6.x86_64
> kernel-2.6.32-220.13.1.el6.x86_64
> kernel-2.6.32-220.17.1.el6.x86_64
> qemu-kvm-0.12.1.2-2.209.el6_2.5.x86_64
> libvirt-0.9.4-23.el6_2.8.x86_64
> python-virtinst-0.600.0-5.el6.noarch
> 
> 
> let me know if you need any other information. thanks!!

Hi mnobile,

That should be work.
Can you please try this command?
#virt-install -n demo -r 1024 -f /var/lib/libvirt/images/demo.img -s 5 -c /home/share/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso

Yuping
Comment 5 mnobile 2012-06-07 00:10:51 EDT
> 
> Hi mnobile,
> 
> That should be work.
> Can you please try this command?
> #virt-install -n demo -r 1024 -f /var/lib/libvirt/images/demo.img -s 5 -c
> /home/share/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.
> iso
> 
> Yuping


Yuping,

i have taken your advice and ran the following commands here

virt-install -n tester3.example.com -r 1500 -f/home/user/KVM/images/tester3.example.com.img -s 20 -c /home/user/RHSCA/CentOS-6.0.iso

no luck here.

i thought maybe i was having permission issues, so i have a dvd centos 6.0 i stuck it and ran the following command

virt-install -n tester3.example.com -r 1500 --disk path=/home/user/KVM/images/tester3.example.com.img,size=20 --cdrom /dev/cdrom/

no luck again, infact i get a new error with that one
 boot failed: could not read from cdrom (code 003)

i do not think i am being specific enough when this error occurs, i get to the welcome to centos screen and then when i press enter to install  it attempts to load vmlinuz......the errors appear then. here is a link to Imgur to help clarify. 
https://imgur.com/a/VhqoH
Comment 6 zhe peng 2012-06-07 01:34:56 EDT
(In reply to comment #5)
> > 
> > Hi mnobile,
> > 
> > That should be work.
> > Can you please try this command?
> > #virt-install -n demo -r 1024 -f /var/lib/libvirt/images/demo.img -s 5 -c
> > /home/share/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.
> > iso
> > 
> > Yuping
> 
> 
> Yuping,
> 
> i have taken your advice and ran the following commands here
> 
> virt-install -n tester3.example.com -r 1500
> -f/home/user/KVM/images/tester3.example.com.img -s 20 -c
> /home/user/RHSCA/CentOS-6.0.iso
> 
> no luck here.
> 
> i thought maybe i was having permission issues, so i have a dvd centos 6.0 i
> stuck it and ran the following command

do this maybe resolve the issue:
chown qemu:qemu /home/user/RHSCA

> 
> virt-install -n tester3.example.com -r 1500 --disk
> path=/home/user/KVM/images/tester3.example.com.img,size=20 --cdrom
> /dev/cdrom/
> 
> no luck again, infact i get a new error with that one
>  boot failed: could not read from cdrom (code 003)
> 
> i do not think i am being specific enough when this error occurs, i get to
> the welcome to centos screen and then when i press enter to install  it
> attempts to load vmlinuz......the errors appear then. here is a link to
> Imgur to help clarify. 
> https://imgur.com/a/VhqoH

you can add --debug in virt-install command,and paste output log here,so dev. 
can help your to investigate the issue, thanks.
Comment 7 mnobile 2012-06-07 02:31:41 EDT
Created attachment 590099 [details]
KVM Debug log ran on jun 7

here is the debug log since i installed the system in jan. If you "grep for Jun" it is not nearly as big. Also between the timestamp of June 6-June 7 i created a virt machine successfully in the GUI it was called tester3.example.com
the rest should be me trying to create a virt machine in the command prompt.
Thanks
Comment 8 zhe peng 2012-06-07 22:47:00 EDT
Hi mnobile
  I have saw your guest xml file, all without graphics element,if you set no graphical console,you need to have a text console configured on the first serial port in the guest, can use --extra-args with kickstart file,but in only used with -l, if using iso, you can try below command:
get vmlinuz and initrd.img first and run
# virt-install -n test -r 1024 -f /var/lib/libvirt/test.img -s 10 --nographics --boot kernel=/tmp/vmlinuz,initrd=/tmp/initrd.img,kernel_args="console=ttyS0" --serial pty -c /home/redhat/CentOS-6.2-x86_64-minimal.iso 

BTW,if you want to use vnc or spice, can add this: --graphics vnc or --graphics spice
hope this can help you, thanks.
Comment 9 mnobile 2012-06-18 21:22:32 EDT
WOOT it worked!!!
Thank you thank you so much

Yes I am trying to install without VNC with the CLI only. I didn't understand all the options that i had. I thought that it would install but i see that it automaticly defaults to vnc if certain packages are installed "GUI" I have been working on this for months on and off.

So the command that i ran to make this work with no problems at all is this 

virt-install -n tester123.example.com -r 1500 -f /home/user/KVM/images/tester123.example.com.img -s 20 --nographics -l /home/mnobile/RHCSA/CentOS6.0.iso -x "console=ttyS0"

and that command worked fine no problems at all.

i still have a couple more questions if you could help me out though. 
when you are connected to the KVM with a command like virsh console tester123.example.com
can change to other terminals like you can on the host example:"ctrl+alt+f2"


I was wondering if there are any tutorials that you know of to help me learn more about KVM, and or online labs... something like that.

Thanks again.
Comment 10 Ian Kent 2012-08-08 23:12:12 EDT
*** Bug 846890 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.