I want to make a new centos7 cloud image based on offical image. But when I did the yum update, I got login failed.
Please help !
1.download image
Code: Select all
wget https://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud-2009.qcow2
Code: Select all
virt-sysprep -a CentOS-7-x86_64-GenericCloud-2009.qcow2 --network --update --root-password password:root
centos7.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<domain type="kvm">
<name>centos7</name>
<memory unit="GiB">8</memory>
<vcpu>4</vcpu>
<os>
<type arch="x86_64" machine="pc">hvm</type>
<boot dev="hd"></boot>
</os>
<clock offset="localtime"></clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/libexec/qemu-kvm</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"></driver>
<source file="/home/lubin/CentOS-7-x86_64-GenericCloud-2009.qcow2"></source>
<target dev="vda" bus="virtio"></target>
</disk>
<interface type="bridge">
<source bridge="virbr0"></source>
<model type="virtio"></model>
</interface>
<input type="tablet" bus="usb"></input>
<input type="mouse" bus="ps2"></input>
<graphics type="vnc" port="5936" listen="0.0.0.0" autoport="no" keymap="en-us"></graphics>
</devices>
</domain>
Code: Select all
vrish define centos7.xml
virsh start centos7
/var/log/secure
Code: Select all
Aug 2 16:30:59 localhost sshd[822]: Server listening on 0.0.0.0 port 22.
Aug 2 16:30:59 localhost sshd[822]: Server listening on :: port 22.
Aug 2 09:21:24 localhost login: pam_systemd(login:session): Failed to create session: Access denied
Aug 2 09:21:24 localhost login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Aug 2 09:21:24 localhost login: ROOT LOGIN ON tty1
Aug 2 09:21:24 localhost login: pam_unix(login:session): session closed for user root
Code: Select all
Aug 2 09:21:26 localhost systemd-logind: Failed to start user slice user-0.slice, ignoring: Access denied (org.freedesktop.DBus.Error.AccessDenied)
Aug 2 09:21:26 localhost systemd-logind: Failed to start session scope session-2.scope: Access denied
Aug 2 09:21:26 localhost systemd: getty@tty1.service has no holdoff time, scheduling restart.