PDA

View Full Version : SLES 12 SP2 qemu-system-x86_64 to create VM occurs error



howloncampus
08-Sep-2017, 02:16
today based on SLES 12 SP2, i'm using the imbeded QEMU to create a VM like below steps.

1. create one image for the VM using below command.
qemu-img -f create qcow2 /images/vm1.qcow2 8G
successuflly perofmed. the image was generated in the specific category.

2. Create the VM using the qemu-system-x86_64 command to install the Guest OS , using below comamnd:
qemu-system-x86_64 -m 512 -smp 4 --enable-kvm –boot order=dc -hda /root/howl/vm1.qcow2 -cdrom /root/howl/SLES_SP1_x86_64.iso

when execute this command, error occurs like below:
Unable to init server: Could not connect: connection refused:
gtk initialization failed.

i don't understand this much, could anyone kindly give your suggestions here? thanks very much.

B.R.
Howl.

malcolmlewis
08-Sep-2017, 04:07
Hi and welcome to the forum :)
Where you created the vm1.qcow2 image locations differ? It also looks like your not running X or is libvirtd installed and running? Maybe consider virt-manager (can be connected from a remote system if required) or virsh instead

jmozdzen
14-Sep-2017, 11:09
Hi Howl,


today based on SLES 12 SP2, i'm using the imbeded QEMU to create a VM like below steps.

1. create one image for the VM using below command.
qemu-img -f create qcow2 /images/vm1.qcow2 8G
successuflly perofmed. the image was generated in the specific category.

2. Create the VM using the qemu-system-x86_64 command to install the Guest OS , using below comamnd:
qemu-system-x86_64 -m 512 -smp 4 --enable-kvm –boot order=dc -hda /root/howl/vm1.qcow2 -cdrom /root/howl/SLES_SP1_x86_64.iso

when execute this command, error occurs like below:
Unable to init server: Could not connect: connection refused:
gtk initialization failed.

i don't understand this much, could anyone kindly give your suggestions here? thanks very much.

B.R.
Howl.

maybe it's just because you redacted the commands for privacy reasons - but your command "1" creates the image in "/images/vm1.qcow2", while command "2" addresses it as "/root/howl/vm1.qcow2".

Anything in the logs?

Regards,
J