I have several virtual machines. I want to write a script that automates the following process ...
- It mounts the virtual machine (with linux as os) to say / mnt / image
- It modifies / etc / passwd (or the equivalent file) to change the user password.
- Unplug the virtual machine
Since I use libvirt, I have some qcow2 virtual machine images. To install the image on my ubuntu, I use the nbd module. Here are the commands I'm trying to do:
modprobe nbd max_part=63 qemu-nbd -c /dev/nbd0 image.qcow2 mount /dev/nbd0p1 /mnt/image
This gives me an error:
mount: special device /dev/nbd0p1 does not exist
When I replace nbd0p1 with nbdo, I get the following error (although I'm not sure what I'm trying to do this)
mount: you must specify the filesystem type
Any suggestions that might be a problem ...?
source share