Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
kvm installation on CentOS7
06-08-2018, 04:07 PM
Post: #31
RE: kvm installation on CentOS7
[quote='rayluk' pid='72153' dateline='1525854768']
A problem is observed when creating a new VM

Code:
[root@tetra ~]# virt-install --virt-type=kvm --name=centos72 --vcpus=2 --memory=4096 --cdrom /thinker/dstore/DStorage/software/autation/CentOS/7/ISO/CentOS-7.iso --network bridge=br0 --os-type=linux --disk size=16,format=rawWARNING  No operating system detected, VM performance may suffer. Specify an OS with --os-variant for optimal results.
WARNING  Unable to connect to graphical console: virt-viewer not installed. Please install the 'virt-viewer' package.
WARNING  No console to launch for the guest, defaulting to --wait -1

Starting install...
Allocating 'centos72.img'                                                                                              |  16 GB  00:00:00    
ERROR    internal error: qemu unexpectedly closed the monitor: qemu: could not load PC BIOS 'bios-256k.bin'
Removing disk 'centos72.img'                                                                                           |    0 B  00:00:00    
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start centos72
otherwise, please restart your installation.


When I use virt-install, I got Error like below
Code:
virt-install --virt-type=kvm --name=centos72 --vcpus=2 --memory=4096 --cdrom /root/CentOS-7.iso --network bridge=br0 --os-type=linux --disk size=16,format=raw

Code:
ERROR    unsupported configuration: CPU mode 'custom' for x86_64 kvm domain on x86_64 host is not supported by hypervisor
Find all posts by this user
Quote this message in a reply
06-08-2018, 04:26 PM
Post: #32
RE: kvm installation on CentOS7
@changxy

After copying the bios-256k.bin from tbg15, I can start the installation by the following command. I have leave a screen named ray in tetra. Please have a look. After the installation, you can continue on the test. You may assume the bios-256k.bin problem will get solved so don't worry about it.
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /root/CentOS-7.iso -hda /thinker/local/vms/rayluk-kvm/vmdisk0
Find all posts by this user
Quote this message in a reply
06-08-2018, 05:06 PM
Post: #33
RE: kvm installation on CentOS7
(06-08-2018 04:26 PM)rayluk Wrote:  @changxy

After copying the bios-256k.bin from tbg15, I can start the installation by the following command. I have leave a screen named ray in tetra. Please have a look. After the installation, you can continue on the test. You may assume the bios-256k.bin problem will get solved so don't worry about it.
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /root/CentOS-7.iso -hda /thinker/local/vms/rayluk-kvm/vmdisk0
QE

I have done the copy before, and for the last Error I think it is because I lack the QEMU package.
After I installed the package, the Error became like:
Code:
Starting install...
Allocating 'centos72.img'                                                                                                              |  16 GB  00:00:00    
ERROR    internal error: qemu unexpectedly closed the monitor: 2018-06-08T09:02:14.689528Z qemu-kvm: -drive file=/root/CentOS-7.iso,format=raw,if=none,id=drive-ide0-0-1,readonly=on: could not open disk image /root/CentOS-7.iso: Could not open '/root/CentOS-7.iso': Permission denied
Removing disk 'centos72.img'                                                                                                           |    0 B  00:00:00    
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start centos72
otherwise, please restart your installation.

I have searched on the Internet, still can't tell why.
Find all posts by this user
Quote this message in a reply
06-08-2018, 05:35 PM (This post was last modified: 06-08-2018 06:49 PM by changxy.)
Post: #34
RE: kvm installation on CentOS7
(06-08-2018 05:06 PM)changxy Wrote:  
(06-08-2018 04:26 PM)rayluk Wrote:  @changxy

After copying the bios-256k.bin from tbg15, I can start the installation by the following command. I have leave a screen named ray in tetra. Please have a look. After the installation, you can continue on the test. You may assume the bios-256k.bin problem will get solved so don't worry about it.
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /root/CentOS-7.iso -hda /thinker/local/vms/rayluk-kvm/vmdisk0
QE

I have done the copy before, and for the last Error I think it is because I lack the QEMU package.
After I installed the package, the Error became like:
Code:
Starting install...
Allocating 'centos72.img'                                                                                                              |  16 GB  00:00:00    
ERROR    internal error: qemu unexpectedly closed the monitor: 2018-06-08T09:02:14.689528Z qemu-kvm: -drive file=/root/CentOS-7.iso,format=raw,if=none,id=drive-ide0-0-1,readonly=on: could not open disk image /root/CentOS-7.iso: Could not open '/root/CentOS-7.iso': Permission denied
Removing disk 'centos72.img'                                                                                                           |    0 B  00:00:00    
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///system start centos72
otherwise, please restart your installation.

I have searched on the Internet, still can't tell why.
I found the problem is I put CentOS-7.iso under /root/, when changed the path, it installed.
Find all posts by this user
Quote this message in a reply
06-13-2018, 03:11 PM (This post was last modified: 06-13-2018 03:39 PM by changxy.)
Post: #35
RE: kvm installation on CentOS7
(05-25-2018 07:05 PM)rayluk Wrote:  
(05-23-2018 01:07 PM)rayluk Wrote:  cen716 created from xen can be boot from kvm
Code:
qemu-system-x86_64 -vnc :2 -smp 2 -m 4000 -hda /thinker/local/vms/cent716/vmdisk0

After further tests, this is not valid as -enable-kvm is not used in the line.
When we use -enable-kvm to boot a disk from xen, it would report bugs.

@rayluk
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /data/CentOS-7.iso -hda /root/kvm/vdisk.img
After I type the code above, it shows nothing on my computer, is there a kvm window or something?
And I got
Code:
VNC server running on ::1:5900
That means the KVM is working right?
Find all posts by this user
Quote this message in a reply
06-13-2018, 04:09 PM
Post: #36
RE: kvm installation on CentOS7
(06-13-2018 03:11 PM)changxy Wrote:  
(05-25-2018 07:05 PM)rayluk Wrote:  
(05-23-2018 01:07 PM)rayluk Wrote:  cen716 created from xen can be boot from kvm
Code:
qemu-system-x86_64 -vnc :2 -smp 2 -m 4000 -hda /thinker/local/vms/cent716/vmdisk0

After further tests, this is not valid as -enable-kvm is not used in the line.
When we use -enable-kvm to boot a disk from xen, it would report bugs.

@rayluk
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /data/CentOS-7.iso -hda /root/kvm/vdisk.img
After I type the code above, it shows nothing on my computer, is there a kvm window or something?
And I got
Code:
VNC server running on ::1:5900
That means the KVM is working right?

Yes.

You can connect to a the vnc at port 5901 to have a look ( I am not sure it is 5900/5901/5902 here as there are difference among commands).

This command would install the ISO to the vmdisk as if booting a machine with an autation usb and a hdd.

For running a normal VM, I think you can remove the "-cdrom /data..." part for that.

To connection to that VNC, following is my suggestion.

Code:
Start a VNC server on tbg15.
Port-forwarding to  VNC port to your own machine
Use VNC client to connect to the VNC local port
Connection to the VNC instance on otter through a vnc client in the VNC window
Find all posts by this user
Quote this message in a reply
06-13-2018, 04:19 PM
Post: #37
RE: kvm installation on CentOS7
(06-13-2018 04:09 PM)rayluk Wrote:  
(06-13-2018 03:11 PM)changxy Wrote:  
(05-25-2018 07:05 PM)rayluk Wrote:  
(05-23-2018 01:07 PM)rayluk Wrote:  cen716 created from xen can be boot from kvm
Code:
qemu-system-x86_64 -vnc :2 -smp 2 -m 4000 -hda /thinker/local/vms/cent716/vmdisk0

After further tests, this is not valid as -enable-kvm is not used in the line.
When we use -enable-kvm to boot a disk from xen, it would report bugs.

@rayluk
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /data/CentOS-7.iso -hda /root/kvm/vdisk.img
After I type the code above, it shows nothing on my computer, is there a kvm window or something?
And I got
Code:
VNC server running on ::1:5900
That means the KVM is working right?

Yes.

You can connect to a the vnc at port 5901 to have a look ( I am not sure it is 5900/5901/5902 here as there are difference among commands).

This command would install the ISO to the vmdisk as if booting a machine with an autation usb and a hdd.

For running a normal VM, I think you can remove the "-cdrom /data..." part for that.

To connection to that VNC, following is my suggestion.

Code:
Start a VNC server on tbg15.
Port-forwarding to  VNC port to your own machine
Use VNC client to connect to the VNC local port
Connection to the VNC instance on otter through a vnc client in the VNC window
I need to be root to start VNC server on tbg15, I am not in the sudoers file.
Find all posts by this user
Quote this message in a reply
06-13-2018, 04:54 PM
Post: #38
RE: kvm installation on CentOS7
(06-13-2018 04:19 PM)changxy Wrote:  
(06-13-2018 04:09 PM)rayluk Wrote:  
(06-13-2018 03:11 PM)changxy Wrote:  
(05-25-2018 07:05 PM)rayluk Wrote:  
(05-23-2018 01:07 PM)rayluk Wrote:  cen716 created from xen can be boot from kvm
Code:
qemu-system-x86_64 -vnc :2 -smp 2 -m 4000 -hda /thinker/local/vms/cent716/vmdisk0

After further tests, this is not valid as -enable-kvm is not used in the line.
When we use -enable-kvm to boot a disk from xen, it would report bugs.

@rayluk
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /data/CentOS-7.iso -hda /root/kvm/vdisk.img
After I type the code above, it shows nothing on my computer, is there a kvm window or something?
And I got
Code:
VNC server running on ::1:5900
That means the KVM is working right?

Yes.

You can connect to a the vnc at port 5901 to have a look ( I am not sure it is 5900/5901/5902 here as there are difference among commands).

This command would install the ISO to the vmdisk as if booting a machine with an autation usb and a hdd.

For running a normal VM, I think you can remove the "-cdrom /data..." part for that.

To connection to that VNC, following is my suggestion.

Code:
Start a VNC server on tbg15.
Port-forwarding to  VNC port to your own machine
Use VNC client to connect to the VNC local port
Connection to the VNC instance on otter through a vnc client in the VNC window
I need to be root to start VNC server on tbg15, I am not in the sudoers file.
You don't need to be root for that. Just run `vncserver` as a normal user would be good
Find all posts by this user
Quote this message in a reply
06-13-2018, 05:08 PM
Post: #39
RE: kvm installation on CentOS7
(06-13-2018 04:54 PM)rayluk Wrote:  
(06-13-2018 04:19 PM)changxy Wrote:  
(06-13-2018 04:09 PM)rayluk Wrote:  
(06-13-2018 03:11 PM)changxy Wrote:  
(05-25-2018 07:05 PM)rayluk Wrote:  
(05-23-2018 01:07 PM)rayluk Wrote:  cen716 created from xen can be boot from kvm
Code:
qemu-system-x86_64 -vnc :2 -smp 2 -m 4000 -hda /thinker/local/vms/cent716/vmdisk0

After further tests, this is not valid as -enable-kvm is not used in the line.
When we use -enable-kvm to boot a disk from xen, it would report bugs.

@rayluk
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /data/CentOS-7.iso -hda /root/kvm/vdisk.img
After I type the code above, it shows nothing on my computer, is there a kvm window or something?
And I got
Code:
VNC server running on ::1:5900
That means the KVM is working right?

Yes.

You can connect to a the vnc at port 5901 to have a look ( I am not sure it is 5900/5901/5902 here as there are difference among commands).

This command would install the ISO to the vmdisk as if booting a machine with an autation usb and a hdd.

For running a normal VM, I think you can remove the "-cdrom /data..." part for that.

To connection to that VNC, following is my suggestion.

Code:
Start a VNC server on tbg15.
Port-forwarding to  VNC port to your own machine
Use VNC client to connect to the VNC local port
Connection to the VNC instance on otter through a vnc client in the VNC window
I need to be root to start VNC server on tbg15, I am not in the sudoers file.
You don't need to be root for that. Just run `vncserver` as a normal user would be good

I think vnc and vnc-server not installed on tb15-6.
Code:
[changxy@tb15-6 ~]$ rpm -qa | grep vnc
[changxy@tb15-6 ~]$ rpm -q vnc-server
package vnc-server is not installed
[changxy@tb15-6 ~]$ rpm -q vncserver
package vncserver is not installed
Find all posts by this user
Quote this message in a reply
06-13-2018, 05:27 PM
Post: #40
RE: kvm installation on CentOS7
(06-13-2018 05:08 PM)changxy Wrote:  
(06-13-2018 04:54 PM)rayluk Wrote:  
(06-13-2018 04:19 PM)changxy Wrote:  
(06-13-2018 04:09 PM)rayluk Wrote:  
(06-13-2018 03:11 PM)changxy Wrote:  
(05-25-2018 07:05 PM)rayluk Wrote:  
(05-23-2018 01:07 PM)rayluk Wrote:  cen716 created from xen can be boot from kvm
Code:
qemu-system-x86_64 -vnc :2 -smp 2 -m 4000 -hda /thinker/local/vms/cent716/vmdisk0

After further tests, this is not valid as -enable-kvm is not used in the line.
When we use -enable-kvm to boot a disk from xen, it would report bugs.

@rayluk
Code:
qemu-system-x86_64 --enable-kvm -smp 2 -m 4000 --boot d -vnc :2 -cdrom /data/CentOS-7.iso -hda /root/kvm/vdisk.img
After I type the code above, it shows nothing on my computer, is there a kvm window or something?
And I got
Code:
VNC server running on ::1:5900
That means the KVM is working right?

Yes.

You can connect to a the vnc at port 5901 to have a look ( I am not sure it is 5900/5901/5902 here as there are difference among commands).

This command would install the ISO to the vmdisk as if booting a machine with an autation usb and a hdd.

For running a normal VM, I think you can remove the "-cdrom /data..." part for that.

To connection to that VNC, following is my suggestion.

Code:
Start a VNC server on tbg15.
Port-forwarding to  VNC port to your own machine
Use VNC client to connect to the VNC local port
Connection to the VNC instance on otter through a vnc client in the VNC window
I need to be root to start VNC server on tbg15, I am not in the sudoers file.
You don't need to be root for that. Just run `vncserver` as a normal user would be good

I think vnc and vnc-server not installed on tb15-6.
Code:
[changxy@tb15-6 ~]$ rpm -qa | grep vnc
[changxy@tb15-6 ~]$ rpm -q vnc-server
package vnc-server is not installed
[changxy@tb15-6 ~]$ rpm -q vncserver
package vncserver is not installed

Sorry, I though its the lastest autation. I made a request in related post. Will notify here when vncserver is installed.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: