lost and found ( for me ? )

run CentOS Atomic under KVM

Here is how to run CentOS Atomic host under KVM.

Reference
http://www.projectatomic.io/docs/quickstart/

KVM host
# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 14.04.3 LTS"

# uname -ri
3.19.0-33-generic x86_64

# kvm --version
QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.22), Copyright (c) 2003-2008 Fabrice Bellard

Download CentOS Atomic qcow2 image.
# ls CentOS-Atomic-Host-7-GenericCloud.qcow2.xz
CentOS-Atomic-Host-7-GenericCloud.qcow2.xz

# unxz CentOS-Atomic-Host-7-GenericCloud.qcow2.xz

copy qcow2 to /var/lib/libvirt/images directory.
# cp CentOS-Atomic-Host-7-GenericCloud.qcow2 /var/lib/libvirt/images/CentOS7-Atomic-01.qcow2

refresh pool ‘default’
# virsh pool-refresh default
Pool default refreshed

Prepare cloud-init source ISO

Create a meta-data file.
# cat meta-data
instance-id: atomic-host001
local-hostname: atomic01.example.org

Create a user-data file.
# cat user-data
#cloud-config
password: atomic
ssh_pwauth: True
chpasswd: { expire: False }

Make an ISO file
# genisoimage -output init.iso -volid cidata -joliet -rock user-data meta-data
Total translation table size: 0
Total rockridge attributes bytes: 331
Total directory bytes: 0
Path table size(bytes): 10
Max brk space used 0
183 extents written (0 MB)

Create a virtual machine for CentOS Atomic host.

import qcow2 image

attach init.iso

Here is Boot Options.

start the VM and access to the VM via ‘virsh console’
user : centos
pass : atomic
# virsh console CentOS-Atomic-01
Connected to domain CentOS-Atomic-01
Escape character is ^]

CentOS Linux 7 (Core)
Kernel 3.10.0-327.4.5.el7.x86_64 on an x86_64

atomic01 login: centos
Password:
[centos@atomic01 ~]$ sudo su –

-bash-4.2# hostname
atomic01.example.org

-bash-4.2# yum update
bash: yum: command not found

-bash-4.2# atomic host upgrade
Updating from: centos-atomic-host:centos-atomic-host/7/x86_64/standard

1 metadata, 0 content objects fetched; 602 B transferred in 1 seconds
No upgrade available.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.