Simple recipe for spinning up VMs on Libvirt from zero
su -c “yum install @
This sets up all the virtualization entries. I never remember to use it, but more about why you should use it here.
Create disk for a VM and attach it
qemu-img create -f raw /VirtualMachines/fedora-disk-2.img 10G
Set up a FEDORA VM from source:
IMGNAME=vm1-fedora
# create image file
virt-install \
–name $IMGNAME \
–ram 5000 \
–cpu host \
–vcpus 2 \
–os-type=linux \
–os-variant=rhel6 \
–location=http://mirror.pnl.gov/fedora/linux/releases/20/Fedora/x86_64/os/ \
–disk path=/var/lib/libvirt/images/$IMGNAME.$EXT,size=10,format=qcow2
Then attach the above created disk:
virsh attach-disk vm1-fedora /VirtualMachines/idh2.img –target vda –driver qemu
And in case you wanted CentOS, just for diversity, we’ll add the same snippet here. Notice not much change.
Set up a CentOS VM from source.
IMGNAME=vm2-centos
# create image file
virt-install \
–name $IMGNAME \
–ram 5000 \
–cpu host \
–vcpus 2 \
–os-type=linux \
–os-variant=rhel6 \
–location=http://mirror.catn.com/pub/centos/6/os/x86_64 \
–disk path=/var/lib/libvirt/images/$IMGNAME.$EXT,size=10,format=qcow2
2020 has not been a year we would have been able to predict. With a worldwide pandemic and lives thrown out of gear, as we head into 2021, we are thankful that our community and project continued to receive new developers, users and make small gains. For that and a...
It has been a while since we provided an update to the Gluster community. Across the world various nations, states and localities have put together sets of guidelines around shelter-in-place and quarantine. We request our community members to stay safe, to care for their loved ones, to continue to be...
The initial rounds of conversation around the planning of content for release 8 has helped the project identify one key thing – the need to stagger out features and enhancements over multiple releases. Thus, while release 8 is unlikely to be feature heavy as previous releases, it will be the...