[URGENT] Is 'virt-install' cannot generate isolated VMs using same existing qcow2 ?
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[URGENT] Is 'virt-install' cannot generate isolated VMs using same existing qcow2 ?
Hello,
I have a big trouble on using kvm-libvirt.
I have a customized qcow2 image (I extracted it using virtualbox-NAT network)
and generated 3 VMs.
Each customized VM download network interface file from remote server in booting process onto its mac address and automatically change its /etc/network/interfaces.
when I generate 1 VM, it works well, but 3 VMs work wrong. I think that multiple VMs share each resource and network configuration process goes wrong. When I install new VM machine using same qcow2, after that the network setting is not same with default qcow2 network setting (I think that My networking change process is reflected on it)
My VM installation ex command is as below (VMs: test1,test2,test3)
How can I generate multiple isolated VMs without changing original qcow2 image in command?
(I want to get same result - for example virtualbox, <new> VM, not import, and bring *.vmdk existing image and start, repeat 3 times , and then generate 3 isolated VMs)
please reply me,
Thank you
Last edited by donghyun Kim; 10-02-2014 at 09:40 AM.
did you use the same qcow2 file for all three VMs, or did you clone the file/take three different snapshot of the original template?
did you wipe /etc/udev/rules.d/70-persistent-net.rules before cloning the VM image?
--> Oh I used same qcow2 image and import it all 3 VMs, How can I clone snapshot qcow2? and Do I have to wipe 70-persistent-net.rules in host? guest? and could you please explain why?
Last edited by donghyun Kim; 10-03-2014 at 11:40 PM.
First, wipe 70-persistent-net.rules on the qcow2 image.
Second, create snapshots for each VM.
You are trying to use the same qcow2 image for 3 different VMs, and that is the equivalent to using 3 computers with the same hard drive... it simply can not be done.
Using a snapshot, however, you can use your original qcow2 image as a read-only gold image and the snapshot is where files are written.
you cannot attach 3 VMs to the same disk image. Imagine connecting one hard drive to three separate computers as the main and only drive. You need to either make 3 copies of the original qcow2 or use qemu-img to create three snapshots and base your VMs on those. The latter option will save you some space (though it might end up being more space wasted in the long run) but it will cost you some disk access speed.
the persistent-net.rules file should be wiped in the guests. Don't know about Ubuntu, but in RHEL there's a "sys-unconfig" utility which will prepare the system to be redeployed, essentially removing ssh keys, mac address references and other individual host settings, so the image can be easily cloned.
you cannot attach 3 VMs to the same disk image. Imagine connecting one hard drive to three separate computers as the main and only drive. You need to either make 3 copies of the original qcow2 or use qemu-img to create three snapshots and base your VMs on those. The latter option will save you some space (though it might end up being more space wasted in the long run) but it will cost you some disk access speed.
the persistent-net.rules file should be wiped in the guests. Don't know about Ubuntu, but in RHEL there's a "sys-unconfig" utility which will prepare the system to be redeployed, essentially removing ssh keys, mac address references and other individual host settings, so the image can be easily cloned.
In Openstack, I can generate multiple VMs using single qcow2 image easily without copying the image. I don't know exactly how it is going on, Is there any option to generate multiple VMs using libvirt like openstack?
In Openstack, I can generate multiple VMs using single qcow2 image easily without copying the image. I don't know exactly how it is going on, Is there any option to generate multiple VMs using libvirt like openstack?
openstack (well, nova actually) will copy a disk copy for every instance from the glance image repository. So on the host that runs the VMs, you get three disk image copies.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.